Skip to content

Commit

Permalink
drm/tegra: Parse device tree earlier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding committed Sep 3, 2013
1 parent 57c6eb6 commit 03da0e7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/gpu/host1x/drm/rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
if (!rgb)
return -ENOMEM;

rgb->output.dev = dc->dev;
rgb->output.of_node = np;

err = tegra_output_parse_dt(&rgb->output);
if (err < 0)
return err;

rgb->clk = devm_clk_get(dc->dev, NULL);
if (IS_ERR(rgb->clk)) {
dev_err(dc->dev, "failed to get clock\n");
Expand All @@ -165,13 +172,6 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
return err;
}

rgb->output.dev = dc->dev;
rgb->output.of_node = np;

err = tegra_output_parse_dt(&rgb->output);
if (err < 0)
return err;

dc->rgb = &rgb->output;

return 0;
Expand Down

0 comments on commit 03da0e7

Please sign in to comment.