aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-09-03 19:01:02 -0400
committerDave Airlie <airlied@redhat.com>2013-09-03 19:01:02 -0400
commitef25bd84edba73f78ce7397ef3d7b97e2774ed07 (patch)
tree091dc19c84161b5b9c359dc2f2efc40a52b4df75 /drivers/gpu/host1x/drm
parentf33bcab9e816c5bf56b74c3007790f2a256910eb (diff)
parent03da0e7ba9e3a1fc700f60913ff6bcb19f7eac2a (diff)
Merge tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/tegra: Changes for v3.12-rc1 Only a couple of small patches this time around. These are mostly fixes for minor bugs that showed up, but there is also some preparatory work that will come in handy for future patches. * tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: Parse device tree earlier gpu: host1x: Sort drivers by probe order gpu: host1x: Check for valid host1x pointer gpu: host1x: returning success instead of -ENOMEM gpu: host1x: fix an integer overflow check drm/tegra: hdmi: Make sure clock is enabled before dumping registers
Diffstat (limited to 'drivers/gpu/host1x/drm')
-rw-r--r--drivers/gpu/host1x/drm/hdmi.c7
-rw-r--r--drivers/gpu/host1x/drm/rgb.c14
2 files changed, 14 insertions, 7 deletions
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 52e3c9641a0f..644d95c7d489 100644
--- a/drivers/gpu/host1x/drm/hdmi.c
+++ b/drivers/gpu/host1x/drm/hdmi.c
@@ -888,6 +888,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
888{ 888{
889 struct drm_info_node *node = s->private; 889 struct drm_info_node *node = s->private;
890 struct tegra_hdmi *hdmi = node->info_ent->data; 890 struct tegra_hdmi *hdmi = node->info_ent->data;
891 int err;
892
893 err = clk_enable(hdmi->clk);
894 if (err)
895 return err;
891 896
892#define DUMP_REG(name) \ 897#define DUMP_REG(name) \
893 seq_printf(s, "%-56s %#05x %08lx\n", #name, name, \ 898 seq_printf(s, "%-56s %#05x %08lx\n", #name, name, \
@@ -1053,6 +1058,8 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
1053 1058
1054#undef DUMP_REG 1059#undef DUMP_REG
1055 1060
1061 clk_disable(hdmi->clk);
1062
1056 return 0; 1063 return 0;
1057} 1064}
1058 1065
diff --git a/drivers/gpu/host1x/drm/rgb.c b/drivers/gpu/host1x/drm/rgb.c
index ed4416f20260..5aa66ef7a946 100644
--- a/drivers/gpu/host1x/drm/rgb.c
+++ b/drivers/gpu/host1x/drm/rgb.c
@@ -147,6 +147,13 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
147 if (!rgb) 147 if (!rgb)
148 return -ENOMEM; 148 return -ENOMEM;
149 149
150 rgb->output.dev = dc->dev;
151 rgb->output.of_node = np;
152
153 err = tegra_output_parse_dt(&rgb->output);
154 if (err < 0)
155 return err;
156
150 rgb->clk = devm_clk_get(dc->dev, NULL); 157 rgb->clk = devm_clk_get(dc->dev, NULL);
151 if (IS_ERR(rgb->clk)) { 158 if (IS_ERR(rgb->clk)) {
152 dev_err(dc->dev, "failed to get clock\n"); 159 dev_err(dc->dev, "failed to get clock\n");
@@ -165,13 +172,6 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
165 return err; 172 return err;
166 } 173 }
167 174
168 rgb->output.dev = dc->dev;
169 rgb->output.of_node = np;
170
171 err = tegra_output_parse_dt(&rgb->output);
172 if (err < 0)
173 return err;
174
175 dc->rgb = &rgb->output; 175 dc->rgb = &rgb->output;
176 176
177 return 0; 177 return 0;