[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1375173303-4275-1-git-send-email-mperttunen@nvidia.com>
Date: Tue, 30 Jul 2013 11:35:03 +0300
From: Mikko Perttunen <mperttunen@...dia.com>
To: <thierry.reding@...il.com>
CC: <tbergstrom@...dia.com>, <dri-devel@...ts.freedesktop.org>,
<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Mikko Perttunen <mperttunen@...dia.com>
Subject: [PATCH] host1x: 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@...dia.com>
---
drivers/gpu/host1x/drm/hdmi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 01097da..bf7f027 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)
{
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, \
@@ -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;
}
--
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists