aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index 38f30270cb9f..adac4da98f7e 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -182,16 +182,17 @@ nv50_instmem_init(struct drm_device *dev)
182 nv_wr32(dev, 0x001704, 0x40000000 | (chan->ramin->vinst >> 12)); 182 nv_wr32(dev, 0x001704, 0x40000000 | (chan->ramin->vinst >> 12));
183 nv_wr32(dev, 0x00170c, 0x80000000 | (priv->bar3_dmaobj->cinst >> 4)); 183 nv_wr32(dev, 0x00170c, 0x80000000 | (priv->bar3_dmaobj->cinst >> 4));
184 184
185 tmp = nv_ri32(dev, 0); 185 dev_priv->engine.instmem.flush(dev);
186 nv_wi32(dev, 0, ~tmp); 186 dev_priv->ramin_available = true;
187 if (nv_ri32(dev, 0) != ~tmp) { 187
188 tmp = nv_ro32(chan->ramin, 0);
189 nv_wo32(chan->ramin, 0, ~tmp);
190 if (nv_ro32(chan->ramin, 0) != ~tmp) {
188 NV_ERROR(dev, "PRAMIN readback failed\n"); 191 NV_ERROR(dev, "PRAMIN readback failed\n");
189 ret = -EIO; 192 ret = -EIO;
190 goto error; 193 goto error;
191 } 194 }
192 nv_wi32(dev, 0, tmp); 195 nv_wo32(chan->ramin, 0, tmp);
193
194 dev_priv->ramin_available = true;
195 196
196 /* BAR1 */ 197 /* BAR1 */
197 ret = nouveau_vm_new(dev, BAR1_VM_BASE, BAR1_VM_SIZE, BAR1_VM_BASE, 198 ret = nouveau_vm_new(dev, BAR1_VM_BASE, BAR1_VM_SIZE, BAR1_VM_BASE,