diff options
author | Archit Taneja <archit@ti.com> | 2012-08-13 02:54:53 -0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-15 06:23:08 -0400 |
commit | 43eab86167a0893e0e1102d4a5a1d95dfe442f8d (patch) | |
tree | 3dc7eb00dadf51fc5bb581c6495a20c300ba8914 /drivers/video/omap2/dss/rfbi.c | |
parent | a5abf4721b5d27357d6a9623bde02ad44cffd40f (diff) |
OMAPDSS: RFBI: Remove partial update support
Partial update suppport was removed from DISPC and DSI sometime back. The RFBI
driver still tries to support partial update without the underlying support in
DISPC.
Remove partial update support from RFBI, only support updates which span acros
the whole panel size. This also helps in DSI and RFBI having similar update
ops.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 76 |
1 files changed, 18 insertions, 58 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 7c087424b634..6bc264818edf 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -300,21 +300,24 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, | |||
300 | } | 300 | } |
301 | EXPORT_SYMBOL(omap_rfbi_write_pixels); | 301 | EXPORT_SYMBOL(omap_rfbi_write_pixels); |
302 | 302 | ||
303 | static int rfbi_transfer_area(struct omap_dss_device *dssdev, u16 width, | 303 | static int rfbi_transfer_area(struct omap_dss_device *dssdev, |
304 | u16 height, void (*callback)(void *data), void *data) | 304 | void (*callback)(void *data), void *data) |
305 | { | 305 | { |
306 | u32 l; | 306 | u32 l; |
307 | int r; | 307 | int r; |
308 | struct omap_video_timings timings = { | 308 | struct omap_video_timings timings; |
309 | .hsw = 1, | 309 | u16 width, height; |
310 | .hfp = 1, | 310 | |
311 | .hbp = 1, | 311 | dssdev->driver->get_resolution(dssdev, &width, &height); |
312 | .vsw = 1, | 312 | |
313 | .vfp = 0, | 313 | timings.x_res = width; |
314 | .vbp = 0, | 314 | timings.y_res = height; |
315 | .x_res = width, | 315 | timings.hsw = 1; |
316 | .y_res = height, | 316 | timings.hfp = 1; |
317 | }; | 317 | timings.hbp = 1; |
318 | timings.vsw = 1; | ||
319 | timings.vfp = 0; | ||
320 | timings.vbp = 0; | ||
318 | 321 | ||
319 | /*BUG_ON(callback == 0);*/ | 322 | /*BUG_ON(callback == 0);*/ |
320 | BUG_ON(rfbi.framedone_callback != NULL); | 323 | BUG_ON(rfbi.framedone_callback != NULL); |
@@ -777,53 +780,10 @@ int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, | |||
777 | } | 780 | } |
778 | EXPORT_SYMBOL(omap_rfbi_configure); | 781 | EXPORT_SYMBOL(omap_rfbi_configure); |
779 | 782 | ||
780 | int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, | 783 | int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), |
781 | u16 *x, u16 *y, u16 *w, u16 *h) | 784 | void *data) |
782 | { | ||
783 | u16 dw, dh; | ||
784 | struct omap_video_timings timings = { | ||
785 | .hsw = 1, | ||
786 | .hfp = 1, | ||
787 | .hbp = 1, | ||
788 | .vsw = 1, | ||
789 | .vfp = 0, | ||
790 | .vbp = 0, | ||
791 | .x_res = *w, | ||
792 | .y_res = *h, | ||
793 | }; | ||
794 | |||
795 | dssdev->driver->get_resolution(dssdev, &dw, &dh); | ||
796 | |||
797 | if (*x > dw || *y > dh) | ||
798 | return -EINVAL; | ||
799 | |||
800 | if (*x + *w > dw) | ||
801 | return -EINVAL; | ||
802 | |||
803 | if (*y + *h > dh) | ||
804 | return -EINVAL; | ||
805 | |||
806 | if (*w == 1) | ||
807 | return -EINVAL; | ||
808 | |||
809 | if (*w == 0 || *h == 0) | ||
810 | return -EINVAL; | ||
811 | |||
812 | dss_mgr_set_timings(dssdev->manager, &timings); | ||
813 | |||
814 | return 0; | ||
815 | } | ||
816 | EXPORT_SYMBOL(omap_rfbi_prepare_update); | ||
817 | |||
818 | int omap_rfbi_update(struct omap_dss_device *dssdev, | ||
819 | u16 x, u16 y, u16 w, u16 h, | ||
820 | void (*callback)(void *), void *data) | ||
821 | { | 785 | { |
822 | int r; | 786 | return rfbi_transfer_area(dssdev, callback, data); |
823 | |||
824 | r = rfbi_transfer_area(dssdev, w, h, callback, data); | ||
825 | |||
826 | return r; | ||
827 | } | 787 | } |
828 | EXPORT_SYMBOL(omap_rfbi_update); | 788 | EXPORT_SYMBOL(omap_rfbi_update); |
829 | 789 | ||