|
@@ -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;
|