* [PATCH] OMAPDSS: DISPC: Add predecimation limit for TILER based rotations
@ 2012-09-24 6:50 Chandrabhanu Mahapatra
2012-09-25 13:40 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Chandrabhanu Mahapatra @ 2012-09-24 6:50 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra
In OMAP4 and OMAP5 when TILER 2D burst mode is used, a maximum of one line can
be skipped as per the respective TRMs. The MBlockStride OCP signal, which is
sum of ROWINC and image width in memory, is only 17 bits wide. In 2D mode TILER
supports 8192, 16384, 32768 and 65536 values of MBlockStride. In case when 2 or
more lines are skipped the ROWINC value exceeds 65536 resulting in OCP errors.
So, maximum vertical predecimation achievable is 2.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
---
drivers/video/omap2/dss/dispc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index d512c38..61f8369 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2195,7 +2195,8 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
const struct omap_video_timings *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps,
- int *x_predecim, int *y_predecim, u16 pos_x)
+ int *x_predecim, int *y_predecim, u16 pos_x,
+ enum omap_dss_rotation_type rotation_type)
{
struct omap_overlay *ovl = omap_dss_get_overlay(plane);
const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
@@ -2210,7 +2211,8 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
return -EINVAL;
*x_predecim = max_decim_limit;
- *y_predecim = max_decim_limit;
+ *y_predecim = (rotation_type = OMAP_DSS_ROT_TILER &&
+ dss_has_feature(FEAT_BURST_2D)) ? 2 : max_decim_limit;
if (color_mode = OMAP_DSS_COLOR_CLUT1 ||
color_mode = OMAP_DSS_COLOR_CLUT2 ||
@@ -2306,7 +2308,8 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
r = dispc_ovl_calc_scaling(plane, channel, mgr_timings, in_width,
in_height, out_width, out_height, oi->color_mode,
- &five_taps, &x_predecim, &y_predecim, oi->pos_x);
+ &five_taps, &x_predecim, &y_predecim, oi->pos_x,
+ oi->rotation_type);
if (r)
return r;
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAPDSS: DISPC: Add predecimation limit for TILER based rotations
2012-09-24 6:50 [PATCH] OMAPDSS: DISPC: Add predecimation limit for TILER based rotations Chandrabhanu Mahapatra
@ 2012-09-25 13:40 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2012-09-25 13:40 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
On Mon, 2012-09-24 at 12:08 +0530, Chandrabhanu Mahapatra wrote:
> In OMAP4 and OMAP5 when TILER 2D burst mode is used, a maximum of one line can
> be skipped as per the respective TRMs. The MBlockStride OCP signal, which is
> sum of ROWINC and image width in memory, is only 17 bits wide. In 2D mode TILER
> supports 8192, 16384, 32768 and 65536 values of MBlockStride. In case when 2 or
> more lines are skipped the ROWINC value exceeds 65536 resulting in OCP errors.
> So, maximum vertical predecimation achievable is 2.
>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Thanks, looks fine to me.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-25 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 6:50 [PATCH] OMAPDSS: DISPC: Add predecimation limit for TILER based rotations Chandrabhanu Mahapatra
2012-09-25 13:40 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).