diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 18:18:23 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-26 19:20:04 -0400 |
commit | 9617757fb3dc6274b42afd2dcaa4fbc3ef6db98b (patch) | |
tree | f85025a4132a80b89faf5d431b3ae25890da25f2 /drivers/gpu/drm/nouveau | |
parent | 9a11dd65875f9e2401ded5d9a777574eacab814c (diff) |
drm/nouveau: fix fetching vbios from above 4GiB vram addresses
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index ff339df6f007..1aa73d3957e1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -135,13 +135,14 @@ static void load_vbios_pramin(struct drm_device *dev, uint8_t *data) | |||
135 | int i; | 135 | int i; |
136 | 136 | ||
137 | if (dev_priv->card_type >= NV_50) { | 137 | if (dev_priv->card_type >= NV_50) { |
138 | uint32_t vbios_vram = (nv_rd32(dev, 0x619f04) & ~0xff) << 8; | 138 | u64 addr = (u64)(nv_rd32(dev, 0x619f04) & 0xffffff00) << 8; |
139 | 139 | if (!addr) { | |
140 | if (!vbios_vram) | 140 | addr = (u64)nv_rd32(dev, 0x1700) << 16; |
141 | vbios_vram = (nv_rd32(dev, 0x1700) << 16) + 0xf0000; | 141 | addr += 0xf0000; |
142 | } | ||
142 | 143 | ||
143 | old_bar0_pramin = nv_rd32(dev, 0x1700); | 144 | old_bar0_pramin = nv_rd32(dev, 0x1700); |
144 | nv_wr32(dev, 0x1700, vbios_vram >> 16); | 145 | nv_wr32(dev, 0x1700, addr >> 16); |
145 | } | 146 | } |
146 | 147 | ||
147 | /* bail if no rom signature */ | 148 | /* bail if no rom signature */ |