diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-04-05 17:44:48 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-06-20 14:45:48 +0200 |
commit | 2227a7a219fdd2b925b1e861f36255efd149ff6d (patch) | |
tree | 508cf6c164f029b5be896125fb9bca933ccbe28f /drivers/gpu/drm/vc4/vc4_plane.c | |
parent | 9d54fcd5416d84a3ab6a0b58846cff88ce62a4d4 (diff) | |
download | lwn-2227a7a219fdd2b925b1e861f36255efd149ff6d.tar.gz lwn-2227a7a219fdd2b925b1e861f36255efd149ff6d.zip |
drm/vc4: Always obey implicit sync
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
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_plane.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_plane.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 2575bd81a010..3922f5f5807d 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -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; } |