Commit 0df26c0d authored by Ben Skeggs's avatar Ben Skeggs Committed by Danilo Krummrich

drm/nouveau: remove push pointer from nouveau_channel

The struct itself lives in nouveau_channel already, just use that.
Signed-off-by: default avatarBen Skeggs <bskeggs@nvidia.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-36-bskeggs@nvidia.com
parent 034142a3
...@@ -1115,7 +1115,7 @@ nv04_page_flip_emit(struct nouveau_channel *chan, ...@@ -1115,7 +1115,7 @@ nv04_page_flip_emit(struct nouveau_channel *chan,
struct nouveau_fence_chan *fctx = chan->fence; struct nouveau_fence_chan *fctx = chan->fence;
struct nouveau_drm *drm = chan->cli->drm; struct nouveau_drm *drm = chan->cli->drm;
struct drm_device *dev = drm->dev; struct drm_device *dev = drm->dev;
struct nvif_push *push = chan->chan.push; struct nvif_push *push = &chan->chan.push;
unsigned long flags; unsigned long flags;
int ret; int ret;
...@@ -1173,7 +1173,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ...@@ -1173,7 +1173,7 @@ nv04_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
if (!chan) if (!chan)
return -ENODEV; return -ENODEV;
cli = chan->cli; cli = chan->cli;
push = chan->chan.push; push = &chan->chan.push;
s = kzalloc(sizeof(*s), GFP_KERNEL); s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s) if (!s)
......
...@@ -47,7 +47,7 @@ int ...@@ -47,7 +47,7 @@ int
nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
struct ttm_resource *old_reg, struct ttm_resource *new_reg) 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_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, old_reg);
u32 src_offset = old_reg->start << PAGE_SHIFT; u32 src_offset = old_reg->start << PAGE_SHIFT;
u32 dst_ctxdma = nouveau_bo_mem_ctxdma(bo, chan, new_reg); 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, ...@@ -96,7 +96,7 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
int int
nv04_bo_move_init(struct nouveau_channel *chan, u32 handle) 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; int ret;
ret = PUSH_WAIT(push, 4); ret = PUSH_WAIT(push, 4);
......
...@@ -40,7 +40,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -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 ttm_resource *old_reg, struct ttm_resource *new_reg)
{ {
struct nouveau_mem *mem = nouveau_mem(old_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 length = new_reg->size;
u64 src_offset = mem->vma[0].addr; u64 src_offset = mem->vma[0].addr;
u64 dst_offset = mem->vma[1].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, ...@@ -136,7 +136,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
int int
nv50_bo_move_init(struct nouveau_channel *chan, u32 handle) 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; int ret;
ret = PUSH_WAIT(push, 6); ret = PUSH_WAIT(push, 6);
......
...@@ -37,7 +37,7 @@ nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -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 ttm_resource *old_reg, struct ttm_resource *new_reg)
{ {
struct nouveau_mem *mem = nouveau_mem(old_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; int ret;
ret = PUSH_WAIT(push, 7); ret = PUSH_WAIT(push, 7);
......
...@@ -41,7 +41,7 @@ nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -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 ttm_resource *old_reg, struct ttm_resource *new_reg)
{ {
struct nouveau_mem *mem = nouveau_mem(old_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 src_offset = mem->vma[0].addr;
u64 dst_offset = mem->vma[1].addr; u64 dst_offset = mem->vma[1].addr;
u32 page_count = PFN_UP(new_reg->size); u32 page_count = PFN_UP(new_reg->size);
......
...@@ -38,7 +38,7 @@ int ...@@ -38,7 +38,7 @@ int
nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
struct ttm_resource *old_reg, struct ttm_resource *new_reg) 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); struct nouveau_mem *mem = nouveau_mem(old_reg);
u64 src_offset = mem->vma[0].addr; u64 src_offset = mem->vma[0].addr;
u64 dst_offset = mem->vma[1].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, ...@@ -86,7 +86,7 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
int int
nvc0_bo_move_init(struct nouveau_channel *chan, u32 handle) 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; int ret;
ret = PUSH_WAIT(push, 2); ret = PUSH_WAIT(push, 2);
......
...@@ -34,7 +34,7 @@ nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -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 ttm_resource *old_reg, struct ttm_resource *new_reg)
{ {
struct nouveau_mem *mem = nouveau_mem(old_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 src_offset = mem->vma[0].addr;
u64 dst_offset = mem->vma[1].addr; u64 dst_offset = mem->vma[1].addr;
u32 page_count = PFN_UP(new_reg->size); u32 page_count = PFN_UP(new_reg->size);
......
...@@ -39,7 +39,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -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 ttm_resource *old_reg, struct ttm_resource *new_reg)
{ {
struct nouveau_mem *mem = nouveau_mem(old_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; int ret;
ret = PUSH_WAIT(push, 10); ret = PUSH_WAIT(push, 10);
...@@ -78,7 +78,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -78,7 +78,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
int int
nve0_bo_move_init(struct nouveau_channel *chan, u32 handle) 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; int ret;
ret = PUSH_WAIT(push, 2); ret = PUSH_WAIT(push, 2);
......
...@@ -117,24 +117,24 @@ nouveau_channel_del(struct nouveau_channel **pchan) ...@@ -117,24 +117,24 @@ nouveau_channel_del(struct nouveau_channel **pchan)
static void static void
nouveau_channel_kick(struct nvif_push *push) nouveau_channel_kick(struct nvif_push *push)
{ {
struct nouveau_channel *chan = container_of(push, typeof(*chan), chan._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); chan->dma.cur = chan->dma.cur + (chan->chan.push.cur - chan->chan.push.bgn);
FIRE_RING(chan); FIRE_RING(chan);
chan->chan._push.bgn = chan->chan._push.cur; chan->chan.push.bgn = chan->chan.push.cur;
} }
static int static int
nouveau_channel_wait(struct nvif_push *push, u32 size) 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; 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); ret = RING_SPACE(chan, size);
if (ret == 0) { if (ret == 0) {
chan->chan._push.bgn = chan->chan._push.mem.object.map.ptr; 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.bgn = chan->chan.push.bgn + chan->dma.cur;
chan->chan._push.cur = chan->chan._push.bgn; chan->chan.push.cur = chan->chan.push.bgn;
chan->chan._push.end = chan->chan._push.bgn + size; chan->chan.push.end = chan->chan.push.bgn + size;
} }
return ret; return ret;
} }
...@@ -176,13 +176,12 @@ nouveau_channel_prep(struct nouveau_cli *cli, ...@@ -176,13 +176,12 @@ nouveau_channel_prep(struct nouveau_cli *cli,
return ret; return ret;
} }
chan->chan._push.mem.object.parent = cli->base.object.parent; chan->chan.push.mem.object.parent = cli->base.object.parent;
chan->chan._push.mem.object.client = &cli->base; chan->chan.push.mem.object.client = &cli->base;
chan->chan._push.mem.object.name = "chanPush"; chan->chan.push.mem.object.name = "chanPush";
chan->chan._push.mem.object.map.ptr = chan->push.buffer->kmap.virtual; chan->chan.push.mem.object.map.ptr = chan->push.buffer->kmap.virtual;
chan->chan._push.wait = nouveau_channel_wait; chan->chan.push.wait = nouveau_channel_wait;
chan->chan._push.kick = nouveau_channel_kick; chan->chan.push.kick = nouveau_channel_kick;
chan->chan.push = &chan->chan._push;
/* create dma object covering the *entire* memory space that the /* create dma object covering the *entire* memory space that the
* pushbuf lives in, this is because the GEM code requires that * 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) ...@@ -461,12 +460,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
chan->dma.cur = chan->dma.put; chan->dma.cur = chan->dma.put;
chan->dma.free = chan->dma.max - chan->dma.cur; 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) if (ret)
return ret; return ret;
for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) 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) */ /* allocate software object class (used for fences on <= nv05) */
if (device->info.family < NV_DEVICE_INFO_V0_CELSIUS) { if (device->info.family < NV_DEVICE_INFO_V0_CELSIUS) {
...@@ -476,12 +475,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) ...@@ -476,12 +475,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
if (ret) if (ret)
return ret; return ret;
ret = PUSH_WAIT(chan->chan.push, 2); ret = PUSH_WAIT(&chan->chan.push, 2);
if (ret) if (ret)
return ret; return ret;
PUSH_NVSQ(chan->chan.push, NV_SW, 0x0000, chan->nvsw.handle); PUSH_NVSQ(&chan->chan.push, NV_SW, 0x0000, chan->nvsw.handle);
PUSH_KICK(chan->chan.push); PUSH_KICK(&chan->chan.push);
} }
/* initialise synchronisation */ /* initialise synchronisation */
......
...@@ -8,8 +8,7 @@ struct nvif_device; ...@@ -8,8 +8,7 @@ struct nvif_device;
struct nouveau_channel { struct nouveau_channel {
struct { struct {
struct nvif_push _push; struct nvif_push push;
struct nvif_push *push;
} chan; } chan;
struct nouveau_cli *cli; struct nouveau_cli *cli;
......
...@@ -443,7 +443,7 @@ nvc0b5_migrate_copy(struct nouveau_drm *drm, u64 npages, ...@@ -443,7 +443,7 @@ nvc0b5_migrate_copy(struct nouveau_drm *drm, u64 npages,
enum nouveau_aper dst_aper, u64 dst_addr, enum nouveau_aper dst_aper, u64 dst_addr,
enum nouveau_aper src_aper, u64 src_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; u32 launch_dma = 0;
int ret; int ret;
...@@ -516,7 +516,7 @@ static int ...@@ -516,7 +516,7 @@ static int
nvc0b5_migrate_clear(struct nouveau_drm *drm, u32 length, nvc0b5_migrate_clear(struct nouveau_drm *drm, u32 length,
enum nouveau_aper dst_aper, u64 dst_addr) 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; u32 launch_dma = 0;
int ret; int ret;
......
...@@ -382,7 +382,8 @@ nouveau_accel_gr_init(struct nouveau_drm *drm) ...@@ -382,7 +382,8 @@ nouveau_accel_gr_init(struct nouveau_drm *drm)
} }
if (ret == 0) { if (ret == 0) {
struct nvif_push *push = drm->channel->chan.push; struct nvif_push *push = &drm->channel->chan.push;
ret = PUSH_WAIT(push, 8); ret = PUSH_WAIT(push, 8);
if (ret == 0) { if (ret == 0) {
if (device->info.chipset >= 0x11) { if (device->info.chipset >= 0x11) {
......
...@@ -871,7 +871,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -871,7 +871,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
} }
} else } else
if (drm->client.device.info.chipset >= 0x25) { 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) { if (ret) {
NV_PRINTK(err, cli, "cal_space: %d\n", ret); NV_PRINTK(err, cli, "cal_space: %d\n", ret);
goto out; goto out;
...@@ -881,11 +881,11 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -881,11 +881,11 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
struct nouveau_bo *nvbo = (void *)(unsigned long) struct nouveau_bo *nvbo = (void *)(unsigned long)
bo[push[i].bo_index].user_priv; bo[push[i].bo_index].user_priv;
PUSH_CALL(chan->chan.push, nvbo->offset + push[i].offset); PUSH_CALL(&chan->chan.push, nvbo->offset + push[i].offset);
PUSH_DATA(chan->chan.push, 0); PUSH_DATA(&chan->chan.push, 0);
} }
} else { } 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) { if (ret) {
NV_PRINTK(err, cli, "jmp_space: %d\n", ret); NV_PRINTK(err, cli, "jmp_space: %d\n", ret);
goto out; goto out;
...@@ -914,10 +914,10 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, ...@@ -914,10 +914,10 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
push[i].length - 8) / 4, cmd); push[i].length - 8) / 4, cmd);
} }
PUSH_JUMP(chan->chan.push, nvbo->offset + push[i].offset); PUSH_JUMP(&chan->chan.push, nvbo->offset + push[i].offset);
PUSH_DATA(chan->chan.push, 0); PUSH_DATA(&chan->chan.push, 0);
for (j = 0; j < NOUVEAU_DMA_SKIPS; j++) for (j = 0; j < NOUVEAU_DMA_SKIPS; j++)
PUSH_DATA(chan->chan.push, 0); PUSH_DATA(&chan->chan.push, 0);
} }
} }
......
...@@ -39,7 +39,7 @@ struct nv04_fence_priv { ...@@ -39,7 +39,7 @@ struct nv04_fence_priv {
static int static int
nv04_fence_emit(struct nouveau_fence *fence) 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); int ret = PUSH_WAIT(push, 2);
if (ret == 0) { if (ret == 0) {
PUSH_NVSQ(push, NV_SW, 0x0150, fence->base.seqno); PUSH_NVSQ(push, NV_SW, 0x0150, fence->base.seqno);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
int int
nv10_fence_emit(struct nouveau_fence *fence) 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); int ret = PUSH_WAIT(push, 2);
if (ret == 0) { if (ret == 0) {
PUSH_MTHD(push, NV06E, SET_REFERENCE, fence->base.seqno); PUSH_MTHD(push, NV06E, SET_REFERENCE, fence->base.seqno);
......
...@@ -39,8 +39,8 @@ nv17_fence_sync(struct nouveau_fence *fence, ...@@ -39,8 +39,8 @@ nv17_fence_sync(struct nouveau_fence *fence,
struct nouveau_cli *cli = prev->cli; struct nouveau_cli *cli = prev->cli;
struct nv10_fence_priv *priv = cli->drm->fence; struct nv10_fence_priv *priv = cli->drm->fence;
struct nv10_fence_chan *fctx = chan->fence; struct nv10_fence_chan *fctx = chan->fence;
struct nvif_push *ppush = prev->chan.push; struct nvif_push *ppush = &prev->chan.push;
struct nvif_push *npush = chan->chan.push; struct nvif_push *npush = &chan->chan.push;
u32 value; u32 value;
int ret; int ret;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
static int static int
nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence) 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); int ret = PUSH_WAIT(push, 8);
if (ret == 0) { if (ret == 0) {
PUSH_MTHD(push, NV826F, SET_CONTEXT_DMA_SEMAPHORE, chan->vram.handle); 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) ...@@ -58,7 +58,7 @@ nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
static int static int
nv84_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence) 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); int ret = PUSH_WAIT(push, 7);
if (ret == 0) { if (ret == 0) {
PUSH_MTHD(push, NV826F, SET_CONTEXT_DMA_SEMAPHORE, chan->vram.handle); PUSH_MTHD(push, NV826F, SET_CONTEXT_DMA_SEMAPHORE, chan->vram.handle);
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
static int static int
nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence) 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); int ret = PUSH_WAIT(push, 6);
if (ret == 0) { if (ret == 0) {
PUSH_MTHD(push, NV906F, SEMAPHOREA, PUSH_MTHD(push, NV906F, SEMAPHOREA,
...@@ -57,7 +57,7 @@ nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence) ...@@ -57,7 +57,7 @@ nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
static int static int
nvc0_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence) 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); int ret = PUSH_WAIT(push, 5);
if (ret == 0) { if (ret == 0) {
PUSH_MTHD(push, NV906F, SEMAPHOREA, PUSH_MTHD(push, NV906F, SEMAPHOREA,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment