aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-08-30 09:27:16 -0400
committerThierry Reding <treding@nvidia.com>2013-09-03 04:10:13 -0400
commit03da0e7ba9e3a1fc700f60913ff6bcb19f7eac2a (patch)
tree471113ddf697587d085e5a9f6250e6535d9dd76f /drivers/gpu/host1x
parent57c6eb6f2cf89baef4188b4257b3e756f9aebef4 (diff)
drm/tegra: Parse device tree earlier
Parsing the device tree may cause probing to be deferred. Doing this as early as possible prevents any other resources from being requested and enabled, therefore reducing the need to cleanup on deferred probe while at the same time not wasting precious CPU cycles determining if probing needs to be deferred or not. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/drm/rgb.c14
1 files changed, 7 insertions, 7 deletions
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;