Skip to content

Commit

Permalink
drm/tegra: hdmi: Make sure clock is enabled before dumping registers
Browse files Browse the repository at this point in the history
The debugfs register dumping function did not enable the HDMI clock.
This led to a possible system hang when reading the debugfs entry
while no HDMI cable was connected to the system. This patch makes
sure that the clock is enabled during the read.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Mikko Perttunen authored and Thierry Reding committed Aug 27, 2013
1 parent 3b2f64d commit ccaddfe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/host1x/drm/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
{
struct drm_info_node *node = s->private;
struct tegra_hdmi *hdmi = node->info_ent->data;
int err;

err = clk_enable(hdmi->clk);
if (err)
return err;

#define DUMP_REG(name) \
seq_printf(s, "%-56s %#05x %08lx\n", #name, name, \
Expand Down Expand Up @@ -1069,6 +1074,8 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)

#undef DUMP_REG

clk_disable(hdmi->clk);

return 0;
}

Expand Down

0 comments on commit ccaddfe

Please sign in to comment.