summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/dc.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-08-30 17:41:00 +0200
committerThierry Reding <treding@nvidia.com>2017-10-20 14:19:54 +0200
commita2f2f7403e1ea192ce79584d7050c46e455409dd (patch)
treeb303ec55ecd6a5cae2f5b1fa11fa2e8a8cd9fedb /drivers/gpu/drm/tegra/dc.c
parent39e08affecf0998be1b01f4752016e33fa98eb9a (diff)
downloadlinux-a2f2f7403e1ea192ce79584d7050c46e455409dd.tar.gz
drm/tegra: dc: Perform a complete reset sequence
In order for the reset to be applied properly, the module clock must be enabled during the assertion. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.c')
-rw-r--r--drivers/gpu/drm/tegra/dc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index d5a63230e509..24a5ef4f5bb8 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1997,8 +1997,22 @@ static int tegra_dc_probe(struct platform_device *pdev)
return PTR_ERR(dc->rst);
}
- if (!dc->soc->broken_reset)
- reset_control_assert(dc->rst);
+ /* assert reset and disable clock */
+ if (!dc->soc->broken_reset) {
+ err = clk_prepare_enable(dc->clk);
+ if (err < 0)
+ return err;
+
+ usleep_range(2000, 4000);
+
+ err = reset_control_assert(dc->rst);
+ if (err < 0)
+ return err;
+
+ usleep_range(2000, 4000);
+
+ clk_disable_unprepare(dc->clk);
+ }
if (dc->soc->has_powergate) {
if (dc->pipe == 0)