Commit 69b136f2 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/imem/nv50: prevent fast-path for mapped objects when BAR isn't ready

Another piece of solving the "GP100 BAR2 VMM bootstrap" puzzle.

Without doing this, we'd attempt to write PDEs for the lower page table
levels through BAR2 before BAR2 access has been fully initialised.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent dfcbd550
......@@ -196,9 +196,11 @@ nv50_instobj_acquire(struct nvkm_memory *memory)
}
/* Attempt to get a direct CPU mapping of the object. */
if (!iobj->map && (vmm = nvkm_bar_bar2_vmm(imem->subdev.device)))
if ((vmm = nvkm_bar_bar2_vmm(imem->subdev.device))) {
if (!iobj->map)
nv50_instobj_kmap(iobj, vmm);
map = iobj->map;
}
if (!refcount_inc_not_zero(&iobj->maps)) {
if (map)
......
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