aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2013-07-30 04:35:03 -0400
committerThierry Reding <treding@nvidia.com>2013-08-27 04:19:39 -0400
commitccaddfe1a2e10f50aa6f553f9791c2724b6d3c4a (patch)
treeb882e56d3bc1a777d9785fe760e0789bc7cee8b2
parent3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (diff)
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 <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/host1x/drm/hdmi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 01097da09f7f..bf7f02743419 100644
--- a/drivers/gpu/host1x/drm/hdmi.c
+++ b/drivers/gpu/host1x/drm/hdmi.c
@@ -904,6 +904,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
904{ 904{
905 struct drm_info_node *node = s->private; 905 struct drm_info_node *node = s->private;
906 struct tegra_hdmi *hdmi = node->info_ent->data; 906 struct tegra_hdmi *hdmi = node->info_ent->data;
907 int err;
908
909 err = clk_enable(hdmi->clk);
910 if (err)
911 return err;
907 912
908#define DUMP_REG(name) \ 913#define DUMP_REG(name) \
909 seq_printf(s, "%-56s %#05x %08lx\n", #name, name, \ 914 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)
1069 1074
1070#undef DUMP_REG 1075#undef DUMP_REG
1071 1076
1077 clk_disable(hdmi->clk);
1078
1072 return 0; 1079 return 0;
1073} 1080}
1074 1081