nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Ben Skeggs <bskeggs@nvidia.com>
To: <nouveau@lists.freedesktop.org>
Cc: Ben Skeggs <bskeggs@nvidia.com>
Subject: [PATCH 017/156] drm/nouveau: remove push pointer from nouveau_channel
Date: Wed, 17 Apr 2024 09:37:43 +1000	[thread overview]
Message-ID: <20240416234002.19509-18-bskeggs@nvidia.com> (raw)
In-Reply-To: <20240416234002.19509-1-bskeggs@nvidia.com>

- the struct itself lives in nouveau_channel already, just use that

Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c  |  4 +--
 drivers/gpu/drm/nouveau/nouveau_bo0039.c |  4 +--
 drivers/gpu/drm/nouveau/nouveau_bo5039.c |  4 +--
 drivers/gpu/drm/nouveau/nouveau_bo74c1.c |  2 +-
 drivers/gpu/drm/nouveau/nouveau_bo85b5.c |  2 +-
 drivers/gpu/drm/nouveau/nouveau_bo9039.c |  4 +--
 drivers/gpu/drm/nouveau/nouveau_bo90b5.c |  2 +-
 drivers/gpu/drm/nouveau/nouveau_boa0b5.c |  4 +--
 drivers/gpu/drm/nouveau/nouveau_chan.c   | 41 ++++++++++++------------
 drivers/gpu/drm/nouveau/nouveau_chan.h   |  3 +-
 drivers/gpu/drm/nouveau/nouveau_dmem.c   |  4 +--
 drivers/gpu/drm/nouveau/nouveau_drm.c    |  3 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c    | 14 ++++----
 drivers/gpu/drm/nouveau/nv04_fence.c     |  2 +-
 drivers/gpu/drm/nouveau/nv10_fence.c     |  2 +-
 drivers/gpu/drm/nouveau/nv17_fence.c     |  4 +--
 drivers/gpu/drm/nouveau/nv84_fence.c     |  4 +--
 drivers/gpu/drm/nouveau/nvc0_fence.c     |  4 +--
 18 files changed, 53 insertions(+), 54 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 3535cf571300..8e8a43b28f71 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1100,7 +1100,7 @@ nv04_page_flip_emit(struct nouveau_channel *chan,
 	struct nouveau_fence_chan *fctx = chan->fence;
 	struct nouveau_drm *drm = chan->cli->drm;
 	struct drm_device *dev = drm->dev;
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	unsigned long flags;
 	int ret;
 
@@ -1158,7 +1158,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
 	if (!chan)
 		return -ENODEV;
 	cli = chan->cli;
-	push = chan->chan.push;
+	push = &chan->chan.push;
 
 	s = kzalloc(sizeof(*s), GFP_KERNEL);
 	if (!s)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo0039.c b/drivers/gpu/drm/nouveau/nouveau_bo0039.c
index 2babc6c47241..0b6758e024a1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo0039.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo0039.c
@@ -47,7 +47,7 @@ int
 nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	u32 src_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, old_reg);
 	u32 src_offset = old_reg->start << PAGE_SHIFT;
 	u32 dst_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, new_reg);
@@ -96,7 +96,7 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 int
 nv04_bo_move_init(struct nouveau_channel *chan, u32 handle)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 4);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo5039.c b/drivers/gpu/drm/nouveau/nouveau_bo5039.c
index 0a6b1fce1108..c3de17548d97 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo5039.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo5039.c
@@ -40,7 +40,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	u64 length = new_reg->size;
 	u64 src_offset = mem->vma[0].addr;
 	u64 dst_offset = mem->vma[1].addr;
@@ -136,7 +136,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 int
 nv50_bo_move_init(struct nouveau_channel *chan, u32 handle)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 6);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo74c1.c b/drivers/gpu/drm/nouveau/nouveau_bo74c1.c
index 9b7ba31fae13..e6ef79de2498 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo74c1.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo74c1.c
@@ -37,7 +37,7 @@ nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 7);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo85b5.c b/drivers/gpu/drm/nouveau/nouveau_bo85b5.c
index a15a38a87a95..c4861d073ad4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo85b5.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo85b5.c
@@ -41,7 +41,7 @@ nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	u64 src_offset = mem->vma[0].addr;
 	u64 dst_offset = mem->vma[1].addr;
 	u32 page_count = PFN_UP(new_reg->size);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo9039.c b/drivers/gpu/drm/nouveau/nouveau_bo9039.c
