aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-16 08:25:53 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:50 -0500
commit841c09c7975c67fe7741564d98265de28a5764d0 (patch)
treea697afd2e683f9ad686b3697ecc79ed5ea71370f /drivers/video
parentff4733dcf56480bebcd3801adde27213b893635d (diff)
OMAPDSS: APPLY: add dss_apply_ovl_enable()
Add a helper function dss_apply_ovl_enable(), which is similar to the main apply() function: dss_apply_ovl_enable() applies the given overlay enable-status to ovl_priv_data, and sets the dirty flag. The difference between the helper function and the previous direct use of the fields is that the helper function will not do anything if the enable state is already the same as given in the parameter. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/apply.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 70154092d731..ec2183721642 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -646,6 +646,19 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
646 return r; 646 return r;
647} 647}
648 648
649static void dss_apply_ovl_enable(struct omap_overlay *ovl, bool enable)
650{
651 struct ovl_priv_data *op;
652
653 op = get_ovl_priv(ovl);
654
655 if (op->enabled == enable)
656 return;
657
658 op->enabled = enable;
659 op->extra_info_dirty = true;
660}
661
649static void dss_ovl_setup_fifo(struct omap_overlay *ovl) 662static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
650{ 663{
651 struct ovl_priv_data *op = get_ovl_priv(ovl); 664 struct ovl_priv_data *op = get_ovl_priv(ovl);
@@ -999,8 +1012,7 @@ int dss_ovl_enable(struct omap_overlay *ovl)
999 1012
1000 spin_lock_irqsave(&data_lock, flags); 1013 spin_lock_irqsave(&data_lock, flags);
1001 1014
1002 op->enabled = true; 1015 dss_apply_ovl_enable(ovl, true);
1003 op->extra_info_dirty = true;
1004 1016
1005 dss_ovl_setup_fifo(ovl); 1017 dss_ovl_setup_fifo(ovl);
1006 1018
@@ -1031,8 +1043,7 @@ int dss_ovl_disable(struct omap_overlay *ovl)
1031 1043
1032 spin_lock_irqsave(&data_lock, flags); 1044 spin_lock_irqsave(&data_lock, flags);
1033 1045
1034 op->enabled = false; 1046 dss_apply_ovl_enable(ovl, false);
1035 op->extra_info_dirty = true;
1036 1047
1037 dss_write_regs(); 1048 dss_write_regs();
1038 1049