diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-05-04 02:25:47 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-05-24 02:55:58 -0400 |
commit | 906c033e276877c1374c9159976b05746af3c86d (patch) | |
tree | f7e03b7148cf9f5caad6ac72b33e0354e94aad41 /drivers/gpu/drm/nouveau/nvc0_fence.c | |
parent | 299bee10fb228fce4a3fc5dd89f32787a6e58fe5 (diff) |
drm/nouveau/fence: fix a race where fence->channel can disappear
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_fence.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_fence.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c index 41545f15c4d0..817228cd1a95 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fence.c +++ b/drivers/gpu/drm/nouveau/nvc0_fence.c | |||
@@ -60,10 +60,11 @@ nvc0_fence_emit(struct nouveau_fence *fence) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | static int | 62 | static int |
63 | nvc0_fence_sync(struct nouveau_fence *fence, struct nouveau_channel *chan) | 63 | nvc0_fence_sync(struct nouveau_fence *fence, |
64 | struct nouveau_channel *prev, struct nouveau_channel *chan) | ||
64 | { | 65 | { |
65 | struct nvc0_fence_chan *fctx = chan->engctx[NVOBJ_ENGINE_FENCE]; | 66 | struct nvc0_fence_chan *fctx = chan->engctx[NVOBJ_ENGINE_FENCE]; |
66 | u64 addr = fctx->vma.offset + fence->channel->id * 16; | 67 | u64 addr = fctx->vma.offset + prev->id * 16; |
67 | int ret; | 68 | int ret; |
68 | 69 | ||
69 | ret = RING_SPACE(chan, 5); | 70 | ret = RING_SPACE(chan, 5); |