From 33b1104b25f0e58ca56d6dd13ce917371a9115fe Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 20 Aug 2015 14:54:15 +1000 Subject: nvif: simplify and tidy library interfaces A variety of tweaks to the NVIF library interfaces, mostly ripping out things that turned out to be not so useful. - Removed refcounting from nvif_object, callers are expected to not be stupid instead. - nvif_client is directly reachable from anything derived from nvif_object, removing the need for heuristics to locate it - _new() versions of interfaces, that allocate memory for the object they construct, have been removed. The vast majority of callers used the embedded _init() interfaces. - No longer storing constructor arguments (and the data returned from nvkm) inside nvif_object, it's more or less unused and just wastes memory. Signed-off-by: Ben Skeggs --- bin/nv_wvfunc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/nv_wvfunc.h') diff --git a/bin/nv_wvfunc.h b/bin/nv_wvfunc.h index 5a169227e..ea631fa50 100644 --- a/bin/nv_wvfunc.h +++ b/bin/nv_wvfunc.h @@ -7,10 +7,10 @@ nv_wvram(struct nvif_device *device, u64 addr, CAST data) { if (device->info.family >= NV_DEVICE_INFO_V0_TESLA && device->info.family <= NV_DEVICE_INFO_V0_MAXWELL) { - u32 pmem = nvif_rd32(device, 0x001700); - nvif_wr32(device, 0x001700, 0x00000000 | (addr >> 16)); - WVRAM(device, 0x700000 + (addr & 0xffffULL), data); - nvif_wr32(device, 0x001700, pmem); + u32 pmem = nvif_rd32(&device->object, 0x001700); + nvif_wr32(&device->object, 0x001700, 0x00000000 | (addr >> 16)); + WVRAM(&device->object, 0x700000 + (addr & 0xffffULL), data); + nvif_wr32(&device->object, 0x001700, pmem); } else { printk("unsupported chipset\n"); exit(1); -- cgit v1.2.1