浏览代码

drm/nvc0/fifo: avoid touching missing subfifos

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 14 年之前
父节点
当前提交
3dcbb02b3a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/nouveau/nvc0_fifo.c

+ 1 - 1
drivers/gpu/drm/nouveau/nvc0_fifo.c

@@ -322,7 +322,7 @@ nvc0_fifo_init(struct drm_device *dev)
 	}
 
 	/* PSUBFIFO[n] */
-	for (i = 0; i < 3; i++) {
+	for (i = 0; i < priv->spoon_nr; i++) {
 		nv_mask(dev, 0x04013c + (i * 0x2000), 0x10000100, 0x00000000);
 		nv_wr32(dev, 0x040108 + (i * 0x2000), 0xffffffff); /* INTR */
 		nv_wr32(dev, 0x04010c + (i * 0x2000), 0xfffffeff); /* INTR_EN */