From patchwork Mon Oct 1 08:00:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ortwin_Gl=C3=BCck?= X-Patchwork-Id: 1532061 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 4DF413FE80 for ; Mon, 1 Oct 2012 17:46:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E4949EF3E for ; Mon, 1 Oct 2012 10:46:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1080 seconds by postgrey-1.32 at gabe; Mon, 01 Oct 2012 10:19:03 CEST Received: from fep33.mx.upcmail.net (fep33.mx.upcmail.net [62.179.121.51]) by gabe.freedesktop.org (Postfix) with ESMTP id DB9019E908 for ; Mon, 1 Oct 2012 01:19:03 -0700 (PDT) Received: from edge01.upcmail.net ([192.168.13.236]) by viefep13-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20121001080101.EPDG3518.viefep13-int.chello.at@edge01.upcmail.net>; Mon, 1 Oct 2012 10:01:01 +0200 Received: from gandalf.odi.ch ([178.83.228.246]) by edge01.upcmail.net with edge id 5k101k00B5KcffW01k10Bz; Mon, 01 Oct 2012 10:01:01 +0200 X-SourceIP: 178.83.228.246 X-Authenticated-Sender: odi.ch@hispeed.ch Received: from [10.11.1.181] (cvs.logobject.ch [81.7.230.226]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gandalf.odi.ch (Postfix) with ESMTPSA id 1FEA1460028; Mon, 1 Oct 2012 10:00:59 +0200 (CEST) Message-ID: <50694DBA.6050702@odi.ch> Date: Mon, 01 Oct 2012 10:00:58 +0200 From: =?ISO-8859-1?Q?Ortwin_Gl=FCck?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120824 Thunderbird/10.0.7 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/nouveau: fix crash regression X-Mailman-Approved-At: Mon, 01 Oct 2012 10:45:59 -0700 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: , 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 Work around a crash during boot if noaccel is set. NB: still broken in 3.5 as well, used to work in 3.4. Why are people ignoring this? It's a regression! Signed-off-by: Ortwin Glück --- continue; diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index b244d99..c7ffa63 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -650,6 +650,12 @@ nv50_display_vblank_crtc_handler(struct drm_device *dev, int crtc) struct nouveau_software_priv *psw = nv_engine(dev, NVOBJ_ENGINE_SW); struct nouveau_software_chan *pch, *tmp; + if (!psw) { + WARN_ON_ONCE(1); + printk(KERN_ERR "NULL software engine\n"); + return; + } + list_for_each_entry_safe(pch, tmp, &psw->vblank, vblank.list) { if (pch->vblank.head != crtc)