From patchwork Tue Feb 19 10:18:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2162391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id D4E973FDF1 for ; Tue, 19 Feb 2013 10:19:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D1ACEE60E8 for ; Tue, 19 Feb 2013 02:19:38 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 664C4E646B for ; Tue, 19 Feb 2013 02:18:13 -0800 (PST) Received: by mail-we0-f182.google.com with SMTP id t57so5515843wey.41 for ; Tue, 19 Feb 2013 02:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=L1LQG/ulTYttS3zP9gynik8zM+ZT9Bbx6Qk8zSw+sOE=; b=KYdAZyQ3f3rvZ+B0OnIRSZ/3cITzDDeSRG8zcXD4QmR0u+Lpk00ix299PnvxTFypAq 0vqI1gBBrfv1mlHaa6x2XqH2O6Hx8aJsvIfaZHidPBFQ4Khdpe4ldhtyZrWAIqLQJqYU gSou42gmiTOA+qmxyGNvczQMs9sUSC0qWeQKw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=L1LQG/ulTYttS3zP9gynik8zM+ZT9Bbx6Qk8zSw+sOE=; b=AepIlawHQMZtYYuKU8rY5ydFrd3wqviCdkGjVALeba8UHg45x5TmxiHQuStDxXMMTl JBVbXO/o18xVUdVOikW9/UiOjwYciDTQ2qIGFMHNFrjNBHxjs0hqvA9wxQ47zfey/VQs xVv9ioshfPWMO8NoQ39JrrFClOMfgaethVt6/qwxVj1C9Auab/WdtZ+D63LLumx4iNxD YZJTkzR3e+5qa3kMliW/wspd5h142xMslIfTbYn2G7jP474nKAsJjjUsppV3Ami2N1pT N9RoPLqqkl896XfhX1Te2CzRY/iouOqfuPwUdssBDDCaPjSfvbZVjI12v44mpK6q/bHv nQ5A== X-Received: by 10.194.242.69 with SMTP id wo5mr25039607wjc.10.1361269092359; Tue, 19 Feb 2013 02:18:12 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id j4sm22713974wiz.10.2013.02.19.02.18.10 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 02:18:11 -0800 (PST) From: Daniel Vetter To: Dave Airlie Subject: [PATCH] drm/cma-helper: fixup compilation Date: Tue, 19 Feb 2013 11:18:04 +0100 Message-Id: <1361269084-31767-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20130219074339.GA5456@avionic-0098.mockup.avionic-design.de> References: <20130219074339.GA5456@avionic-0098.mockup.avionic-design.de> X-Gm-Message-State: ALoCoQmZw8xl5+APY4CK3GehnY4mihbykrWyH2WCAUQk79FmP6aC4jYotsKOm2iiWzhwuReVVI8q Cc: Daniel Vetter , DRI Development X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org /me grabs a few brown paper bags So it looks like I've broken compilation in commit 6aed8ec3f76a22217c9ae183d32b1aa990bed069 Author: Daniel Vetter Date: Sun Jan 20 17:32:21 2013 +0100 drm: review locking for drm_fb_helper_restore_fbdev_mode Fix it up again. v2: Only deref fbdev_cma once we're sure it's non-NULL, noticed by Thierry Reding. Reported-by: Wu Fengguang Signed-off-by: Daniel Vetter Reviewed-by: Thierry Reding --- drivers/gpu/drm/drm_fb_cma_helper.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index e851658..1c8549d 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -377,10 +377,13 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_fini); */ void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma) { - drm_modeset_lock_all(dev); - if (fbdev_cma) + if (fbdev_cma) { + struct drm_device *dev = fbdev_cma->fb_helper.dev; + + drm_modeset_lock_all(dev); drm_fb_helper_restore_fbdev_mode(&fbdev_cma->fb_helper); - drm_modeset_unlock_all(dev); + drm_modeset_unlock_all(dev); + } } EXPORT_SYMBOL_GPL(drm_fbdev_cma_restore_mode);