drm/nouveau: init vblank requests list
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Wed, 25 Jul 2012 18:42:05 +0000 (20:42 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 26 Jul 2012 00:28:16 +0000 (10:28 +1000)
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 <odi@odi.ch>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@vger.kernel.org [3.5]
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_irq.c
drivers/gpu/drm/nouveau/nouveau_software.h

index 03da38373552b69809d101e8db34b77d756c69b0..4f2cc95ce26498e9df3fa389908ccd6e542b2a1d 100644 (file)
@@ -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;
index 868c7fd74854dae082581177858a48fe847b1ff1..b2c2937531a80e04854f287ca904369d346e148b 100644 (file)
 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
index 9914cf154f6542ab4b9de14011c838b641e0eb82..709e5ac680ec8356ea5b5c4b4ba61bf5ae9c4480 100644 (file)
@@ -23,6 +23,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