drm/nouveau/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 <bskeggs@redhat.com>
This commit is contained in:
@@ -51,7 +51,7 @@ nv50_fence_context_new(struct nouveau_channel *chan)
|
||||
fctx->base.read = nv10_fence_read;
|
||||
fctx->base.sync = nv17_fence_sync;
|
||||
|
||||
ret = nvif_object_init(chan->object, NULL, NvSema, NV_DMA_IN_MEMORY,
|
||||
ret = nvif_object_init(&chan->user, NvSema, NV_DMA_IN_MEMORY,
|
||||
&(struct nv_dma_v0) {
|
||||
.target = NV_DMA_V0_TARGET_VRAM,
|
||||
.access = NV_DMA_V0_ACCESS_RDWR,
|
||||
@@ -66,7 +66,7 @@ nv50_fence_context_new(struct nouveau_channel *chan)
|
||||
u32 start = bo->bo.mem.start * PAGE_SIZE;
|
||||
u32 limit = start + bo->bo.mem.size - 1;
|
||||
|
||||
ret = nvif_object_init(chan->object, NULL, NvEvoSema0 + i,
|
||||
ret = nvif_object_init(&chan->user, NvEvoSema0 + i,
|
||||
NV_DMA_IN_MEMORY, &(struct nv_dma_v0) {
|
||||
.target = NV_DMA_V0_TARGET_VRAM,
|
||||
.access = NV_DMA_V0_ACCESS_RDWR,
|
||||
|
Reference in New Issue
Block a user