Skip to content

Commit ccaddfe

Browse files
cyndisthierryreding
authored andcommitted
drm/tegra: hdmi: Make sure clock is enabled before dumping registers
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 3b2f64d commit ccaddfe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/host1x/drm/hdmi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
904904
{
905905
struct drm_info_node *node = s->private;
906906
struct tegra_hdmi *hdmi = node->info_ent->data;
907+
int err;
908+
909+
err = clk_enable(hdmi->clk);
910+
if (err)
911+
return err;
907912

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

10701075
#undef DUMP_REG
10711076

1077+
clk_disable(hdmi->clk);
1078+
10721079
return 0;
10731080
}
10741081

0 commit comments

Comments
 (0)