.. | .. |
---|
21 | 21 | * |
---|
22 | 22 | * Authors: Ben Skeggs <bskeggs@redhat.com> |
---|
23 | 23 | */ |
---|
24 | | - |
---|
25 | 24 | #include "nouveau_drv.h" |
---|
26 | 25 | #include "nouveau_dma.h" |
---|
27 | 26 | #include "nv10_fence.h" |
---|
28 | 27 | |
---|
| 28 | +#include <nvif/push006c.h> |
---|
| 29 | + |
---|
| 30 | +#include <nvhw/class/cl006e.h> |
---|
| 31 | + |
---|
29 | 32 | int |
---|
30 | 33 | nv10_fence_emit(struct nouveau_fence *fence) |
---|
31 | 34 | { |
---|
32 | | - struct nouveau_channel *chan = fence->channel; |
---|
33 | | - int ret = RING_SPACE(chan, 2); |
---|
| 35 | + struct nvif_push *push = fence->channel->chan.push; |
---|
| 36 | + int ret = PUSH_WAIT(push, 2); |
---|
34 | 37 | if (ret == 0) { |
---|
35 | | - BEGIN_NV04(chan, 0, NV10_SUBCHAN_REF_CNT, 1); |
---|
36 | | - OUT_RING (chan, fence->base.seqno); |
---|
37 | | - FIRE_RING (chan); |
---|
| 38 | + PUSH_MTHD(push, NV06E, SET_REFERENCE, fence->base.seqno); |
---|
| 39 | + PUSH_KICK(push); |
---|
38 | 40 | } |
---|
39 | 41 | return ret; |
---|
40 | 42 | } |
---|
.. | .. |
---|
50 | 52 | u32 |
---|
51 | 53 | nv10_fence_read(struct nouveau_channel *chan) |
---|
52 | 54 | { |
---|
53 | | - return nvif_rd32(&chan->user, 0x0048); |
---|
| 55 | + return NVIF_RD32(&chan->user, NV06E, REFERENCE); |
---|
54 | 56 | } |
---|
55 | 57 | |
---|
56 | 58 | void |
---|
.. | .. |
---|
58 | 60 | { |
---|
59 | 61 | struct nv10_fence_chan *fctx = chan->fence; |
---|
60 | 62 | nouveau_fence_context_del(&fctx->base); |
---|
61 | | - nvif_object_fini(&fctx->sema); |
---|
| 63 | + nvif_object_dtor(&fctx->sema); |
---|
62 | 64 | chan->fence = NULL; |
---|
63 | 65 | nouveau_fence_context_free(&fctx->base); |
---|
64 | 66 | } |
---|