Skip to content

Commit

Permalink
OMAPDSS: clean up dss_mgr_set_timings
Browse files Browse the repository at this point in the history
dss_mgr_set_timings() can only be called when the output is not active.
This means that most of the code in the function is extra, as there's no
need to write the values to registers, etc, because that will be handled
when the output will be enabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Sep 7, 2012
1 parent aba9657 commit fed62e5
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,21 +1314,19 @@ void dss_mgr_set_timings(struct omap_overlay_manager *mgr,
const struct omap_video_timings *timings)
{
unsigned long flags;

mutex_lock(&apply_lock);
struct mgr_priv_data *mp = get_mgr_priv(mgr);

spin_lock_irqsave(&data_lock, flags);

dss_apply_mgr_timings(mgr, timings);

dss_write_regs();
dss_set_go_bits();
if (mp->updating) {
DSSERR("cannot set timings for %s: manager needs to be disabled\n",
mgr->name);
goto out;
}

dss_apply_mgr_timings(mgr, timings);
out:
spin_unlock_irqrestore(&data_lock, flags);

wait_pending_extra_info_updates();

mutex_unlock(&apply_lock);
}

static void dss_apply_mgr_lcd_config(struct omap_overlay_manager *mgr,
Expand Down

0 comments on commit fed62e5

Please sign in to comment.