aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-15 08:54:15 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-22 03:59:14 -0400
commit36377357db00f8660039578ba57a2a19bfc9ad3d (patch)
tree8965ddaa268af056f28922b4224a1225fd404574 /drivers
parent3568f2a46f2a73bab18c914df06afd98a97e0e0e (diff)
OMAPDSS: DISPC: fix usage of dispc_ovl_set_accu_uv
Commit 05dd0f5308213e169b02458a7f3a61362e581e14 ("OMAPDSS: DISPC: Update Accumulator configuration for chroma plane") adds dispc_ovl_set_accu_uv() function that sets the accu, but the function only handles YUV and NV12 modes, and BUGs otherwise. The patch also adds a call to the function, but unfortunately the place of call was such that the mode could be other than YUV or NV12, thus crashing the driver. This patchs moves the call to a slightly later spot, at which point only YUV and NV12 modes are handled. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/dispc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ac71fec1dbba..0fa1c94e8c58 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1304,9 +1304,6 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
1304 int scale_x = out_width != orig_width; 1304 int scale_x = out_width != orig_width;
1305 int scale_y = out_height != orig_height; 1305 int scale_y = out_height != orig_height;
1306 1306
1307 dispc_ovl_set_accu_uv(plane, orig_width, orig_height, out_width,
1308 out_height, ilace, color_mode, rotation);
1309
1310 if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE)) 1307 if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
1311 return; 1308 return;
1312 if ((color_mode != OMAP_DSS_COLOR_YUV2 && 1309 if ((color_mode != OMAP_DSS_COLOR_YUV2 &&
@@ -1316,6 +1313,10 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
1316 REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), 0, 8, 8); 1313 REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), 0, 8, 8);
1317 return; 1314 return;
1318 } 1315 }
1316
1317 dispc_ovl_set_accu_uv(plane, orig_width, orig_height, out_width,
1318 out_height, ilace, color_mode, rotation);
1319
1319 switch (color_mode) { 1320 switch (color_mode) {
1320 case OMAP_DSS_COLOR_NV12: 1321 case OMAP_DSS_COLOR_NV12:
1321 /* UV is subsampled by 2 vertically*/ 1322 /* UV is subsampled by 2 vertically*/