diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-03-18 09:45:20 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-04-09 10:12:02 +1000 |
commit | a76fb4e8ffe42144529e21fe1e609b762e8eb5cc (patch) | |
tree | 3215f63360ffb93d685582edeca2e48ee7646170 /drivers/gpu/drm/nouveau/nv40_fifo.c | |
parent | 952eb63543552deb1bf1113739d59d29172d7755 (diff) | |
download | blackbird-obmc-linux-a76fb4e8ffe42144529e21fe1e609b762e8eb5cc.tar.gz blackbird-obmc-linux-a76fb4e8ffe42144529e21fe1e609b762e8eb5cc.zip |
drm/nouveau: detect vram amount once, and save the value
As opposed to repeatedly reading the amount back from the GPU every
time we need to know the VRAM size.
We should now fail to load gracefully on detecting no VRAM, rather than
something potentially messy happening.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv40_fifo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv40_fifo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv40_fifo.c b/drivers/gpu/drm/nouveau/nv40_fifo.c index 6b2ef4a9fce1..500ccfd3a0b8 100644 --- a/drivers/gpu/drm/nouveau/nv40_fifo.c +++ b/drivers/gpu/drm/nouveau/nv40_fifo.c @@ -278,7 +278,7 @@ nv40_fifo_init_ramxx(struct drm_device *dev) default: nv_wr32(dev, 0x2230, 0); nv_wr32(dev, NV40_PFIFO_RAMFC, - ((nouveau_mem_fb_amount(dev) - 512 * 1024 + + ((dev_priv->vram_size - 512 * 1024 + dev_priv->ramfc_offset) >> 16) | (3 << 16)); break; } |