From patchwork Wed Jul 25 18:42:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marcin_=C5=9Alusarz?= X-Patchwork-Id: 1239211 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 42BC73FD4F for ; Wed, 25 Jul 2012 18:43:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32C7FA0EBD for ; Wed, 25 Jul 2012 11:43:01 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com [209.85.214.49]) by gabe.freedesktop.org (Postfix) with ESMTP id A8D21A0EAB for ; Wed, 25 Jul 2012 11:41:55 -0700 (PDT) Received: by bkcji2 with SMTP id ji2so760884bkc.36 for ; Wed, 25 Jul 2012 11:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Ya6WE7HQcPduNeqdHr7auOEENhvRD2ojowWKAgL8I8E=; b=nUVOV89D+Y/r78xnajeDH3Hp0l871RjNjWcSgPvlRe+Gew6IvnK/td099mD9WfGau/ fCmqr9SW2OdwhdsDRLQ3Su03EEIWfs4C/zwTicuUs5DBoPaGzIom2qGwQn96C6pZxkyA MfIzsWlQlOA6NTX8cFIJ/snEUjTLXqQAL/rfPlz9873p3GHf6S9KS+fuWqd5gk5aP/dv GzjVetezljhEz667qkYiWmo5TkziEe+PQLHA651S4dwamvvYIgE/T9yNmt3kbZOhS1CB U0BaGZNknhJgHWnyqJ7eiFsRdKVyQEbmV/udksj+Wx7xGhad+AdHrQ7J+joA9cE716Ox Nv8g== Received: by 10.205.117.141 with SMTP id fm13mr12872513bkc.125.1343241714589; Wed, 25 Jul 2012 11:41:54 -0700 (PDT) Received: from joi.lan (bfq251.neoplus.adsl.tpnet.pl. [83.28.54.251]) by mx.google.com with ESMTPS id n5sm13422008bkv.14.2012.07.25.11.41.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jul 2012 11:41:53 -0700 (PDT) Date: Wed, 25 Jul 2012 20:42:05 +0200 From: Marcin Slusarz To: Ortwin =?utf-8?B?R2zDvGNr?= Subject: Re: drm/nouveau: crash regression in 3.5 Message-ID: <20120725184205.GA3119@joi.lan> References: <500D916A.60703@odi.ch> <20120724170002.GA3129@joi.lan> <500ED9EC.5040309@odi.ch> <20120724205746.GA8707@joi.lan> <500FB279.1020904@odi.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <500FB279.1020904@odi.ch> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: airlied@redhat.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bskeggs@redhat.com 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 On Wed, Jul 25, 2012 at 10:46:49AM +0200, Ortwin Glück wrote: > > Does it work if you boot without X and modprobe nouveau manually? If it does, > > can you disable page flipping in xorg.conf (Option "PageFlip" "0" in nouveau > > device section) and recheck with X? > > It happens long before X, when the nouveau module is loaded. > > > Does it work if you disable acceleration (nouveau.noaccel=1 in kernel command > > line)? > > nouveau.noaccel=1 is already on my cmdline as running X with accel > enabled never worked anyway. > > > Is there anything saved in /var/log/ from previous boot? Can you ssh > > into and check dmesg? Can you use netconsole and catch full log? > > Thanks for the netconsole tip. I have attached the log. > Good, below patch should fix this panic. Note that you can hit an oops in drm_handle_vblank because patch from http://lists.freedesktop.org/archives/dri-devel/2012-May/023498.html has not been applied (yet?). --- From: Marcin Slusarz Date: Wed, 25 Jul 2012 20:07:22 +0200 Subject: [PATCH] drm/nouveau: init vblank requests list Fixes kernel panic when vblank interrupt triggers before first sync to vblank request. (Besides init, remove some relevant leftovers from vblank rework) Reported-by: Ortwin Glück Signed-off-by: Marcin Slusarz Cc: stable@vger.kernel.org [3.5] --- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 -- drivers/gpu/drm/nouveau/nouveau_irq.c | 4 ---- drivers/gpu/drm/nouveau/nouveau_software.h | 1 + 3 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 8613cb2..b863a3a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -689,8 +689,6 @@ struct drm_nouveau_private { void (*irq_handler[32])(struct drm_device *); bool msi_enabled; - struct list_head vbl_waiting; - struct { struct drm_global_reference mem_global_ref; struct ttm_bo_global_ref bo_global_ref; diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c index 868c7fd..b2c2937 100644 --- a/drivers/gpu/drm/nouveau/nouveau_irq.c +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c @@ -41,12 +41,8 @@ void nouveau_irq_preinstall(struct drm_device *dev) { - struct drm_nouveau_private *dev_priv = dev->dev_private; - /* Master disable */ nv_wr32(dev, NV03_PMC_INTR_EN_0, 0); - - INIT_LIST_HEAD(&dev_priv->vbl_waiting); } int diff --git a/drivers/gpu/drm/nouveau/nouveau_software.h b/drivers/gpu/drm/nouveau/nouveau_software.h index e60bc6c..b507a92 100644 --- a/drivers/gpu/drm/nouveau/nouveau_software.h +++ b/drivers/gpu/drm/nouveau/nouveau_software.h @@ -38,6 +38,7 @@ static inline void nouveau_software_context_new(struct nouveau_software_chan *pch) { INIT_LIST_HEAD(&pch->flip); + INIT_LIST_HEAD(&pch->vblank.list); } static inline void