diff options
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 052dc874cd3d..604737f1187d 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
@@ -105,6 +105,9 @@ static struct { | |||
105 | struct ovl_priv_data ovl_priv_data_array[MAX_DSS_OVERLAYS]; | 105 | struct ovl_priv_data ovl_priv_data_array[MAX_DSS_OVERLAYS]; |
106 | struct mgr_priv_data mgr_priv_data_array[MAX_DSS_MANAGERS]; | 106 | struct mgr_priv_data mgr_priv_data_array[MAX_DSS_MANAGERS]; |
107 | 107 | ||
108 | bool fifo_merge_dirty; | ||
109 | bool fifo_merge; | ||
110 | |||
108 | bool irq_enabled; | 111 | bool irq_enabled; |
109 | } dss_data; | 112 | } dss_data; |
110 | 113 | ||
@@ -585,11 +588,40 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr) | |||
585 | } | 588 | } |
586 | } | 589 | } |
587 | 590 | ||
591 | static void dss_write_regs_common(void) | ||
592 | { | ||
593 | const int num_mgrs = omap_dss_get_num_overlay_managers(); | ||
594 | int i; | ||
595 | |||
596 | if (!dss_data.fifo_merge_dirty) | ||
597 | return; | ||
598 | |||
599 | for (i = 0; i < num_mgrs; ++i) { | ||
600 | struct omap_overlay_manager *mgr; | ||
601 | struct mgr_priv_data *mp; | ||
602 | |||
603 | mgr = omap_dss_get_overlay_manager(i); | ||
604 | mp = get_mgr_priv(mgr); | ||
605 | |||
606 | if (mp->enabled) { | ||
607 | if (dss_data.fifo_merge_dirty) { | ||
608 | dispc_enable_fifomerge(dss_data.fifo_merge); | ||
609 | dss_data.fifo_merge_dirty = false; | ||
610 | } | ||
611 | |||
612 | if (mp->updating) | ||
613 | mp->shadow_info_dirty = true; | ||
614 | } | ||
615 | } | ||
616 | } | ||
617 | |||
588 | static void dss_write_regs(void) | 618 | static void dss_write_regs(void) |
589 | { | 619 | { |
590 | const int num_mgrs = omap_dss_get_num_overlay_managers(); | 620 | const int num_mgrs = omap_dss_get_num_overlay_managers(); |
591 | int i; | 621 | int i; |
592 | 622 | ||
623 | dss_write_regs_common(); | ||
624 | |||
593 | for (i = 0; i < num_mgrs; ++i) { | 625 | for (i = 0; i < num_mgrs; ++i) { |
594 | struct omap_overlay_manager *mgr; | 626 | struct omap_overlay_manager *mgr; |
595 | struct mgr_priv_data *mp; | 627 | struct mgr_priv_data *mp; |
@@ -659,6 +691,8 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr) | |||
659 | 691 | ||
660 | dss_mgr_write_regs(mgr); | 692 | dss_mgr_write_regs(mgr); |
661 | 693 | ||
694 | dss_write_regs_common(); | ||
695 | |||
662 | mp->updating = true; | 696 | mp->updating = true; |
663 | 697 | ||
664 | if (!dss_data.irq_enabled && need_isr()) | 698 | if (!dss_data.irq_enabled && need_isr()) |
@@ -859,6 +893,15 @@ static void dss_apply_ovl_fifo_thresholds(struct omap_overlay *ovl, | |||
859 | op->extra_info_dirty = true; | 893 | op->extra_info_dirty = true; |
860 | } | 894 | } |
861 | 895 | ||
896 | static void dss_apply_fifo_merge(bool use_fifo_merge) | ||
897 | { | ||
898 | if (dss_data.fifo_merge == use_fifo_merge) | ||
899 | return; | ||
900 | |||
901 | dss_data.fifo_merge = use_fifo_merge; | ||
902 | dss_data.fifo_merge_dirty = true; | ||
903 | } | ||
904 | |||
862 | static void dss_ovl_setup_fifo(struct omap_overlay *ovl) | 905 | static void dss_ovl_setup_fifo(struct omap_overlay *ovl) |
863 | { | 906 | { |
864 | struct ovl_priv_data *op = get_ovl_priv(ovl); | 907 | struct ovl_priv_data *op = get_ovl_priv(ovl); |