diff options
author | Maarten Lankhorst <maarten.lankhorst@ubuntu.com> | 2014-01-09 05:03:11 -0500 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-09-02 10:41:50 -0400 |
commit | 29ba89b2371d466ca68973525816cf10debc2655 (patch) | |
tree | 0433045bea840aed27057bedf422c02018b66d4e /drivers/gpu/drm/nouveau/nv04_fence.c | |
parent | 2298e804e96eb3635c39519c8287befd92460303 (diff) |
drm/nouveau: rework to new fence interface
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_fence.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_fence.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c index 239c2c5a9615..4484131d826a 100644 --- a/drivers/gpu/drm/nouveau/nv04_fence.c +++ b/drivers/gpu/drm/nouveau/nv04_fence.c | |||
@@ -41,7 +41,7 @@ nv04_fence_emit(struct nouveau_fence *fence) | |||
41 | int ret = RING_SPACE(chan, 2); | 41 | int ret = RING_SPACE(chan, 2); |
42 | if (ret == 0) { | 42 | if (ret == 0) { |
43 | BEGIN_NV04(chan, NvSubSw, 0x0150, 1); | 43 | BEGIN_NV04(chan, NvSubSw, 0x0150, 1); |
44 | OUT_RING (chan, fence->sequence); | 44 | OUT_RING (chan, fence->base.seqno); |
45 | FIRE_RING (chan); | 45 | FIRE_RING (chan); |
46 | } | 46 | } |
47 | return ret; | 47 | return ret; |
@@ -75,7 +75,7 @@ nv04_fence_context_new(struct nouveau_channel *chan) | |||
75 | { | 75 | { |
76 | struct nv04_fence_chan *fctx = kzalloc(sizeof(*fctx), GFP_KERNEL); | 76 | struct nv04_fence_chan *fctx = kzalloc(sizeof(*fctx), GFP_KERNEL); |
77 | if (fctx) { | 77 | if (fctx) { |
78 | nouveau_fence_context_new(&fctx->base); | 78 | nouveau_fence_context_new(chan, &fctx->base); |
79 | fctx->base.emit = nv04_fence_emit; | 79 | fctx->base.emit = nv04_fence_emit; |
80 | fctx->base.sync = nv04_fence_sync; | 80 | fctx->base.sync = nv04_fence_sync; |
81 | fctx->base.read = nv04_fence_read; | 81 | fctx->base.read = nv04_fence_read; |
@@ -105,5 +105,7 @@ nv04_fence_create(struct nouveau_drm *drm) | |||
105 | priv->base.dtor = nv04_fence_destroy; | 105 | priv->base.dtor = nv04_fence_destroy; |
106 | priv->base.context_new = nv04_fence_context_new; | 106 | priv->base.context_new = nv04_fence_context_new; |
107 | priv->base.context_del = nv04_fence_context_del; | 107 | priv->base.context_del = nv04_fence_context_del; |
108 | priv->base.contexts = 15; | ||
109 | priv->base.context_base = fence_context_alloc(priv->base.contexts); | ||
108 | return 0; | 110 | return 0; |
109 | } | 111 | } |