From: Rob Clark Subject: [PATCH 1/2] drm: disconnect plane from fb/crtc when disabled Date: Tue, 13 Dec 2011 20:19:35 -0600 Message-ID: <1323829176-4543-1-git-send-email-rob.clark@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id E5E67A0940 for ; Tue, 13 Dec 2011 18:19:39 -0800 (PST) Received: by yenl2 with SMTP id l2so273223yen.36 for ; Tue, 13 Dec 2011 18:19:39 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Rob Clark , patches@linaro.org List-Id: dri-devel@lists.freedesktop.org From: Rob Clark 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 --- drivers/gpu/drm/drm_crtc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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; } } -- 1.7.5.4