diff mbox

[1/2] drm: disconnect plane from fb/crtc when disabled

Message ID 1323829176-4543-1-git-send-email-rob.clark@linaro.org
State Accepted
Commit a9971157b6c550644fe19551c21f4b05f7e9475a
Headers show

Commit Message

Rob Clark Dec. 14, 2011, 2:19 a.m. UTC
From: Rob Clark <rob@ti.com>

Since plane->fb and plane->crtc are set in drm_mode_setplane()
after update_plane(), They should be cleared after disable().

Signed-off-by: Rob Clark <rob@ti.com>
---
 drivers/gpu/drm/drm_crtc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index e2c9386..6dad421 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -348,6 +348,9 @@  void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
 			ret = plane->funcs->disable_plane(plane);
 			if (ret)
 				DRM_ERROR("failed to disable plane with busy fb\n");
+			/* disconnect the plane from the fb and crtc: */
+			plane->fb = NULL;
+			plane->crtc = NULL;
 		}
 	}