summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
index ba0bca729012..9ebfb0d8fdd7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
@@ -30,7 +30,8 @@ nv41_ram_create(struct nvkm_object *parent, struct nvkm_object *engine,
{
struct nvkm_fb *fb = nvkm_fb(parent);
struct nv40_ram *ram;
- u32 fb474 = nv_rd32(fb, 0x100474);
+ struct nvkm_device *device = fb->subdev.device;
+ u32 fb474 = nvkm_rd32(device, 0x100474);
int ret;
ret = nvkm_ram_create(parent, engine, oclass, &ram);
@@ -45,9 +46,9 @@ nv41_ram_create(struct nvkm_object *parent, struct nvkm_object *engine,
if (fb474 & 0x00000001)
ram->base.type = NV_MEM_TYPE_DDR1;
- ram->base.size = nv_rd32(fb, 0x10020c) & 0xff000000;
- ram->base.parts = (nv_rd32(fb, 0x100200) & 0x00000003) + 1;
- ram->base.tags = nv_rd32(fb, 0x100320);
+ ram->base.size = nvkm_rd32(device, 0x10020c) & 0xff000000;
+ ram->base.parts = (nvkm_rd32(device, 0x100200) & 0x00000003) + 1;
+ ram->base.tags = nvkm_rd32(device, 0x100320);
ram->base.calc = nv40_ram_calc;
ram->base.prog = nv40_ram_prog;
ram->base.tidy = nv40_ram_tidy;