aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:09 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:15 +1000
commitd5c5bcf693e7c72f2f853066858f3d40a42ba942 (patch)
tree6c60356162890d5071592c5cb74da5a6828dc14d /drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
parentdrm/nouveau/ibus: switch to device pri macros (diff)
downloadlinux-dev-d5c5bcf693e7c72f2f853066858f3d40a42ba942.tar.xz
linux-dev-d5c5bcf693e7c72f2f853066858f3d40a42ba942.zip
drm/nouveau/imem: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
index 6c83c5797e32..339dd19e0e45 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
@@ -45,6 +45,7 @@ nv50_instobj_rd32(struct nvkm_object *object, u64 offset)
{
struct nv50_instmem *imem = (void *)nvkm_instmem(object);
struct nv50_instobj *node = (void *)object;
+ struct nvkm_device *device = imem->base.subdev.device;
unsigned long flags;
u64 base = (node->mem->offset + offset) & 0xffffff00000ULL;
u64 addr = (node->mem->offset + offset) & 0x000000fffffULL;
@@ -52,10 +53,10 @@ nv50_instobj_rd32(struct nvkm_object *object, u64 offset)
spin_lock_irqsave(&imem->lock, flags);
if (unlikely(imem->addr != base)) {
- nv_wr32(imem, 0x001700, base >> 16);
+ nvkm_wr32(device, 0x001700, base >> 16);
imem->addr = base;
}
- data = nv_rd32(imem, 0x700000 + addr);
+ data = nvkm_rd32(device, 0x700000 + addr);
spin_unlock_irqrestore(&imem->lock, flags);
return data;
}
@@ -65,16 +66,17 @@ nv50_instobj_wr32(struct nvkm_object *object, u64 offset, u32 data)
{
struct nv50_instmem *imem = (void *)nvkm_instmem(object);
struct nv50_instobj *node = (void *)object;
+ struct nvkm_device *device = imem->base.subdev.device;
unsigned long flags;
u64 base = (node->mem->offset + offset) & 0xffffff00000ULL;
u64 addr = (node->mem->offset + offset) & 0x000000fffffULL;
spin_lock_irqsave(&imem->lock, flags);
if (unlikely(imem->addr != base)) {
- nv_wr32(imem, 0x001700, base >> 16);
+ nvkm_wr32(device, 0x001700, base >> 16);
imem->addr = base;
}
- nv_wr32(imem, 0x700000 + addr, data);
+ nvkm_wr32(device, 0x700000 + addr, data);
spin_unlock_irqrestore(&imem->lock, flags);
}