drm/nv50: initialize ramht_refs list for faked 0 channel
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sun, 22 Aug 2010 18:54:08 +0000 (20:54 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Sep 2010 22:23:51 +0000 (08:23 +1000)
We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
because nouveau_fifo_swmthd looks for matching gpuobj in
ramht_refs list.
It fixes kernel panic in nouveau_gpuobj_ref_find.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_instmem.c

index c95bf9b..91ef93c 100644 (file)
@@ -139,6 +139,8 @@ nv50_instmem_init(struct drm_device *dev)
        chan->file_priv = (struct drm_file *)-2;
        dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
 
+       INIT_LIST_HEAD(&chan->ramht_refs);
+
        /* Channel's PRAMIN object + heap */
        ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
                                                        NULL, &chan->ramin);