Skip to content

Commit

Permalink
drm/vc4: Always obey implicit sync
Browse files Browse the repository at this point in the history
Same justification as for drm_gem_fb_prepare_fb.

Cc: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-9-daniel.vetter@ffwll.ch
Link: https://patchwork.freedesktop.org/patch/msgid/20180409085134.27321-1-daniel.vetter@ffwll.ch
  • Loading branch information
Daniel Vetter committed Jun 20, 2018
1 parent 9d54fcd commit 2227a7a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,18 +861,21 @@ static int vc4_prepare_fb(struct drm_plane *plane,
struct dma_fence *fence;
int ret;

if ((plane->state->fb == state->fb) || !state->fb)
if (!state->fb)
return 0;

bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base);

fence = reservation_object_get_excl_rcu(bo->resv);
drm_atomic_set_fence_for_plane(state, fence);

if (plane->state->fb == state->fb)
return 0;

ret = vc4_bo_inc_usecnt(bo);
if (ret)
return ret;

fence = reservation_object_get_excl_rcu(bo->resv);
drm_atomic_set_fence_for_plane(state, fence);

return 0;
}

Expand Down

0 comments on commit 2227a7a

Please sign in to comment.