aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-26 07:39:16 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:59 -0500
commit04576d415e01aa08752bf3884db9862cfbba9115 (patch)
tree6576d073235f8f1fc591e1f895e79641c30726f3 /drivers/video
parent75ae118a0028810f93a746c25f4bb018fb044323 (diff)
OMAPDSS: APPLY: write fifo thresholds only if changed
Current code will always write fifo threshold values to the register, even if they are the same as previously. Separate the setting of fifo fields into a separate function, and only set new values if they are different than the old ones. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/apply.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 5f5812b528de..a3c75f582e1f 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -953,6 +953,19 @@ static void dss_apply_ovl_enable(struct omap_overlay *ovl, bool enable)
953 op->extra_info_dirty = true; 953 op->extra_info_dirty = true;
954} 954}
955 955
956static void dss_apply_ovl_fifo_thresholds(struct omap_overlay *ovl,
957 u32 fifo_low, u32 fifo_high)
958{
959 struct ovl_priv_data *op = get_ovl_priv(ovl);
960
961 if (op->fifo_low == fifo_low && op->fifo_high == fifo_high)
962 return;
963
964 op->fifo_low = fifo_low;
965 op->fifo_high = fifo_high;
966 op->extra_info_dirty = true;
967}
968
956static void dss_ovl_setup_fifo(struct omap_overlay *ovl) 969static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
957{ 970{
958 struct ovl_priv_data *op = get_ovl_priv(ovl); 971 struct ovl_priv_data *op = get_ovl_priv(ovl);
@@ -988,9 +1001,7 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
988 BUG(); 1001 BUG();
989 } 1002 }
990 1003
991 op->fifo_low = fifo_low; 1004 dss_apply_ovl_fifo_thresholds(ovl, fifo_low, fifo_high);
992 op->fifo_high = fifo_high;
993 op->extra_info_dirty = true;
994} 1005}
995 1006
996static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr) 1007static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)