From patchwork Fri Aug 24 14:52:54 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: 1371911 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 2B0283FC81 for ; Fri, 24 Aug 2012 15:56:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04EB09E8B6 for ; Fri, 24 Aug 2012 08:56:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fep13.mx.upcmail.net (fep13.mx.upcmail.net [62.179.121.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DFC7A0E48 for ; Fri, 24 Aug 2012 07:53:14 -0700 (PDT) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep13-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120824145312.SLZN3518.viefep13-int.chello.at@edge04.upcmail.net>; Fri, 24 Aug 2012 16:53:12 +0200 Received: from gandalf.odi.ch ([178.83.228.246]) by edge04.upcmail.net with edge id qetA1j03o5KcffW04etBxz; Fri, 24 Aug 2012 16:53:12 +0200 X-SourceIP: 178.83.228.246 X-Authenticated-Sender: odi.ch@hispeed.ch Received: from [10.11.1.200] (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 7A9AB463101; Fri, 24 Aug 2012 16:53:10 +0200 (CEST) Message-ID: <50379546.6070802@odi.ch> Date: Fri, 24 Aug 2012 16:52:54 +0200 From: =?ISO-8859-1?Q?Ortwin_Gl=FCck?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: drm/nouveau: Work around a crash during boot if noaccel is set. X-Mailman-Approved-At: Fri, 24 Aug 2012 08:49:51 -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 NB: still broken in 3.5 as well. 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)