summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <ckoenig.leichtzumerken@gmail.com>2021-07-02 14:16:42 +0300
committerChristian König <christian.koenig@amd.com>2021-07-09 13:30:37 +0300
commit60f800b2bdfafa350e642c4e77dc646a008f2111 (patch)
treee42f5f1e5528382052781cfa656dc1b79f325397
parentea9a897b8affa0f7b4c90182b785dded74e434aa (diff)
downloadlinux-60f800b2bdfafa350e642c4e77dc646a008f2111.tar.xz
drm/msm: always wait for the exclusive fence
Drivers also need to to sync to the exclusive fence when a shared one is present. Completely untested since the driver won't even compile on !ARM. Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210702111642.17259-5-christian.koenig@amd.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index a94a43de95ef..72a07e311de3 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -817,17 +817,15 @@ int msm_gem_sync_object(struct drm_gem_object *obj,
struct dma_fence *fence;
int i, ret;
- fobj = dma_resv_shared_list(obj->resv);
- if (!fobj || (fobj->shared_count == 0)) {
- fence = dma_resv_excl_fence(obj->resv);
- /* don't need to wait on our own fences, since ring is fifo */
- if (fence && (fence->context != fctx->context)) {
- ret = dma_fence_wait(fence, true);
- if (ret)
- return ret;
- }
+ fence = dma_resv_excl_fence(obj->resv);
+ /* don't need to wait on our own fences, since ring is fifo */
+ if (fence && (fence->context != fctx->context)) {
+ ret = dma_fence_wait(fence, true);
+ if (ret)
+ return ret;
}
+ fobj = dma_resv_shared_list(obj->resv);
if (!exclusive || !fobj)
return 0;