aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv10_fence.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-05-04 02:25:47 -0400
committerBen Skeggs <bskeggs@redhat.com>2012-05-24 02:55:58 -0400
commit906c033e276877c1374c9159976b05746af3c86d (patch)
treef7e03b7148cf9f5caad6ac72b33e0354e94aad41 /drivers/gpu/drm/nouveau/nv10_fence.c
parent299bee10fb228fce4a3fc5dd89f32787a6e58fe5 (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/nv10_fence.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv10_fence.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c
index 10831eaff958..8a1b75009185 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -52,17 +52,19 @@ nv10_fence_emit(struct nouveau_fence *fence)
52 return ret; 52 return ret;
53} 53}
54 54
55
55static int 56static int
56nv10_fence_sync(struct nouveau_fence *fence, struct nouveau_channel *chan) 57nv10_fence_sync(struct nouveau_fence *fence,
58 struct nouveau_channel *prev, struct nouveau_channel *chan)
57{ 59{
58 return -ENODEV; 60 return -ENODEV;
59} 61}
60 62
61static int 63static int
62nv17_fence_sync(struct nouveau_fence *fence, struct nouveau_channel *chan) 64nv17_fence_sync(struct nouveau_fence *fence,
65 struct nouveau_channel *prev, struct nouveau_channel *chan)
63{ 66{
64 struct nv10_fence_priv *priv = nv_engine(chan->dev, NVOBJ_ENGINE_FENCE); 67 struct nv10_fence_priv *priv = nv_engine(chan->dev, NVOBJ_ENGINE_FENCE);
65 struct nouveau_channel *prev = fence->channel;
66 u32 value; 68 u32 value;
67 int ret; 69 int ret;
68 70