[PATCH] drm/tidss: Add prepare_fb to the plane helper funcs

Daniel Vetter daniel at ffwll.ch
Thu Feb 27 10:31:39 UTC 2020


On Thu, Feb 27, 2020 at 12:13:07PM +0200, Jyri Sarha wrote:
> From: Gowtham Tammana <g-tammana at ti.com>
> 
> drm_gem_fb_prepare_fb() extracts fence and attaches to plane state.
> The fence info is needed if implicit fencing is used. Add this as
> prepare_fb function pointer to plane helper funcs.
> 
> Signed-off-by: Gowtham Tammana <g-tammana at ti.com>
> Signed-off-by: Jyri Sarha <jsarha at ti.com>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

I still wonder what we could do to catch these kind of bugs. There's
really no good reason to ever not do this as the fallback ...

Maybe time to just make this the default prepare_fb hook if neither
prepare_fb nore cleanup_fb are provided? Then roll out the removal for all
the drivers that just set this one. Otherwise we'll keep playing
whack-a-mole here forever ...

Ofc would need a bit of review and kerneldoc update, but I think that'd be
the right approach.
-Daniel

> ---
>  drivers/gpu/drm/tidss/tidss_plane.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tidss/tidss_plane.c b/drivers/gpu/drm/tidss/tidss_plane.c
> index ff99b2dd4a17..345678faaeb6 100644
> --- a/drivers/gpu/drm/tidss/tidss_plane.c
> +++ b/drivers/gpu/drm/tidss/tidss_plane.c
> @@ -10,6 +10,7 @@
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_fourcc.h>
>  #include <drm/drm_fb_cma_helper.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
>  
>  #include "tidss_crtc.h"
>  #include "tidss_dispc.h"
> @@ -142,6 +143,7 @@ static void tidss_plane_atomic_disable(struct drm_plane *plane,
>  }
>  
>  static const struct drm_plane_helper_funcs tidss_plane_helper_funcs = {
> +	.prepare_fb = drm_gem_fb_prepare_fb,
>  	.atomic_check = tidss_plane_atomic_check,
>  	.atomic_update = tidss_plane_atomic_update,
>  	.atomic_disable = tidss_plane_atomic_disable,
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list