[PATCH 3/7] drm/vc4: Use drm_gem_fb_prepare_fb
Daniel Vetter
daniel at ffwll.ch
Thu Jun 27 07:38:46 UTC 2019
On Tue, Jun 25, 2019 at 10:42:04PM +0200, Daniel Vetter wrote:
> vc4 has switched to using drm_fb->obj[], so we can just use the helper
> unchanged.
>
> v2: Make it compile ... oops.
>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Eric Anholt <eric at anholt.net>
Merged up to this one, thanks for the reviews.
-Daniel
> ---
> drivers/gpu/drm/vc4/vc4_plane.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 0a0207c350a5..a996ca8ff972 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -20,6 +20,7 @@
> #include <drm/drm_fb_cma_helper.h>
> #include <drm/drm_plane_helper.h>
> #include <drm/drm_atomic_uapi.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
>
> #include "uapi/drm/vc4_drm.h"
> #include "vc4_drv.h"
> @@ -1123,7 +1124,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> struct vc4_bo *bo;
> - struct dma_fence *fence;
> int ret;
>
> if (!state->fb)
> @@ -1131,8 +1131,7 @@ static int vc4_prepare_fb(struct drm_plane *plane,
>
> bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base);
>
> - fence = reservation_object_get_excl_rcu(bo->base.base.resv);
> - drm_atomic_set_fence_for_plane(state, fence);
> + drm_gem_fb_prepare_fb(plane, state);
>
> if (plane->state->fb == state->fb)
> return 0;
> --
> 2.20.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list