aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/omap2/dss/apply.c26
-rw-r--r--include/video/omapdss.h2
2 files changed, 23 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 936571b7aace..5bde08f19920 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -86,6 +86,9 @@ struct mgr_priv_data {
86 86
87 bool manual_update; 87 bool manual_update;
88 bool do_manual_update; 88 bool do_manual_update;
89
90 /* If true, a display is enabled using this manager */
91 bool enabled;
89}; 92};
90 93
91static struct { 94static struct {
@@ -609,6 +612,7 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
609 int r; 612 int r;
610 unsigned long flags; 613 unsigned long flags;
611 struct omap_overlay *ovl; 614 struct omap_overlay *ovl;
615 struct mgr_priv_data *mp = get_mgr_priv(mgr);
612 616
613 DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name); 617 DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name);
614 618
@@ -630,7 +634,7 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
630 omap_dss_mgr_apply_ovl_fifos(ovl); 634 omap_dss_mgr_apply_ovl_fifos(ovl);
631 635
632 r = 0; 636 r = 0;
633 if (mgr->enabled && !mgr_manual_update(mgr)) { 637 if (mp->enabled && !mgr_manual_update(mgr)) {
634 if (!dss_data.irq_enabled) 638 if (!dss_data.irq_enabled)
635 dss_register_vsync_isr(); 639 dss_register_vsync_isr();
636 640
@@ -646,22 +650,38 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
646 650
647void dss_mgr_enable(struct omap_overlay_manager *mgr) 651void dss_mgr_enable(struct omap_overlay_manager *mgr)
648{ 652{
653 struct mgr_priv_data *mp = get_mgr_priv(mgr);
654 unsigned long flags;
655
649 mutex_lock(&apply_lock); 656 mutex_lock(&apply_lock);
650 657
651 if (!mgr_manual_update(mgr)) 658 if (!mgr_manual_update(mgr))
652 dispc_mgr_enable(mgr->id, true); 659 dispc_mgr_enable(mgr->id, true);
653 mgr->enabled = true; 660
661 spin_lock_irqsave(&data_lock, flags);
662
663 mp->enabled = true;
664
665 spin_unlock_irqrestore(&data_lock, flags);
654 666
655 mutex_unlock(&apply_lock); 667 mutex_unlock(&apply_lock);
656} 668}
657 669
658void dss_mgr_disable(struct omap_overlay_manager *mgr) 670void dss_mgr_disable(struct omap_overlay_manager *mgr)
659{ 671{
672 struct mgr_priv_data *mp = get_mgr_priv(mgr);
673 unsigned long flags;
674
660 mutex_lock(&apply_lock); 675 mutex_lock(&apply_lock);
661 676
662 if (!mgr_manual_update(mgr)) 677 if (!mgr_manual_update(mgr))
663 dispc_mgr_enable(mgr->id, false); 678 dispc_mgr_enable(mgr->id, false);
664 mgr->enabled = false; 679
680 spin_lock_irqsave(&data_lock, flags);
681
682 mp->enabled = false;
683
684 spin_unlock_irqrestore(&data_lock, flags);
665 685
666 mutex_unlock(&apply_lock); 686 mutex_unlock(&apply_lock);
667} 687}
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 25ef771b0a31..6e3e7a716838 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -430,8 +430,6 @@ struct omap_overlay_manager {
430 struct omap_dss_device *device; 430 struct omap_dss_device *device;
431 struct omap_overlay_manager_info info; 431 struct omap_overlay_manager_info info;
432 432
433 bool enabled;
434
435 bool device_changed; 433 bool device_changed;
436 /* if true, info has been changed but not applied() yet */ 434 /* if true, info has been changed but not applied() yet */
437 bool info_dirty; 435 bool info_dirty;