From: Ben Skeggs Date: Tue, 24 Jan 2012 01:03:14 +0000 (+1000) Subject: drm/nv50: fix detection of second vram rank X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ce71415587b1fd56f67294ac46f860b8b679b95;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/nv50: fix detection of second vram rank Goes a long way to correcting NVS295 memory reclocking issues. Signed-off-by: Ben Skeggs Signed-off-by: Martin Peres --- diff --git a/drivers/gpu/drm/nouveau/nv50_vram.c b/drivers/gpu/drm/nouveau/nv50_vram.c index a52b9a51e010..9ed9ae397d75 100644 --- a/drivers/gpu/drm/nouveau/nv50_vram.c +++ b/drivers/gpu/drm/nouveau/nv50_vram.c @@ -207,7 +207,7 @@ nv50_vram_init(struct drm_device *dev) break; } - dev_priv->vram_rank_B = (nv_rd32(dev, NV04_PFB_CFG0) & 0x100) >> 8; + dev_priv->vram_rank_B = !!(nv_rd32(dev, 0x100200) & 0x4); dev_priv->vram_size = nv_rd32(dev, 0x10020c); dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32; dev_priv->vram_size &= 0xffffffff00ULL;