diff options
-rw-r--r-- | arch/arm/plat-omap/include/plat/display.h | 3 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/display.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 25 |
4 files changed, 10 insertions, 34 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h index a3363846e18a..aefd0676cd81 100644 --- a/arch/arm/plat-omap/include/plat/display.h +++ b/arch/arm/plat-omap/include/plat/display.h | |||
@@ -492,9 +492,6 @@ struct omap_dss_device { | |||
492 | u8 (*get_rotate)(struct omap_dss_device *dssdev); | 492 | u8 (*get_rotate)(struct omap_dss_device *dssdev); |
493 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); | 493 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); |
494 | 494 | ||
495 | bool (*get_mirror)(struct omap_dss_device *dssdev); | ||
496 | int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); | ||
497 | |||
498 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | 495 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); |
499 | u32 (*get_wss)(struct omap_dss_device *dssdev); | 496 | u32 (*get_wss)(struct omap_dss_device *dssdev); |
500 | 497 | ||
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 5f78d3851d91..4d644497431d 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -797,16 +797,20 @@ static int taal_mirror(struct omap_dss_device *dssdev, bool enable) | |||
797 | 797 | ||
798 | dev_dbg(&dssdev->dev, "mirror %d\n", enable); | 798 | dev_dbg(&dssdev->dev, "mirror %d\n", enable); |
799 | 799 | ||
800 | dsi_bus_lock(); | ||
800 | if (td->enabled) { | 801 | if (td->enabled) { |
801 | r = taal_set_addr_mode(td->rotate, enable); | 802 | r = taal_set_addr_mode(td->rotate, enable); |
802 | |||
803 | if (r) | 803 | if (r) |
804 | return r; | 804 | goto err; |
805 | } | 805 | } |
806 | 806 | ||
807 | td->mirror = enable; | 807 | td->mirror = enable; |
808 | 808 | ||
809 | dsi_bus_unlock(); | ||
809 | return 0; | 810 | return 0; |
811 | err: | ||
812 | dsi_bus_unlock(); | ||
813 | return r; | ||
810 | } | 814 | } |
811 | 815 | ||
812 | static bool taal_get_mirror(struct omap_dss_device *dssdev) | 816 | static bool taal_get_mirror(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index 3f345b8cbcb0..8b9179668f48 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -215,9 +215,9 @@ static ssize_t display_mirror_show(struct device *dev, | |||
215 | { | 215 | { |
216 | struct omap_dss_device *dssdev = to_dss_device(dev); | 216 | struct omap_dss_device *dssdev = to_dss_device(dev); |
217 | int mirror; | 217 | int mirror; |
218 | if (!dssdev->get_mirror) | 218 | if (!dssdev->driver->get_mirror) |
219 | return -ENOENT; | 219 | return -ENOENT; |
220 | mirror = dssdev->get_mirror(dssdev); | 220 | mirror = dssdev->driver->get_mirror(dssdev); |
221 | return snprintf(buf, PAGE_SIZE, "%u\n", mirror); | 221 | return snprintf(buf, PAGE_SIZE, "%u\n", mirror); |
222 | } | 222 | } |
223 | 223 | ||
@@ -228,12 +228,12 @@ static ssize_t display_mirror_store(struct device *dev, | |||
228 | unsigned long mirror; | 228 | unsigned long mirror; |
229 | int r; | 229 | int r; |
230 | 230 | ||
231 | if (!dssdev->set_mirror || !dssdev->get_mirror) | 231 | if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror) |
232 | return -ENOENT; | 232 | return -ENOENT; |
233 | 233 | ||
234 | mirror = simple_strtoul(buf, NULL, 0); | 234 | mirror = simple_strtoul(buf, NULL, 0); |
235 | 235 | ||
236 | r = dssdev->set_mirror(dssdev, mirror); | 236 | r = dssdev->driver->set_mirror(dssdev, mirror); |
237 | if (r) | 237 | if (r) |
238 | return r; | 238 | return r; |
239 | 239 | ||
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 638d8c29e9d9..2f356d471b0e 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -3562,28 +3562,6 @@ static u8 dsi_display_get_rotate(struct omap_dss_device *dssdev) | |||
3562 | return dssdev->driver->get_rotate(dssdev); | 3562 | return dssdev->driver->get_rotate(dssdev); |
3563 | } | 3563 | } |
3564 | 3564 | ||
3565 | static int dsi_display_set_mirror(struct omap_dss_device *dssdev, bool mirror) | ||
3566 | { | ||
3567 | DSSDBGF("%d", mirror); | ||
3568 | |||
3569 | if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror) | ||
3570 | return -EINVAL; | ||
3571 | |||
3572 | dsi_bus_lock(); | ||
3573 | dssdev->driver->set_mirror(dssdev, mirror); | ||
3574 | dsi_bus_unlock(); | ||
3575 | |||
3576 | return 0; | ||
3577 | } | ||
3578 | |||
3579 | static bool dsi_display_get_mirror(struct omap_dss_device *dssdev) | ||
3580 | { | ||
3581 | if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror) | ||
3582 | return 0; | ||
3583 | |||
3584 | return dssdev->driver->get_mirror(dssdev); | ||
3585 | } | ||
3586 | |||
3587 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, | 3565 | void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, |
3588 | u32 fifo_size, enum omap_burst_size *burst_size, | 3566 | u32 fifo_size, enum omap_burst_size *burst_size, |
3589 | u32 *fifo_low, u32 *fifo_high) | 3567 | u32 *fifo_low, u32 *fifo_high) |
@@ -3615,9 +3593,6 @@ int dsi_init_display(struct omap_dss_device *dssdev) | |||
3615 | dssdev->get_rotate = dsi_display_get_rotate; | 3593 | dssdev->get_rotate = dsi_display_get_rotate; |
3616 | dssdev->set_rotate = dsi_display_set_rotate; | 3594 | dssdev->set_rotate = dsi_display_set_rotate; |
3617 | 3595 | ||
3618 | dssdev->get_mirror = dsi_display_get_mirror; | ||
3619 | dssdev->set_mirror = dsi_display_set_mirror; | ||
3620 | |||
3621 | /* XXX these should be figured out dynamically */ | 3596 | /* XXX these should be figured out dynamically */ |
3622 | dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE | | 3597 | dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE | |
3623 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM; | 3598 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM; |