index d2bb2687d401..ad82269c7725 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo9039.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo9039.c
@@ -38,7 +38,7 @@ int
 nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
 	u64 src_offset = mem->vma[0].addr;
 	u64 dst_offset = mem->vma[1].addr;
@@ -86,7 +86,7 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 int
 nvc0_bo_move_init(struct nouveau_channel *chan, u32 handle)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 2);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo90b5.c b/drivers/gpu/drm/nouveau/nouveau_bo90b5.c
index 4618f4f5ab56..5eaeef9d25e4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo90b5.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo90b5.c
@@ -34,7 +34,7 @@ nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	u64 src_offset = mem->vma[0].addr;
 	u64 dst_offset = mem->vma[1].addr;
 	u32 page_count = PFN_UP(new_reg->size);
diff --git a/drivers/gpu/drm/nouveau/nouveau_boa0b5.c b/drivers/gpu/drm/nouveau/nouveau_boa0b5.c
index 07a5c6302c98..dff2ae0e1e45 100644
--- a/drivers/gpu/drm/nouveau/nouveau_boa0b5.c
+++ b/drivers/gpu/drm/nouveau/nouveau_boa0b5.c
@@ -39,7 +39,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 		  struct ttm_resource *old_reg, struct ttm_resource *new_reg)
 {
 	struct nouveau_mem *mem = nouveau_mem(old_reg);
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 10);
@@ -78,7 +78,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
 int
 nve0_bo_move_init(struct nouveau_channel *chan, u32 handle)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret;
 
 	ret = PUSH_WAIT(push, 2);
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index ea8db569bd1a..db86cca9ea37 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -117,24 +117,24 @@ nouveau_channel_del(struct nouveau_channel **pchan)
 static void
 nouveau_channel_kick(struct nvif_push *push)
 {
-	struct nouveau_channel *chan = container_of(push, typeof(*chan), chan._push);
-	chan->dma.cur = chan->dma.cur + (chan->chan._push.cur - chan->chan._push.bgn);
+	struct nouveau_channel *chan = container_of(push, typeof(*chan), chan.push);
+	chan->dma.cur = chan->dma.cur + (chan->chan.push.cur - chan->chan.push.bgn);
 	FIRE_RING(chan);
-	chan->chan._push.bgn = chan->chan._push.cur;
+	chan->chan.push.bgn = chan->chan.push.cur;
 }
 
 static int
 nouveau_channel_wait(struct nvif_push *push, u32 size)
 {
-	struct nouveau_channel *chan = container_of(push, typeof(*chan), chan._push);
+	struct nouveau_channel *chan = container_of(push, typeof(*chan), chan.push);
 	int ret;
-	chan->dma.cur = chan->dma.cur + (chan->chan._push.cur - chan->chan._push.bgn);
+	chan->dma.cur = chan->dma.cur + (chan->chan.push.cur - chan->chan.push.bgn);
 	ret = RING_SPACE(chan, size);
 	if (ret == 0) {
-		chan->chan._push.bgn = chan->chan._push.mem.object.map.ptr;
-		chan->chan._push.bgn = chan->chan._push.bgn + chan->dma.cur;
-		chan->chan._push.cur = chan->chan._push.bgn;
-		chan->chan._push.end = chan->chan._push.bgn + size;
+		chan->chan.push.bgn = chan->chan.push.mem.object.map.ptr;
+		chan->chan.push.bgn = chan->chan.push.bgn + chan->dma.cur;
+		chan->chan.push.cur = chan->chan.push.bgn;
+		chan->chan.push.end = chan->chan.push.bgn + size;
 	}
 	return ret;
 }
@@ -176,13 +176,12 @@ nouveau_channel_prep(struct nouveau_cli *cli,
 		return ret;
 	}
 
