Commit 494ab824 authored by Ben Skeggs's avatar Ben Skeggs

drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 2eb92c80
...@@ -63,9 +63,10 @@ nv50_instmem_init(struct drm_device *dev) ...@@ -63,9 +63,10 @@ nv50_instmem_init(struct drm_device *dev)
struct drm_nouveau_private *dev_priv = dev->dev_private; struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_channel *chan; struct nouveau_channel *chan;
uint32_t c_offset, c_size, c_ramfc, c_vmpd, c_base, pt_size; uint32_t c_offset, c_size, c_ramfc, c_vmpd, c_base, pt_size;
uint32_t save_nv001700;
uint64_t v;
struct nv50_instmem_priv *priv; struct nv50_instmem_priv *priv;
int ret, i; int ret, i;
uint32_t v, save_nv001700;
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) if (!priv)
...@@ -184,8 +185,8 @@ nv50_instmem_init(struct drm_device *dev) ...@@ -184,8 +185,8 @@ nv50_instmem_init(struct drm_device *dev)
i = 0; i = 0;
while (v < dev_priv->vram_sys_base + c_offset + c_size) { while (v < dev_priv->vram_sys_base + c_offset + c_size) {
BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, v); BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, lower_32_bits(v));
BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, 0x00000000); BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, upper_32_bits(v));
v += 0x1000; v += 0x1000;
i += 8; i += 8;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment