Commit bb7e501a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bar: prevent BAR2 mapping of objects during destructor

GP100's page table nests a lot more deeply than the GF100-compatible
layout we're currently using, which means our hackish-but-simple way
of dealing with BAR2 VMM teardown won't work anymore.

In order to sanely handle the chicken-and-egg (BAR2's PTs get mapped
into themselves) problem, we need prevent page tables getting mapped
back into BAR2 during the destruction of its VMM.

To do this, we simply key off the state that's now maintained by the
BAR2 init/fini functions.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a78dbce9
...@@ -43,7 +43,7 @@ nvkm_bar_bar2_vmm(struct nvkm_device *device) ...@@ -43,7 +43,7 @@ nvkm_bar_bar2_vmm(struct nvkm_device *device)
* to know when object access needs to go through the BAR0 window. * to know when object access needs to go through the BAR0 window.
*/ */
struct nvkm_bar *bar = device->bar; struct nvkm_bar *bar = device->bar;
if (bar && bar->func->bar2.vmm && bar->subdev.oneinit) if (bar && bar->bar2)
return bar->func->bar2.vmm(bar); return bar->func->bar2.vmm(bar);
return NULL; return NULL;
} }
......
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