summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-10-31 18:56:19 +0100
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 04:32:18 +0100
commitbb7e501a661f820788279063fd9e225bbe9c38e9 (patch)
tree880bb983833a426ab9e1e56301717e5a0027c299 /drivers/gpu/drm/nouveau/nvkm
parentdrm/nouveau/bar: modify interface to bar2 vmm mapping (diff)
downloadlinux-bb7e501a661f820788279063fd9e225bbe9c38e9.tar.xz
linux-bb7e501a661f820788279063fd9e225bbe9c38e9.zip
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: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
index d600aafae315..c8cb8b8b1323 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
@@ -43,7 +43,7 @@ nvkm_bar_bar2_vmm(struct nvkm_device *device)
* to know when object access needs to go through the BAR0 window.
*/
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 NULL;
}