summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/bar
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-10-31 20:56:19 +0300
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 06:32:18 +0300
commit8e644cb29c33dcd2fb718d78d8c33d4eb88cf6f7 (patch)
tree24b2f1c139bc258b04f4ab353dc47b425531dc10 /drivers/gpu/drm/nouveau/nvkm/subdev/bar
parentbb7e501a661f820788279063fd9e225bbe9c38e9 (diff)
downloadlinux-8e644cb29c33dcd2fb718d78d8c33d4eb88cf6f7.tar.xz
drm/nouveau/bar: initialise bar2 during oneinit
If we initialise BAR2 earlier, we're able to complete BAR1 setup using the instmem fast-path. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bar')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c3
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
index c6317a0f04a7..b155a7f76ca7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
@@ -146,6 +146,9 @@ gf100_bar_oneinit(struct nvkm_bar *base)
ret = gf100_bar_oneinit_bar(bar, &bar->bar[0], &bar2_lock, 3);
if (ret)
return ret;
+
+ bar->base.subdev.oneinit = true;
+ nvkm_bar_bar2_init(bar->base.subdev.device);
}
/* BAR1 */
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
index 4b912c905551..cf1d0acd2afc 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c
@@ -159,6 +159,9 @@ nv50_bar_oneinit(struct nvkm_bar *base)
nvkm_wo32(bar->bar2, 0x14, 0x00000000);
nvkm_done(bar->bar2);
+ bar->base.subdev.oneinit = true;
+ nvkm_bar_bar2_init(device);
+
/* BAR1 */
start = 0x0000000000ULL;
limit = start + device->func->resource_size(device, 1);