Skip to contentSkip to conversation

"typo" in "drm/nv50: cast IGP memory location to u64 before shifting"

PATCH Marcin Slusarz 2 participants 2 messages Jun 1, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi

This does not look right:

drivers/gpu/drm/nouveau/nouveau_mem.c +2 -1
index 775a701..c1fd42b 100644
@@ -540,7 +540,8 @@ nouveau_mem_detect(struct drm_device *dev)
 		dev_priv->vram_size  = nv_rd32(dev, NV04_FIFO_DATA);
 		dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK;
 		if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac)
-			dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12;
+			dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10);
+			dev_priv->vram_sys_base <<= 12;
 	}
 
 	NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20));

You forgot to add {} around these lines...

Marcin

#2 lore raw
In reply to a message not in the archive
Quoted 19 lines · Marcin Slusarz

Hi

This does not look right:

drivers/gpu/drm/nouveau/nouveau_mem.c +2 -1
index 775a701..c1fd42b 100644
@@ -540,7 +540,8 @@ nouveau_mem_detect(struct drm_device *dev)
 		dev_priv->vram_size  = nv_rd32(dev, NV04_FIFO_DATA);
 		dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK;
 		if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac)
-			dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12;
+			dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10);
+			dev_priv->vram_sys_base <<= 12;
 	}
 
 	NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20));
Quoted 1 line

You forgot to add {} around these lines...

Oops, fail. Luckily it doesn't actually matter at all in this case, but I've fixed it anyway.

Thanks!
Ben.

Quoted 7 lines

Marcin

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau