aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/apply.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index ec2183721642..27d13bd9ed10 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -724,6 +724,9 @@ void dss_mgr_enable(struct omap_overlay_manager *mgr)
724 724
725 mutex_lock(&apply_lock); 725 mutex_lock(&apply_lock);
726 726
727 if (mp->enabled)
728 goto out;
729
727 spin_lock_irqsave(&data_lock, flags); 730 spin_lock_irqsave(&data_lock, flags);
728 731
729 mp->enabled = true; 732 mp->enabled = true;
@@ -740,6 +743,7 @@ void dss_mgr_enable(struct omap_overlay_manager *mgr)
740 if (!mgr_manual_update(mgr)) 743 if (!mgr_manual_update(mgr))
741 dispc_mgr_enable(mgr->id, true); 744 dispc_mgr_enable(mgr->id, true);
742 745
746out:
743 mutex_unlock(&apply_lock); 747 mutex_unlock(&apply_lock);
744} 748}
745 749
@@ -750,6 +754,9 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
750 754
751 mutex_lock(&apply_lock); 755 mutex_lock(&apply_lock);
752 756
757 if (!mp->enabled)
758 goto out;
759
753 if (!mgr_manual_update(mgr)) 760 if (!mgr_manual_update(mgr))
754 dispc_mgr_enable(mgr->id, false); 761 dispc_mgr_enable(mgr->id, false);
755 762
@@ -760,6 +767,7 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
760 767
761 spin_unlock_irqrestore(&data_lock, flags); 768 spin_unlock_irqrestore(&data_lock, flags);
762 769
770out:
763 mutex_unlock(&apply_lock); 771 mutex_unlock(&apply_lock);
764} 772}
765 773
@@ -1005,6 +1013,11 @@ int dss_ovl_enable(struct omap_overlay *ovl)
1005 1013
1006 mutex_lock(&apply_lock); 1014 mutex_lock(&apply_lock);
1007 1015
1016 if (op->enabled) {
1017 r = 0;
1018 goto err;
1019 }
1020
1008 if (ovl->manager == NULL || ovl->manager->device == NULL) { 1021 if (ovl->manager == NULL || ovl->manager->device == NULL) {
1009 r = -EINVAL; 1022 r = -EINVAL;
1010 goto err; 1023 goto err;
@@ -1036,6 +1049,11 @@ int dss_ovl_disable(struct omap_overlay *ovl)
1036 1049
1037 mutex_lock(&apply_lock); 1050 mutex_lock(&apply_lock);
1038 1051
1052 if (!op->enabled) {
1053 r = 0;
1054 goto err;
1055 }
1056
1039 if (ovl->manager == NULL || ovl->manager->device == NULL) { 1057 if (ovl->manager == NULL || ovl->manager->device == NULL) {
1040 r = -EINVAL; 1058 r = -EINVAL;
1041 goto err; 1059 goto err;