From: Thierry Reding Date: Sun, 18 Mar 2018 00:13:39 +0000 (+0100) Subject: drm/tegra: Shutdown on driver unbind X-Git-Tag: v4.14.45~225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92ab37923634609154d4dd7c7df13b80c345a1e8;p=platform%2Fkernel%2Flinux-exynos.git drm/tegra: Shutdown on driver unbind [ Upstream commit 192b4af6cd28cdad9b42fd79c21a90a2aeb0bec7 ] Since commit 846c7dfc1193 ("drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2."), removing the last framebuffer will no longer disable the corresponding pipeline, which causes the KMS core to complain about leaked connectors on driver unbind. Fix this by calling drm_atomic_helper_shutdown() on driver unbind, which will cause all display pipelines to be shut down and therefore drop the extra references on the connectors. Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 597d563..0598b4c 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -250,6 +250,7 @@ static void tegra_drm_unload(struct drm_device *drm) drm_kms_helper_poll_fini(drm); tegra_drm_fb_exit(drm); + drm_atomic_helper_shutdown(drm); drm_mode_config_cleanup(drm); err = host1x_device_exit(device);