Skip to content

Commit 03da0e7

Browse files
committed
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 <[email protected]>
1 parent 57c6eb6 commit 03da0e7

File tree

1 file changed

+7
-7
lines changed
  • drivers/gpu/host1x/drm

1 file changed

+7
-7
lines changed

drivers/gpu/host1x/drm/rgb.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
147147
if (!rgb)
148148
return -ENOMEM;
149149

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+
150157
rgb->clk = devm_clk_get(dc->dev, NULL);
151158
if (IS_ERR(rgb->clk)) {
152159
dev_err(dc->dev, "failed to get clock\n");
@@ -165,13 +172,6 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
165172
return err;
166173
}
167174

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-
175175
dc->rgb = &rgb->output;
176176

177177
return 0;

0 commit comments

Comments
 (0)