diff options
author | Archit Taneja <archit@ti.com> | 2012-08-22 03:03:49 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 07:58:48 -0400 |
commit | 8eeb7019a4d1e5402b4bd5371562fe93dc1ed3dc (patch) | |
tree | 6f5b822bb50c14e65299cd803b63da93a3531646 /drivers/video/omap2/dss/dispc.c | |
parent | 3c2995ac34eb559106504be962b162aef215895b (diff) |
OMAPDSS: DISPC: Constify omap_overlay_info in dispc_ovl_setup()
The struct omap_overlay_info passed to dispc_ovl_setup() is used to configure
DISPC registers. It shouldn't modify the overlay_info structure. The pos_y field
was being changed in dispc_ovl_setup in the case of interlaced displays. Fix
this and const qualifier to the omap_overlay_info argument.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 811fe381aaea..35d388b6aec1 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -2255,7 +2255,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane, | |||
2255 | return 0; | 2255 | return 0; |
2256 | } | 2256 | } |
2257 | 2257 | ||
2258 | int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, | 2258 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, |
2259 | bool replication, const struct omap_video_timings *mgr_timings) | 2259 | bool replication, const struct omap_video_timings *mgr_timings) |
2260 | { | 2260 | { |
2261 | struct omap_overlay *ovl = omap_dss_get_overlay(plane); | 2261 | struct omap_overlay *ovl = omap_dss_get_overlay(plane); |
@@ -2273,6 +2273,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, | |||
2273 | enum omap_channel channel; | 2273 | enum omap_channel channel; |
2274 | int x_predecim = 1, y_predecim = 1; | 2274 | int x_predecim = 1, y_predecim = 1; |
2275 | bool ilace = mgr_timings->interlace; | 2275 | bool ilace = mgr_timings->interlace; |
2276 | u16 pos_y = oi->pos_y; | ||
2276 | 2277 | ||
2277 | channel = dispc_ovl_get_channel_out(plane); | 2278 | channel = dispc_ovl_get_channel_out(plane); |
2278 | 2279 | ||
@@ -2295,12 +2296,12 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, | |||
2295 | if (ilace) { | 2296 | if (ilace) { |
2296 | if (fieldmode) | 2297 | if (fieldmode) |
2297 | in_height /= 2; | 2298 | in_height /= 2; |
2298 | oi->pos_y /= 2; | 2299 | pos_y /= 2; |
2299 | out_height /= 2; | 2300 | out_height /= 2; |
2300 | 2301 | ||
2301 | DSSDBG("adjusting for ilace: height %d, pos_y %d, " | 2302 | DSSDBG("adjusting for ilace: height %d, pos_y %d, " |
2302 | "out_height %d\n", | 2303 | "out_height %d\n", |
2303 | in_height, oi->pos_y, out_height); | 2304 | in_height, pos_y, out_height); |
2304 | } | 2305 | } |
2305 | 2306 | ||
2306 | if (!dss_feat_color_mode_supported(plane, oi->color_mode)) | 2307 | if (!dss_feat_color_mode_supported(plane, oi->color_mode)) |
@@ -2384,7 +2385,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, | |||
2384 | DSSDBG("%d,%d %dx%d -> %dx%d\n", oi->pos_x, oi->pos_y, in_width, | 2385 | DSSDBG("%d,%d %dx%d -> %dx%d\n", oi->pos_x, oi->pos_y, in_width, |
2385 | in_height, out_width, out_height); | 2386 | in_height, out_width, out_height); |
2386 | 2387 | ||
2387 | dispc_ovl_set_pos(plane, oi->pos_x, oi->pos_y); | 2388 | dispc_ovl_set_pos(plane, oi->pos_x, pos_y); |
2388 | 2389 | ||
2389 | dispc_ovl_set_pic_size(plane, in_width, in_height); | 2390 | dispc_ovl_set_pic_size(plane, in_width, in_height); |
2390 | 2391 | ||