Skip to content

Commit

Permalink
OMAPDSS: APPLY: write fifo thresholds only if changed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Dec 2, 2011
1 parent 75ae118 commit 04576d4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,19 @@ static void dss_apply_ovl_enable(struct omap_overlay *ovl, bool enable)
op->extra_info_dirty = true;
}

static void dss_apply_ovl_fifo_thresholds(struct omap_overlay *ovl,
u32 fifo_low, u32 fifo_high)
{
struct ovl_priv_data *op = get_ovl_priv(ovl);

if (op->fifo_low == fifo_low && op->fifo_high == fifo_high)
return;

op->fifo_low = fifo_low;
op->fifo_high = fifo_high;
op->extra_info_dirty = true;
}

static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
{
struct ovl_priv_data *op = get_ovl_priv(ovl);
Expand Down Expand Up @@ -988,9 +1001,7 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
BUG();
}

op->fifo_low = fifo_low;
op->fifo_high = fifo_high;
op->extra_info_dirty = true;
dss_apply_ovl_fifo_thresholds(ovl, fifo_low, fifo_high);
}

static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)
Expand Down

0 comments on commit 04576d4

Please sign in to comment.