Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vc4: Hook up plane prepare_fb to lookup dma-buf reservations.

This way drm_atomic_helper_wait_for_fences() will actually do
something. The vc4_seqno_cb has been doing the fence waits on V3D
manually, so far.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-1-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

+17
+17
drivers/gpu/drm/vc4/vc4_plane.c
··· 759 759 vc4_state->dlist[vc4_state->ptr0_offset] = addr; 760 760 } 761 761 762 + static int vc4_prepare_fb(struct drm_plane *plane, 763 + struct drm_plane_state *state) 764 + { 765 + struct vc4_bo *bo; 766 + struct dma_fence *fence; 767 + 768 + if ((plane->state->fb == state->fb) || !state->fb) 769 + return 0; 770 + 771 + bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base); 772 + fence = reservation_object_get_excl_rcu(bo->resv); 773 + drm_atomic_set_fence_for_plane(state, fence); 774 + 775 + return 0; 776 + } 777 + 762 778 static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { 763 779 .atomic_check = vc4_plane_atomic_check, 764 780 .atomic_update = vc4_plane_atomic_update, 781 + .prepare_fb = vc4_prepare_fb, 765 782 }; 766 783 767 784 static void vc4_plane_destroy(struct drm_plane *plane)