From patchwork Wed Dec 14 02:19:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 5649 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5805C23E19 for ; Wed, 14 Dec 2011 02:20:46 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4E5ECA183B5 for ; Wed, 14 Dec 2011 02:20:46 +0000 (UTC) Received: by eaa13 with SMTP id 13so448585eaa.11 for ; Tue, 13 Dec 2011 18:20:46 -0800 (PST) Received: by 10.205.120.135 with SMTP id fy7mr132948bkc.54.1323829181827; Tue, 13 Dec 2011 18:19:41 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs98702bkc; Tue, 13 Dec 2011 18:19:41 -0800 (PST) Received: by 10.236.200.164 with SMTP id z24mr8134791yhn.127.1323829180090; Tue, 13 Dec 2011 18:19:40 -0800 (PST) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id w15si393896anm.102.2011.12.13.18.19.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 18:19:40 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.213.50 as permitted sender) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.213.50 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by yhoo22 with SMTP id o22so1027941yho.37 for ; Tue, 13 Dec 2011 18:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=PE2/cbCBH1IQ8/EtzWCWisCfhtIYeCRkjAtiaAVgpIE=; b=cr/xVC8VtWYzYA0fbCy37c9Kn2exZ1TkYudYw3oWkYNs+tsc2NkziI4ICkbD4Be5Dh fm5xMwvcusgIY0g3X78JrZN8nSFui7aOhDZN3wK1CfLr2oUeI5oRSCaH0PzOb2h8BlGy mm3PHuvtv1wKENRA3K9qetXb7GR7N30g5D9T4= Received: by 10.236.200.201 with SMTP id z49mr8275933yhn.20.1323829179466; Tue, 13 Dec 2011 18:19:39 -0800 (PST) Received: from localhost (ppp-70-253-156-7.dsl.rcsntx.swbell.net. [70.253.156.7]) by mx.google.com with ESMTPS id o9sm1549262yhk.20.2011.12.13.18.19.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 18:19:39 -0800 (PST) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, 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> X-Mailer: git-send-email 1.7.5.4 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; } }