summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_fence.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-16 11:15:07 +0200
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-30 14:04:00 +0200
commite3be4c230dfadf79567a245505a47a90db97f968 (patch)
tree295bc183975875ae06e0bb6fb9920708a21f84cd /drivers/gpu/drm/nouveau/nouveau_fence.c
parent055dffdfb65eb8dcc8e7dabc84fd53059a92a23a (diff)
drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fence.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index decfe6c4ac07..dfd0b9ed4195 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -226,12 +226,10 @@ nouveau_fence_emit(struct nouveau_fence *fence, struct nouveau_channel *chan)
if (priv->uevent)
fence_init(&fence->base, &nouveau_fence_ops_uevent,
- &fctx->lock,
- priv->context_base + chan->chid, ++fctx->sequence);
+ &fctx->lock, fctx->context, ++fctx->sequence);
else
fence_init(&fence->base, &nouveau_fence_ops_legacy,
- &fctx->lock,
- priv->context_base + chan->chid, ++fctx->sequence);
+ &fctx->lock, fctx->context, ++fctx->sequence);
trace_fence_emit(&fence->base);
ret = fctx->emit(fence);
@@ -342,7 +340,7 @@ nouveau_fence_wait(struct nouveau_fence *fence, bool lazy, bool intr)
}
int
-nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool exclusive)
+nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool exclusive, bool intr)
{
struct nouveau_fence_chan *fctx = chan->fence;
struct fence *fence;
@@ -369,7 +367,7 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool e
prev = f->channel;
if (!prev || (prev != chan && (ret = fctx->sync(f, prev, chan))))
- ret = fence_wait(fence, true);
+ ret = fence_wait(fence, intr);
return ret;
}
@@ -387,8 +385,8 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool e
if (f)
prev = f->channel;
- if (!prev || (ret = fctx->sync(f, prev, chan)))
- ret = fence_wait(fence, true);
+ if (!prev || (prev != chan && (ret = fctx->sync(f, prev, chan))))
+ ret = fence_wait(fence, intr);
if (ret)
break;