diff options
author | Archit Taneja <archit@ti.com> | 2012-04-16 03:23:42 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-04-23 03:48:09 -0400 |
commit | e5c09e06a9ef882e770aa1fa1bcfd5e5c90c6519 (patch) | |
tree | 46d6f24789846ebd6ae9cb07a00bd8b4335148c4 /drivers/video | |
parent | 693cc078dc8b89d20a0d7d32f1a32d03a4fc1e7f (diff) |
OMAPDSS: DISPC/RFBI: Use dispc_mgr_set_lcd_timings() for setting lcd size
The RFBI driver uses dispc_mgr_set_lcd_size() to set the width and height of
the LCD manager. Replace this to use dispc_mgr_set_lcd_timings(), pass dummy
blanking parameters like done in the DSI driver.
This prevents the need to export dispc_mgr_set_lcd_size(), and use a common
function to set lcd timings.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 24 |
3 files changed, 24 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index ee30937482e..ac9bf750e77 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -983,7 +983,8 @@ static void dispc_ovl_enable_replication(enum omap_plane plane, bool enable) | |||
983 | REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), enable, shift, shift); | 983 | REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), enable, shift, shift); |
984 | } | 984 | } |
985 | 985 | ||
986 | void dispc_mgr_set_lcd_size(enum omap_channel channel, u16 width, u16 height) | 986 | static void dispc_mgr_set_lcd_size(enum omap_channel channel, u16 width, |
987 | u16 height) | ||
987 | { | 988 | { |
988 | u32 val; | 989 | u32 val; |
989 | BUG_ON((width > (1 << 11)) || (height > (1 << 11))); | 990 | BUG_ON((width > (1 << 11)) || (height > (1 << 11))); |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 7080f5f04c0..e8dea7485f7 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -430,7 +430,6 @@ void dispc_ovl_set_channel_out(enum omap_plane plane, | |||
430 | enum omap_channel channel); | 430 | enum omap_channel channel); |
431 | 431 | ||
432 | void dispc_mgr_enable_fifohandcheck(enum omap_channel channel, bool enable); | 432 | void dispc_mgr_enable_fifohandcheck(enum omap_channel channel, bool enable); |
433 | void dispc_mgr_set_lcd_size(enum omap_channel channel, u16 width, u16 height); | ||
434 | u32 dispc_mgr_get_vsync_irq(enum omap_channel channel); | 433 | u32 dispc_mgr_get_vsync_irq(enum omap_channel channel); |
435 | u32 dispc_mgr_get_framedone_irq(enum omap_channel channel); | 434 | u32 dispc_mgr_get_framedone_irq(enum omap_channel channel); |
436 | bool dispc_mgr_go_busy(enum omap_channel channel); | 435 | bool dispc_mgr_go_busy(enum omap_channel channel); |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 788a0ef6323..97b6c4a2bce 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -304,13 +304,23 @@ static void rfbi_transfer_area(struct omap_dss_device *dssdev, u16 width, | |||
304 | u16 height, void (*callback)(void *data), void *data) | 304 | u16 height, void (*callback)(void *data), void *data) |
305 | { | 305 | { |
306 | u32 l; | 306 | u32 l; |
307 | struct omap_video_timings timings = { | ||
308 | .hsw = 1, | ||
309 | .hfp = 1, | ||
310 | .hbp = 1, | ||
311 | .vsw = 1, | ||
312 | .vfp = 0, | ||
313 | .vbp = 0, | ||
314 | .x_res = width, | ||
315 | .y_res = height, | ||
316 | }; | ||
307 | 317 | ||
308 | /*BUG_ON(callback == 0);*/ | 318 | /*BUG_ON(callback == 0);*/ |
309 | BUG_ON(rfbi.framedone_callback != NULL); | 319 | BUG_ON(rfbi.framedone_callback != NULL); |
310 | 320 | ||
311 | DSSDBG("rfbi_transfer_area %dx%d\n", width, height); | 321 | DSSDBG("rfbi_transfer_area %dx%d\n", width, height); |
312 | 322 | ||
313 | dispc_mgr_set_lcd_size(dssdev->manager->id, width, height); | 323 | dispc_mgr_set_lcd_timings(dssdev->manager->id, &timings); |
314 | 324 | ||
315 | dispc_mgr_enable(dssdev->manager->id, true); | 325 | dispc_mgr_enable(dssdev->manager->id, true); |
316 | 326 | ||
@@ -766,6 +776,16 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, | |||
766 | u16 *x, u16 *y, u16 *w, u16 *h) | 776 | u16 *x, u16 *y, u16 *w, u16 *h) |
767 | { | 777 | { |
768 | u16 dw, dh; | 778 | u16 dw, dh; |
779 | struct omap_video_timings timings = { | ||
780 | .hsw = 1, | ||
781 | .hfp = 1, | ||
782 | .hbp = 1, | ||
783 | .vsw = 1, | ||
784 | .vfp = 0, | ||
785 | .vbp = 0, | ||
786 | .x_res = *w, | ||
787 | .y_res = *h, | ||
788 | }; | ||
769 | 789 | ||
770 | dssdev->driver->get_resolution(dssdev, &dw, &dh); | 790 | dssdev->driver->get_resolution(dssdev, &dw, &dh); |
771 | 791 | ||
@@ -784,7 +804,7 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, | |||
784 | if (*w == 0 || *h == 0) | 804 | if (*w == 0 || *h == 0) |
785 | return -EINVAL; | 805 | return -EINVAL; |
786 | 806 | ||
787 | dispc_mgr_set_lcd_size(dssdev->manager->id, *w, *h); | 807 | dispc_mgr_set_lcd_timings(dssdev->manager->id, &timings); |
788 | 808 | ||
789 | return 0; | 809 | return 0; |
790 | } | 810 | } |