Commit 8eeb7019 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

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: default avatarArchit Taneja <archit@ti.com>
parent 3c2995ac
...@@ -2255,7 +2255,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane, ...@@ -2255,7 +2255,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
return 0; return 0;
} }
int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
bool replication, const struct omap_video_timings *mgr_timings) bool replication, const struct omap_video_timings *mgr_timings)
{ {
struct omap_overlay *ovl = omap_dss_get_overlay(plane); 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,6 +2273,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
enum omap_channel channel; enum omap_channel channel;
int x_predecim = 1, y_predecim = 1; int x_predecim = 1, y_predecim = 1;
bool ilace = mgr_timings->interlace; bool ilace = mgr_timings->interlace;
u16 pos_y = oi->pos_y;
channel = dispc_ovl_get_channel_out(plane); channel = dispc_ovl_get_channel_out(plane);
...@@ -2295,12 +2296,12 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, ...@@ -2295,12 +2296,12 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
if (ilace) { if (ilace) {
if (fieldmode) if (fieldmode)
in_height /= 2; in_height /= 2;
oi->pos_y /= 2; pos_y /= 2;
out_height /= 2; out_height /= 2;
DSSDBG("adjusting for ilace: height %d, pos_y %d, " DSSDBG("adjusting for ilace: height %d, pos_y %d, "
"out_height %d\n", "out_height %d\n",
in_height, oi->pos_y, out_height); in_height, pos_y, out_height);
} }
if (!dss_feat_color_mode_supported(plane, oi->color_mode)) 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,7 +2385,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
DSSDBG("%d,%d %dx%d -> %dx%d\n", oi->pos_x, oi->pos_y, in_width, DSSDBG("%d,%d %dx%d -> %dx%d\n", oi->pos_x, oi->pos_y, in_width,
in_height, out_width, out_height); in_height, out_width, out_height);
dispc_ovl_set_pos(plane, oi->pos_x, oi->pos_y); dispc_ovl_set_pos(plane, oi->pos_x, pos_y);
dispc_ovl_set_pic_size(plane, in_width, in_height); dispc_ovl_set_pic_size(plane, in_width, in_height);
......
...@@ -444,7 +444,7 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high); ...@@ -444,7 +444,7 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high);
void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
u32 *fifo_low, u32 *fifo_high, bool use_fifomerge, u32 *fifo_low, u32 *fifo_high, bool use_fifomerge,
bool manual_update); bool manual_update);
int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
bool replication, const struct omap_video_timings *mgr_timings); bool replication, const struct omap_video_timings *mgr_timings);
int dispc_ovl_enable(enum omap_plane plane, bool enable); int dispc_ovl_enable(enum omap_plane plane, bool enable);
void dispc_ovl_set_channel_out(enum omap_plane plane, void dispc_ovl_set_channel_out(enum omap_plane plane,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment