dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jyri Sarha <jsarha@ti.com>
Cc: peter.ujfalusi@ti.com, tomi.valkeinen@ti.com,
	laurent.pinchart@ideasonboard.com,
	dri-devel@lists.freedesktop.org, g-tammana@ti.com
Subject: Re: [PATCH] drm/tidss: Add prepare_fb to the plane helper funcs
Date: Thu, 27 Feb 2020 11:31:39 +0100	[thread overview]
Message-ID: <20200227103139.GU2363188@phenom.ffwll.local> (raw)
In-Reply-To: <20200227101307.4385-1-jsarha@ti.com>

On Thu, Feb 27, 2020 at 12:13:07PM +0200, Jyri Sarha wrote:
> From: Gowtham Tammana <g-tammana@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@ti.com>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>

Reviewed-by: Daniel Vetter <daniel.vetter@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-02-27 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 10:13 [PATCH] drm/tidss: Add prepare_fb to the plane helper funcs Jyri Sarha
2020-02-27 10:31 ` Daniel Vetter [this message]
2020-02-27 10:37   ` Daniel Vetter
2020-08-26 13:44 Tomi Valkeinen
2020-08-26 23:27 ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200227103139.GU2363188@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g-tammana@ti.com \
    --cc=jsarha@ti.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).