-	chan->chan._push.mem.object.parent = cli->base.object.parent;
-	chan->chan._push.mem.object.client = &cli->base;
-	chan->chan._push.mem.object.name = "chanPush";
-	chan->chan._push.mem.object.map.ptr = chan->push.buffer->kmap.virtual;
-	chan->chan._push.wait = nouveau_channel_wait;
-	chan->chan._push.kick = nouveau_channel_kick;
-	chan->chan.push = &chan->chan._push;
+	chan->chan.push.mem.object.parent = cli->base.object.parent;
+	chan->chan.push.mem.object.client = &cli->base;
+	chan->chan.push.mem.object.name = "chanPush";
+	chan->chan.push.mem.object.map.ptr = chan->push.buffer->kmap.virtual;
+	chan->chan.push.wait = nouveau_channel_wait;
+	chan->chan.push.kick = nouveau_channel_kick;
 
 	/* create dma object covering the *entire* memory space that the
 	 * pushbuf lives in, this is because the GEM code requires that
@@ -461,12 +460,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
 	chan->dma.cur = chan->dma.put;
 	chan->dma.free = chan->dma.max - chan->dma.cur;
 
-	ret = PUSH_WAIT(chan->chan.push, NOUVEAU_DMA_SKIPS);
+	ret = PUSH_WAIT(&chan->chan.push, NOUVEAU_DMA_SKIPS);
 	if (ret)
 		return ret;
 
 	for (i = 0; i < NOUVEAU_DMA_SKIPS; i++)
-		PUSH_DATA(chan->chan.push, 0x00000000);
+		PUSH_DATA(&chan->chan.push, 0x00000000);
 
 	/* allocate software object class (used for fences on <= nv05) */
 	if (device->info.family < NV_DEVICE_INFO_V0_CELSIUS) {
@@ -476,12 +475,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
 		if (ret)
 			return ret;
 
-		ret = PUSH_WAIT(chan->chan.push, 2);
+		ret = PUSH_WAIT(&chan->chan.push, 2);
 		if (ret)
 			return ret;
 
-		PUSH_NVSQ(chan->chan.push, NV_SW, 0x0000, chan->nvsw.handle);
-		PUSH_KICK(chan->chan.push);
+		PUSH_NVSQ(&chan->chan.push, NV_SW, 0x0000, chan->nvsw.handle);
+		PUSH_KICK(&chan->chan.push);
 	}
 
 	/* initialise synchronisation */
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.h b/drivers/gpu/drm/nouveau/nouveau_chan.h
index 3ce9832c9528..016f668c0bc1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.h
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.h
@@ -8,8 +8,7 @@ struct nvif_device;
 
 struct nouveau_channel {
 	struct {
-		struct nvif_push _push;
-		struct nvif_push *push;
+		struct nvif_push push;
 	} chan;
 
 	struct nouveau_cli *cli;
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index 6fb65b01d778..b2f20e33bf66 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c
@@ -443,7 +443,7 @@ nvc0b5_migrate_copy(struct nouveau_drm *drm, u64 npages,
 		    enum nouveau_aper dst_aper, u64 dst_addr,
 		    enum nouveau_aper src_aper, u64 src_addr)
 {
-	struct nvif_push *push = drm->dmem->migrate.chan->chan.push;
+	struct nvif_push *push = &drm->dmem->migrate.chan->chan.push;
 	u32 launch_dma = 0;
 	int ret;
 
@@ -516,7 +516,7 @@ static int
 nvc0b5_migrate_clear(struct nouveau_drm *drm, u32 length,
 		     enum nouveau_aper dst_aper, u64 dst_addr)
 {
-	struct nvif_push *push = drm->dmem->migrate.chan->chan.push;
+	struct nvif_push *push = &drm->dmem->migrate.chan->chan.push;
 	u32 launch_dma = 0;
 	int ret;
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 9a4f2b0a8463..92b347b79919 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -389,7 +389,8 @@ nouveau_accel_gr_init(struct nouveau_drm *drm)
 		}
 
 		if (ret == 0) {
-			struct nvif_push *push = drm->channel->chan.push;
+			struct nvif_push *push = &drm->channel->chan.push;
+
 			ret = PUSH_WAIT(push, 8);
 			if (ret == 0) {
 				if (device->info.chipset >= 0x11) {
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 22f4ee483ff3..9ae2cee1c7c5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -871,7 +871,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
 		}
 	} else
 	if (drm->client.device.info.chipset >= 0x25) {
-		ret = PUSH_WAIT(chan->chan.push, req->nr_push * 2);
+		ret = PUSH_WAIT(&chan->chan.push, req->nr_push * 2);
 		if (ret) {
 			NV_PRINTK(err, cli, "cal_space: %d\n", ret);
 			goto out;
@@ -881,11 +881,11 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
 			struct nouveau_bo *nvbo = (void *)(unsigned long)
 				bo[push[i].bo_index].user_priv;
 
-			PUSH_CALL(chan->chan.push, nvbo->offset + push[i].offset);
-			PUSH_DATA(chan->chan.push, 0);
+			PUSH_CALL(&chan->chan.push, nvbo->offset + push[i].offset);
+			PUSH_DATA(&chan->chan.push, 0);
 		}
 	} else {
-		ret = PUSH_WAIT(chan->chan.push, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
+		ret = PUSH_WAIT(&chan->chan.push, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
 		if (ret) {
 			NV_PRINTK(err, cli, "jmp_space: %d\n", ret);
 			goto out;
@@ -914,10 +914,10 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
 						push[i].length - 8) / 4, cmd);
 			}
 
-			PUSH_JUMP(chan->chan.push, nvbo->offset + push[i].offset);
-			PUSH_DATA(chan->chan.push, 0);
+			PUSH_JUMP(&chan->chan.push, nvbo->offset + push[i].offset);
+			PUSH_DATA(&chan->chan.push, 0);
 			for (j = 0; j < NOUVEAU_DMA_SKIPS; j++)
-				PUSH_DATA(chan->chan.push, 0);
+				PUSH_DATA(&chan->chan.push, 0);
 		}
 	}
 
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c
index cdbc75e3d1f6..fa5c6029f783 100644
--- a/drivers/gpu/drm/nouveau/nv04_fence.c
+++ b/drivers/gpu/drm/nouveau/nv04_fence.c
@@ -39,7 +39,7 @@ struct nv04_fence_priv {
 static int
 nv04_fence_emit(struct nouveau_fence *fence)
 {
-	struct nvif_push *push = unrcu_pointer(fence->channel)->chan.push;
+	struct nvif_push *push = &unrcu_pointer(fence->channel)->chan.push;
 	int ret = PUSH_WAIT(push, 2);
 	if (ret == 0) {
 		PUSH_NVSQ(push, NV_SW, 0x0150, fence->base.seqno);
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c
index c6a0db5b9e21..1e45b5fcbf23 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -32,7 +32,7 @@
 int
 nv10_fence_emit(struct nouveau_fence *fence)
 {
-	struct nvif_push *push = fence->channel->chan.push;
+	struct nvif_push *push = &fence->channel->chan.push;
 	int ret = PUSH_WAIT(push, 2);
 	if (ret == 0) {
 		PUSH_MTHD(push, NV06E, SET_REFERENCE, fence->base.seqno);
diff --git a/drivers/gpu/drm/nouveau/nv17_fence.c b/drivers/gpu/drm/nouveau/nv17_fence.c
index 7fa52ec61b30..4415a6de680b 100644
--- a/drivers/gpu/drm/nouveau/nv17_fence.c
+++ b/drivers/gpu/drm/nouveau/nv17_fence.c
@@ -39,8 +39,8 @@ nv17_fence_sync(struct nouveau_fence *fence,
 	struct nouveau_cli *cli = prev->cli;
 	struct nv10_fence_priv *priv = cli->drm->fence;
 	struct nv10_fence_chan *fctx = chan->fence;
-	struct nvif_push *ppush = prev->chan.push;
-	struct nvif_push *npush = chan->chan.push;
+	struct nvif_push *ppush = &prev->chan.push;
+	struct nvif_push *npush = &chan->chan.push;
 	u32 value;
 	int ret;
 
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c
index 7f62089dc940..a9cbea2d1cc0 100644
--- a/drivers/gpu/drm/nouveau/nv84_fence.c
+++ b/drivers/gpu/drm/nouveau/nv84_fence.c
@@ -35,7 +35,7 @@
 static int
 nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret = PUSH_WAIT(push, 8);
 	if (ret == 0) {
 		PUSH_MTHD(push, NV826F, SET_CONTEXT_DMA_SEMAPHORE, chan->vram.handle);
@@ -58,7 +58,7 @@ nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 static int
 nv84_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret = PUSH_WAIT(push, 7);
 	if (ret == 0) {
 		PUSH_MTHD(push, NV826F, SET_CONTEXT_DMA_SEMAPHORE, chan->vram.handle);
diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c
index e1461c0b0779..a5e98d0d4217 100644
--- a/drivers/gpu/drm/nouveau/nvc0_fence.c
+++ b/drivers/gpu/drm/nouveau/nvc0_fence.c
@@ -34,7 +34,7 @@
 static int
 nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret = PUSH_WAIT(push, 6);
 	if (ret == 0) {
 		PUSH_MTHD(push, NV906F, SEMAPHOREA,
@@ -57,7 +57,7 @@ nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 static int
 nvc0_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
 {
-	struct nvif_push *push = chan->chan.push;
+	struct nvif_push *push = &chan->chan.push;
 	int ret = PUSH_WAIT(push, 5);
 	if (ret == 0) {
 		PUSH_MTHD(push, NV906F, SEMAPHOREA,
-- 
2.41.0


  parent reply	other threads:[~2024-04-16 23:41 UTC|newest]

Thread overview: 163+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 23:37 [PATCH 000/156] drm/nouveau: replace "ioctl" interface between drm/nvkm Ben Skeggs
2024-04-16 23:37 ` [PATCH 001/156] drm/nouveau: add nouveau_drm.device/mmu Ben Skeggs
2024-04-16 23:37 ` [PATCH 002/156] drm/nouveau: alias nouveau_drm.client to nouveau_drm.cli Ben Skeggs
2024-04-16 23:37 ` [PATCH 003/156] drm/nouveau: pass drm to nouveau_mem_new(), instead of cli Ben Skeggs
2024-04-16 23:37 ` [PATCH 004/156] drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp Ben Skeggs
2024-04-17  6:27   ` Philipp Stanner
2024-04-16 23:37 ` [PATCH 005/156] drm/nouveau: pass cli to nouveau_channel_new() instead of drm+device Ben Skeggs
2024-04-16 23:37 ` [PATCH 006/156] drm/nouveau: remove nouveau_chan.device Ben Skeggs
2024-04-16 23:37 ` [PATCH 007/156] drm/nouveau: remove chan->drm Ben Skeggs
2024-04-16 23:37 ` [PATCH 008/156] drm/nouveau: replace some void casts with chan->cli Ben Skeggs
2024-04-16 23:37 ` [PATCH 009/156] drm/nouveau: remove nouveau_drm.master Ben Skeggs
2024-04-16 23:37 ` [PATCH 010/156] drm/nouveau: always map device Ben Skeggs
2024-04-16 23:37 ` [PATCH 011/156] drm/nouveau: add nouveau_cli to nouveau_abi16 Ben Skeggs
2024-04-16 23:37 ` [PATCH 012/156] drm/nouveau: handle limited nvif in abi16 Ben Skeggs
2024-04-16 23:37 ` [PATCH 013/156] drm/nouveau: remove abi16->device Ben Skeggs
2024-04-16 23:37 ` [PATCH 014/156] drm/nouveau: remove abi16->handles Ben Skeggs
2024-04-16 23:37 ` [PATCH 015/156] drm/nouveau: store nvkm_device pointer in nouveau_drm Ben Skeggs
2024-04-16 23:37 ` [PATCH 016/156] drm/nouveau: create pci device once Ben Skeggs
2024-04-16 23:37 ` Ben Skeggs [this message]
2024-04-16 23:37 ` [PATCH 018/156] drm/nouveau/kms: remove a few unused struct members and fn decls Ben Skeggs
2024-04-16 23:37 ` [PATCH 019/156] drm/nouveau/kms: remove push pointer from nv50_dmac Ben Skeggs
2024-04-16 23:37 ` [PATCH 020/156] drm/nouveau/kms: move hw ring tracking vars into nvif_push Ben Skeggs
2024-04-16 23:37 ` [PATCH 021/156] drm/nouveau/kms: move dmac sync/vram ctxdmas to core+wndws Ben Skeggs
2024-04-16 23:37 ` [PATCH 022/156] drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args Ben Skeggs
2024-04-16 23:37 ` [PATCH 023/156] drm/nouveau/nvkm: move nouveau_nvif.c to nvkm/core/driver.c Ben Skeggs
2024-04-16 23:37 ` [PATCH 024/156] drm/nouveau/nvkm: move nvkm/engine/device/ to nvkm/device/ Ben Skeggs
2024-04-16 23:37 ` [PATCH 025/156] drm/nouveau/nvkm: remove perfmon Ben Skeggs
2024-04-16 23:37 ` [PATCH 026/156] drm/nouveau/nvkm: remove nvkm_client_search() Ben Skeggs
2024-04-16 23:37 ` [PATCH 027/156] drm/nouveau/nvif: remove support for userspace backends Ben Skeggs
2024-04-16 23:37 ` [PATCH 028/156] drm/nouveau/nvif: remove route/token Ben Skeggs
2024-04-16 23:37 ` [PATCH 029/156] drm/nouveau/nvif: remove nvxx_object() Ben Skeggs
2024-04-16 23:37 ` [PATCH 030/156] drm/nouveau/nvif: remove nvxx_client() Ben Skeggs
2024-04-16 23:37 ` [PATCH 031/156] drm/nouveau/nvif: remove driver keep/fini Ben Skeggs
2024-04-16 23:37 ` [PATCH 032/156] drm/nouveau/nvif: remove client version Ben Skeggs
2024-04-16 23:37 ` [PATCH 033/156] drm/nouveau/nvif: remove client devlist Ben Skeggs
2024-04-16 23:38 ` [PATCH 034/156] drm/nouveau/nvif: remove client fini Ben Skeggs
2024-04-16 23:38 ` [PATCH 035/156] drm/nouveau/nvif: remove device args Ben Skeggs
2024-04-16 23:38 ` [PATCH 036/156] drm/nouveau/nvif: remove device rd/wr Ben Skeggs
2024-04-16 23:38 ` [PATCH 037/156] drm/nouveau/nvif: remove disp chan rd/wr Ben Skeggs
2024-04-16 23:38 ` [PATCH 038/156] drm/nouveau/nvkm: rename struct nvkm_uevent Ben Skeggs
2024-04-16 23:38 ` [PATCH 039/156] drm/nouveau/nvkm: remove nvkm_client() Ben Skeggs
2024-04-16 23:38 ` [PATCH 040/156] drm/nouveau/nvkm: rename struct nvkm_udevice Ben Skeggs
2024-04-16 23:38 ` [PATCH 041/156] drm/nouveau/nvkm: rename struct nvkm_control Ben Skeggs
2024-04-16 23:38 ` [PATCH 042/156] drm/nouveau/nvkm: rename struct nvkm_uvfn Ben Skeggs
2024-04-16 23:38 ` [PATCH 043/156] drm/nouveau/nvkm: rename struct nvkm_ummu Ben Skeggs
2024-04-16 23:38 ` [PATCH 044/156] drm/nouveau/nvkm: rename struct nvkm_umem Ben Skeggs
2024-04-16 23:38 ` [PATCH 045/156] drm/nouveau/nvkm: rename struct nvkm_uvmm Ben Skeggs
2024-04-16 23:38 ` [PATCH 046/156] drm/nouveau/nvkm: detach user handling from nvkm_fault_buffer Ben Skeggs
2024-04-16 23:38 ` [PATCH 047/156] drm/nouveau/nvkm: detach user handling from nvkm_disp Ben Skeggs
2024-04-16 23:38 ` [PATCH 048/156] drm/nouveau/nvkm: detach user handling from nvkm_conn Ben Skeggs
2024-04-16 23:38 ` [PATCH 049/156] drm/nouveau/nvkm: detach user handling from nvkm_outp Ben Skeggs
2024-04-16 23:38 ` [PATCH 050/156] drm/nouveau/nvkm: detach user handling from nvkm_uhead Ben Skeggs
2024-04-16 23:38 ` [PATCH 051/156] drm/nouveau/nvkm: detach user handling from nvkm_disp_chan Ben Skeggs
2024-04-16 23:38 ` [PATCH 052/156] drm/nouveau/nvkm: rename struct nvkm_ucgrp Ben Skeggs
2024-04-16 23:38 ` [PATCH 053/156] drm/nouveau/nvkm: rename struct nvkm_uchan Ben Skeggs
2024-04-16 23:38 ` [PATCH 054/156] drm/nouveau/nvkm: move umem list to mmu Ben Skeggs
2024-04-16 23:38 ` [PATCH 055/156] drm/nouveau/disp: simplify hw user definition Ben Skeggs
2024-04-16 23:38 ` [PATCH 056/156] drm/nouveau/nvif: output oclass id in object dbg messages Ben Skeggs
2024-04-16 23:38 ` [PATCH 057/156] drm/nouveau/nvif: add alternate version of nvif_object_ctor() Ben Skeggs
2024-04-16 23:38 ` [PATCH 058/156] drm/nouveau/nvif: add alternate version of nvif_event_ctor() Ben Skeggs
2024-04-16 23:38 ` [PATCH 059/156] drm/nouveau/nvif: move nvif<->nvkm interface definitions to driverif.h Ben Skeggs
2024-04-16 23:38 ` [PATCH 060/156] drm/nouveau/nvif: rework "new driver" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 061/156] drm/nouveau/nvkm: remove device list Ben Skeggs
2024-04-16 23:38 ` [PATCH 062/156] drm/nouveau/nvif: rework driver "new client" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 063/156] drm/nouveau/nvif: rework client "new device" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 064/156] drm/nouveau/nvif: remove client from object rb Ben Skeggs
2024-04-16 23:38 ` [PATCH 065/156] drm/nouveau/nvif: rework device "sclass" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 066/156] drm/nouveau/nvif: rework device "map" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 067/156] drm/nouveau/nvif: rework device "info v0" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 068/156] drm/nouveau/nvif: rework device "info v1" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 069/156] drm/nouveau/nvif: rework device "time" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 070/156] drm/nouveau/nvif: rework device "new ctrl" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 071/156] drm/nouveau/nvif: rework ctrl "pstate info" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 072/156] drm/nouveau/nvif: rework ctrl "pstate attr" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 073/156] drm/nouveau/nvif: rework ctrl "pstate user" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 074/156] drm/nouveau/nvif: remove ctrl from object rb Ben Skeggs
2024-04-16 23:38 ` [PATCH 075/156] drm/nouveau/nvif: rework device "new usermode" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 076/156] drm/nouveau/nvif: rework usermode "map" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 077/156] drm/nouveau/nvif: remove usermode from object rb Ben Skeggs
2024-04-16 23:38 ` [PATCH 078/156] drm/nouveau/nvif: rework device "new mmu" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 079/156] drm/nouveau/nvif: rework mmu "sclass" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 080/156] drm/nouveau/nvif: rework mmu "heap" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 081/156] drm/nouveau/nvif: rework mmu "type" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 082/156] drm/nouveau/nvif: rework mmu "kind" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 083/156] drm/nouveau/nvif: rework mmu "new mem" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 084/156] drm/nouveau/nvif: rework mem "map"/"unmap" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 085/156] drm/nouveau/nvif: rework mmu "new vmm" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 086/156] drm/nouveau/nvif: remove mmu from object rb Ben Skeggs
2024-04-16 23:38 ` [PATCH 087/156] drm/nouveau/nvif: rework vmm "page" api Ben Skeggs
2024-04-16 23:38 ` [PATCH 088/156] drm/nouveau/nvif: rework vmm "get"/"put" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 089/156] drm/nouveau/nvif: rework vmm "map"/"unmap" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 090/156] drm/nouveau/nvif: rework vmm "pfnmap"/"pfnclr" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 091/156] drm/nouveau/nvif: rework vmm "raw get"/"raw put" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 092/156] drm/nouveau/nvif: rework vmm "raw map"/"raw unmap" apis Ben Skeggs
2024-04-16 23:38 ` [PATCH 093/156] drm/nouveau/nvif: rework vmm "raw sparse" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 094/156] drm/nouveau/nvif: rework vmm "fault replay"/"fault cancel" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 095/156] drm/nouveau/nvif: rework device "new fault buffer" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 096/156] drm/nouveau/nvif: rework fault buffer "map" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 097/156] drm/nouveau/nvif: rework fault buffer "new event" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 098/156] drm/nouveau/nvif: remove fault buffer from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 099/156] drm/nouveau/nvif: rework device "new disp" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 100/156] drm/nouveau/nvif: rework disp "sclass" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 101/156] drm/nouveau/nvif: rework disp "new caps" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 102/156] drm/nouveau/nvif: rework disp "new conn" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 103/156] drm/nouveau/nvif: rework conn "new event" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 104/156] drm/nouveau/nvif: remove conn from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 105/156] drm/nouveau/nvif: rework disp "new outp" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 106/156] drm/nouveau/nvif: rework outp "detect" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 107/156] drm/nouveau/nvif: rework outp "edid get" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 108/156] drm/nouveau/nvif: rework outp "load detect" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 109/156] drm/nouveau/nvif: rework outp "inherit" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 110/156] drm/nouveau/nvif: rework outp "acquire" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 111/156] drm/nouveau/nvif: rework outp "release" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 112/156] drm/nouveau/nvif: rework outp "bl get"/"bl set" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 113/156] drm/nouveau/nvif: rework outp "lvds config" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 114/156] drm/nouveau/nvif: rework outp "hdmi " Ben Skeggs
2024-04-16 23:39 ` [PATCH 115/156] drm/nouveau/nvif: rework outp "infoframe" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 116/156] drm/nouveau/nvif: rework outp "hda eld" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 117/156] drm/nouveau/nvif: rework outp "dp aux pwr" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 118/156] drm/nouveau/nvif: rework outp "dp aux xfer" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 119/156] drm/nouveau/nvif: rework outp "dp rates" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 120/156] drm/nouveau/nvif: rework outp "dp train" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 121/156] drm/nouveau/nvif: rework outp "dp drive" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 122/156] drm/nouveau/nvif: rework outp "dp sst" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 123/156] drm/nouveau/nvif: rework outp "dp mst id get"/"dp mst id put" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 124/156] drm/nouveau/nvif: rework outp "dp mst vcpi" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 125/156] drm/nouveau/nvif: remove outp from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 126/156] drm/nouveau/nvif: rework disp "new head" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 127/156] drm/nouveau/nvif: rework head "scanoutpos" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 128/156] drm/nouveau/nvif: rework head "new event" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 129/156] drm/nouveau/nvif: remove head from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 130/156] drm/nouveau/nvif: rework disp "new chan" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 131/156] drm/nouveau/nvif: remove disp from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 132/156] drm/nouveau/nvif: rework disp chan "new ctxdma" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 133/156] drm/nouveau/nvif: remove disp chans from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 134/156] drm/nouveau/nvif: rework device "new cgrp" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 135/156] drm/nouveau/nvif: rework device "new ctxdma" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 136/156] drm/nouveau/nvif: rework device/cgrp "new chan" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 137/156] drm/nouveau/nvif: remove mem from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 138/156] drm/nouveau/nvif: remove vmm " Ben Skeggs
2024-04-16 23:39 ` [PATCH 139/156] drm/nouveau/nvif: remove ctxdma " Ben Skeggs
2024-04-16 23:39 ` [PATCH 140/156] drm/nouveau/nvif: remove device " Ben Skeggs
2024-04-16 23:39 ` [PATCH 141/156] drm/nouveau/nvif: rework chan "map" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 142/156] drm/nouveau/nvif: rework chan "sclass" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 143/156] drm/nouveau/nvif: rework chan "new event" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 144/156] drm/nouveau/nvif: rework chan "new ctxdma" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 145/156] drm/nouveau/nvif: rework chan "new engobj" apis Ben Skeggs
2024-04-16 23:39 ` [PATCH 146/156] drm/nouveau/nvif: remove chan from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 147/156] drm/nouveau/nvif: rework engobj "mthd" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 148/156] drm/nouveau/nvif: rework engobj "new event" api Ben Skeggs
2024-04-16 23:39 ` [PATCH 149/156] drm/nouveau/nvif: remove engobj from object rb Ben Skeggs
2024-04-16 23:39 ` [PATCH 150/156] drm/nouveau/nvkm: switch nvkm_object to non-irqsafe spinlock Ben Skeggs
2024-04-16 23:39 ` [PATCH 151/156] drm/nouveau: remove client_mutex Ben Skeggs
2024-04-16 23:39 ` [PATCH 152/156] drm/nouveau: move nvxx_* definitions to nouveau_drv.h Ben Skeggs
2024-04-16 23:39 ` [PATCH 153/156] drm/nouveau: pass nouveau_drm to nvxx_* Ben Skeggs
2024-04-16 23:40 ` [PATCH 154/156] drm/nouveau: remove remaining usage of nvif_device.info Ben Skeggs
2024-04-16 23:40 ` [PATCH 155/156] drm/nouveau: remove remaining usage of nvif_device.object.map Ben Skeggs
2024-04-16 23:40 ` [PATCH 156/156] drm/nouveau: remove remaining usage of nouveau_drm.client Ben Skeggs
2024-04-17  4:15 ` [PATCH 000/156] drm/nouveau: replace "ioctl" interface between drm/nvkm Dave Airlie
2024-04-18 12:52   ` Ben Skeggs
2024-04-17 22:24 ` Danilo Krummrich
2024-04-18 14:03   ` Ben Skeggs
2024-04-22  9:28     ` Danilo Krummrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240416234002.19509-18-bskeggs@nvidia.com \
    --to=bskeggs@nvidia.com \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).