diff options
author | Archit Taneja <archit@ti.com> | 2011-09-14 09:40:10 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 17:17:24 +0400 |
commit | a4273b7cca6fe7ee3807229ba256adb6cfaba0c3 (patch) | |
tree | bdc5072fb8083f0e0738531f4350d5336de0a1e2 /drivers/video/omap2/dss/manager.c | |
parent | dc891fab115380d9dfddcd252df45a941ff9cb4e (diff) | |
download | linux-a4273b7cca6fe7ee3807229ba256adb6cfaba0c3.tar.xz |
OMAPDSS: DISPC: Reduce the number of arguments in dispc_ovl_setup()
dispc_ovl_setup() currently takes a large number of overlay arguments, most of
these are members of the overlay_info struct. Replace these arguments by
passing a overlay_info pointer instead.
In configure_overlay(), we create an overlay_info struct called new_oi, this is
a copy of the overlay cache's overlay_info member. Update the new_oi parameters
which could have been possibly changed in configure_overlay(). Pass its pointer
pointer to dispc_ovl_setup().
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/manager.c')
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 5d28ef6fa78d..f1c334c275e2 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -809,7 +809,7 @@ static int configure_overlay(enum omap_plane plane) { struct overlay_cache_data *c; struct manager_cache_data *mc; - struct omap_overlay_info *oi; + struct omap_overlay_info *oi, new_oi; struct omap_overlay_manager_info *mi; u16 outw, outh; u16 x, y, w, h; @@ -929,22 +929,18 @@ static int configure_overlay(enum omap_plane plane) } } - r = dispc_ovl_setup(plane, - paddr, - oi->screen_width, - x, y, - w, h, - outw, outh, - oi->color_mode, - c->ilace, - oi->rotation_type, - oi->rotation, - oi->mirror, - oi->global_alpha, - oi->pre_mult_alpha, - c->channel, - oi->p_uv_addr); + new_oi = *oi; + + /* update new_oi members which could have been possibly updated */ + new_oi.pos_x = x; + new_oi.pos_y = y; + new_oi.width = w; + new_oi.height = h; + new_oi.out_width = outw; + new_oi.out_height = outh; + new_oi.paddr = paddr; + r = dispc_ovl_setup(plane, &new_oi, c->ilace, c->channel); if (r) { /* this shouldn't happen */ DSSERR("dispc_ovl_setup failed for ovl %d\n", plane); |