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 | |
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>
-rw-r--r-- | drivers/video/omap2/displays/panel-n8x0.c | 14 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 76 | ||||
-rw-r--r-- | include/video/omapdss.h | 7 |
3 files changed, 31 insertions, 66 deletions
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index e6c115373c00..1d421b5ffae4 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c | |||
@@ -625,17 +625,25 @@ static int n8x0_panel_update(struct omap_dss_device *dssdev, | |||
625 | u16 x, u16 y, u16 w, u16 h) | 625 | u16 x, u16 y, u16 w, u16 h) |
626 | { | 626 | { |
627 | struct panel_drv_data *ddata = get_drv_data(dssdev); | 627 | struct panel_drv_data *ddata = get_drv_data(dssdev); |
628 | u16 dw, dh; | ||
628 | 629 | ||
629 | dev_dbg(&dssdev->dev, "update\n"); | 630 | dev_dbg(&dssdev->dev, "update\n"); |
630 | 631 | ||
632 | dw = dssdev->panel.timings.x_res; | ||
633 | dh = dssdev->panel.timings.y_res; | ||
634 | |||
635 | if (x != 0 || y != 0 || w != dw || h != dh) { | ||
636 | dev_err(&dssdev->dev, "invaid update region %d, %d, %d, %d\n", | ||
637 | x, y, w, h); | ||
638 | return -EINVAL; | ||
639 | } | ||
640 | |||
631 | mutex_lock(&ddata->lock); | 641 | mutex_lock(&ddata->lock); |
632 | rfbi_bus_lock(); | 642 | rfbi_bus_lock(); |
633 | 643 | ||
634 | omap_rfbi_prepare_update(dssdev, &x, &y, &w, &h); | ||
635 | |||
636 | blizzard_ctrl_setup_update(dssdev, x, y, w, h); | 644 | blizzard_ctrl_setup_update(dssdev, x, y, w, h); |
637 | 645 | ||
638 | omap_rfbi_update(dssdev, x, y, w, h, update_done, NULL); | 646 | omap_rfbi_update(dssdev, update_done, NULL); |
639 | 647 | ||
640 | mutex_unlock(&ddata->lock); | 648 | mutex_unlock(&ddata->lock); |
641 | 649 | ||
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 | ||
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index a06a9ba3872d..b6b03cea8600 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -749,11 +749,8 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, | |||
749 | 749 | ||
750 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); | 750 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); |
751 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); | 751 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); |
752 | int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, | 752 | int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), |
753 | u16 *x, u16 *y, u16 *w, u16 *h); | 753 | void *data); |
754 | int omap_rfbi_update(struct omap_dss_device *dssdev, | ||
755 | u16 x, u16 y, u16 w, u16 h, | ||
756 | void (*callback)(void *), void *data); | ||
757 | int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, | 754 | int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, |
758 | int data_lines); | 755 | int data_lines); |
759 | 756 | ||