Skip to content

Commit f552f95

Browse files
thierryredinggregkh
authored andcommitted
drm/tegra: dc: Restore coupling of display controllers
commit a31500f upstream. Coupling of display controllers used to rely on runtime PM to take the companion controller out of reset. Commit fd67e9c ("drm/tegra: Do not implement runtime PM") accidentally broke this when runtime PM was removed. Restore this functionality by reusing the hierarchical host1x client suspend/resume infrastructure that's similar to runtime PM and which perfectly fits this use-case. Fixes: fd67e9c ("drm/tegra: Do not implement runtime PM") Reported-by: Dmitry Osipenko <digetx@gmail.com> Reported-by: Paul Fertser <fercerpav@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 77a8e6f commit f552f95

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

  • drivers/gpu/drm/tegra

drivers/gpu/drm/tegra/dc.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,22 +2499,18 @@ static int tegra_dc_couple(struct tegra_dc *dc)
24992499
* POWER_CONTROL registers during CRTC enabling.
25002500
*/
25012501
if (dc->soc->coupled_pm && dc->pipe == 1) {
2502-
u32 flags = DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_CONSUMER;
2503-
struct device_link *link;
2504-
struct device *partner;
2502+
struct device *companion;
2503+
struct tegra_dc *parent;
25052504

2506-
partner = driver_find_device(dc->dev->driver, NULL, NULL,
2507-
tegra_dc_match_by_pipe);
2508-
if (!partner)
2505+
companion = driver_find_device(dc->dev->driver, NULL, (const void *)0,
2506+
tegra_dc_match_by_pipe);
2507+
if (!companion)
25092508
return -EPROBE_DEFER;
25102509

2511-
link = device_link_add(dc->dev, partner, flags);
2512-
if (!link) {
2513-
dev_err(dc->dev, "failed to link controllers\n");
2514-
return -EINVAL;
2515-
}
2510+
parent = dev_get_drvdata(companion);
2511+
dc->client.parent = &parent->client;
25162512

2517-
dev_dbg(dc->dev, "coupled to %s\n", dev_name(partner));
2513+
dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion));
25182514
}
25192515

25202516
return 0;

0 commit comments

Comments
 (0)