aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
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/nv04.c
parentdrm/nouveau/imem: use object accessor function for suspend/resume (diff)
downloadlinux-dev-a8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6.tar.xz
linux-dev-a8dae9fe0e8ad94de1bb2bfda90d288c1b9eb6e6.zip
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/nv04.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c21
1 files changed, 11 insertions, 10 deletions
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);
}