diff options
author | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-06-29 20:35:55 -0300 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-06-29 20:43:23 -0300 |
commit | 0bf9d8dd232c9c58488aa7031aa6f2e8f16328c4 (patch) | |
tree | fc9db12ef26d5d415ae67cae3025bbe553feac62 | |
parent | 25f494e51aadca2f8329e56ce7fbc56f3d7a18f1 (diff) | |
download | linux-virtio-fences.tar.gz |
drm/msm: check fences context inside the fence-arrayvirtio-fences
Now that we have dma_fence_match_context() it possible to check
if the context of all fences inside the fence array actually match
our own context. In that case we can skip waiting.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_submit.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 1c545ebe6a5a0..78f0a03b3c3e1 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -410,12 +410,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, if (!in_fence) return -EINVAL; - /* TODO if we get an array-fence due to userspace merging multiple - * fences, we need a way to determine if all the backing fences - * are from our own context.. - */ - - if (in_fence->context != gpu->fctx->context) { + if (!dma_fence_match_context(in_fence, gpu->fctx->context)) { ret = dma_fence_wait(in_fence, true); if (ret) return ret; |