Skip to content

Commit

Permalink
OMAPDSS: HDMI: Add locking for hdmi interface set timing functions
Browse files Browse the repository at this point in the history
The hdmi interface driver exposes functions to the hdmi panel driver to
configure the interface timings maintained by the hdmi driver.

These timings(stored in hdmi.ip_data.cfg) should be protected by the hdmi lock
to ensure they are called sequentially, this is similar to how hdmi enable and
disable functions need locking.

Signed-off-by: Archit Taneja <archit@ti.com>
  • Loading branch information
Archit Taneja committed Aug 15, 2012
1 parent 7849398 commit ed1aa90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
struct hdmi_cm cm;
const struct hdmi_config *t;

mutex_lock(&hdmi.lock);

cm = hdmi_get_code(timings);
hdmi.ip_data.cfg.cm = cm;

Expand All @@ -579,6 +581,8 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
} else {
dss_mgr_set_timings(dssdev->manager, &t->timings);
}

mutex_unlock(&hdmi.lock);
}

static void hdmi_dump_regs(struct seq_file *s)
Expand Down

0 comments on commit ed1aa90

Please sign in to comment.