summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/devinit
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:14 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:29 +1000
commita8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6 (patch)
tree7db67236539b5945ee61c9cdcc5202098761806d /drivers/gpu/drm/nouveau/nvkm/subdev/devinit
parent95cf469cc3b266324cd9129f93a2d44b85ea27ed (diff)
drm/nouveau/vga: require nvkm_device pointer in accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/devinit')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c21
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c4
4 files changed, 17 insertions, 16 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c
index 4338e437bcc3..989513fae7d5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c
@@ -36,7 +36,7 @@ _nvkm_devinit_fini(struct nvkm_object *object, bool suspend)
init->post = true;
/* unlock the extended vga crtc regs */
- nv_lockvgac(init, false);
+ nvkm_lockvgac(init->subdev.device, false);
return nvkm_subdev_fini(&init->subdev, suspend);
}
@@ -67,7 +67,7 @@ _nvkm_devinit_dtor(struct nvkm_object *object)
struct nvkm_devinit *init = (void *)object;
/* lock crtc regs */
- nv_lockvgac(init, true);
+ nvkm_lockvgac(init->subdev.device, true);
nvkm_subdev_destroy(&init->subdev);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
index 5158ea62f65a..41d9dbb075a4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
@@ -49,7 +49,7 @@ nv04_devinit_meminit(struct nvkm_devinit *init)
}
/* Sequencer and refresh off */
- nv_wrvgas(init, 0, 1, nv_rdvgas(init, 0, 1) | 0x20);
+ nvkm_wrvgas(device, 0, 1, nvkm_rdvgas(device, 0, 1) | 0x20);
nvkm_mask(device, NV04_PFB_DEBUG_0, 0, NV04_PFB_DEBUG_0_REFRESH_OFF);
nvkm_mask(device, NV04_PFB_BOOT_0, ~0,
@@ -105,7 +105,7 @@ nv04_devinit_meminit(struct nvkm_devinit *init)
/* Refresh on, sequencer on */
nvkm_mask(device, NV04_PFB_DEBUG_0, NV04_PFB_DEBUG_0_REFRESH_OFF, 0);
- nv_wrvgas(init, 0, 1, nv_rdvgas(init, 0, 1) & ~0x20);
+ nvkm_wrvgas(device, 0, 1, nvkm_rdvgas(device, 0, 1) & ~0x20);
fbmem_fini(fb);
}
@@ -406,8 +406,8 @@ nv04_devinit_fini(struct nvkm_object *object, bool suspend)
/* unslave crtcs */
if (init->owner < 0)
- init->owner = nv_rdvgaowner(init);
- nv_wrvgaowner(init, 0);
+ init->owner = nvkm_rdvgaowner(device);
+ nvkm_wrvgaowner(device, 0);
return 0;
}
@@ -416,13 +416,14 @@ nv04_devinit_init(struct nvkm_object *object)
{
struct nv04_devinit *init = (void *)object;
struct nvkm_subdev *subdev = &init->base.subdev;
+ struct nvkm_device *device = subdev->device;
if (!init->base.post) {
- u32 htotal = nv_rdvgac(init, 0, 0x06);
- htotal |= (nv_rdvgac(init, 0, 0x07) & 0x01) << 8;
- htotal |= (nv_rdvgac(init, 0, 0x07) & 0x20) << 4;
- htotal |= (nv_rdvgac(init, 0, 0x25) & 0x01) << 10;
- htotal |= (nv_rdvgac(init, 0, 0x41) & 0x01) << 11;
+ u32 htotal = nvkm_rdvgac(device, 0, 0x06);
+ htotal |= (nvkm_rdvgac(device, 0, 0x07) & 0x01) << 8;
+ htotal |= (nvkm_rdvgac(device, 0, 0x07) & 0x20) << 4;
+ htotal |= (nvkm_rdvgac(device, 0, 0x25) & 0x01) << 10;
+ htotal |= (nvkm_rdvgac(device, 0, 0x41) & 0x01) << 11;
if (!htotal) {
nvkm_debug(subdev, "adaptor not initialised\n");
init->base.post = true;
@@ -438,7 +439,7 @@ nv04_devinit_dtor(struct nvkm_object *object)
struct nv04_devinit *init = (void *)object;
/* restore vga owner saved at first init */
- nv_wrvgaowner(init, init->owner);
+ nvkm_wrvgaowner(init->base.subdev.device, init->owner);
nvkm_devinit_destroy(&init->base);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
index 54de25eea98a..32be8852e0bc 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
@@ -70,7 +70,7 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
}
/* Sequencer off */
- nv_wrvgas(init, 0, 1, nv_rdvgas(init, 0, 1) | 0x20);
+ nvkm_wrvgas(device, 0, 1, nvkm_rdvgas(device, 0, 1) | 0x20);
if (nvkm_rd32(device, NV04_PFB_BOOT_0) & NV04_PFB_BOOT_0_UMA_ENABLE)
goto out;
@@ -122,7 +122,7 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
out:
/* Sequencer on */
- nv_wrvgas(init, 0, 1, nv_rdvgas(init, 0, 1) & ~0x20);
+ nvkm_wrvgas(device, 0, 1, nvkm_rdvgas(device, 0, 1) & ~0x20);
fbmem_fini(fb);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
index 548b3fe09cbf..bbcc3080a478 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
@@ -105,8 +105,8 @@ nv50_devinit_init(struct nvkm_object *object)
int ret, i = 0;
if (!init->base.post) {
- if (!nv_rdvgac(init, 0, 0x00) &&
- !nv_rdvgac(init, 0, 0x1a)) {
+ if (!nvkm_rdvgac(device, 0, 0x00) &&
+ !nvkm_rdvgac(device, 0, 0x1a)) {
nvkm_debug(subdev, "adaptor not initialised\n");
init->base.post = true;
}