From: Daniel Vetter <daniel@ffwll.ch>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 1/6] drm: Don't implement empty prepare_fb()/cleanup_fb()
Date: Fri, 19 Aug 2016 10:59:22 +0200 [thread overview]
Message-ID: <20160819085922.GX6232@phenom.ffwll.local> (raw)
In-Reply-To: <1471595974-28960-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On Fri, Aug 19, 2016 at 11:39:29AM +0300, Laurent Pinchart wrote:
> The plane .prepare_fb() and .cleanup_fb() helpers are optional, there's
> no need to implement empty stubs, and no need to explicitly set the
> function pointers to NULL either.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Rebased onto Chris' patch (which I had already in the queue) and applied
to drm-misc.
Thanks, Daniel
> ---
> drivers/gpu/drm/arc/arcpgu_crtc.c | 2 --
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 15 ---------------
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 15 ---------------
> drivers/gpu/drm/tegra/dc.c | 17 -----------------
> drivers/gpu/drm/vc4/vc4_plane.c | 2 --
> 5 files changed, 51 deletions(-)
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> index ee0a61c2861b..7130b044b004 100644
> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> @@ -183,8 +183,6 @@ static void arc_pgu_plane_atomic_update(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
> - .prepare_fb = NULL,
> - .cleanup_fb = NULL,
> .atomic_update = arc_pgu_plane_atomic_update,
> };
>
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> index e50467a0deb0..a7e5486bd1e9 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> @@ -169,25 +169,10 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,
> return;
> }
>
> -static void
> -fsl_dcu_drm_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> -}
> -
> -static int
> -fsl_dcu_drm_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - return 0;
> -}
> -
> static const struct drm_plane_helper_funcs fsl_dcu_drm_plane_helper_funcs = {
> .atomic_check = fsl_dcu_drm_plane_atomic_check,
> .atomic_disable = fsl_dcu_drm_plane_atomic_disable,
> .atomic_update = fsl_dcu_drm_plane_atomic_update,
> - .cleanup_fb = fsl_dcu_drm_plane_cleanup_fb,
> - .prepare_fb = fsl_dcu_drm_plane_prepare_fb,
> };
>
> static void fsl_dcu_drm_plane_destroy(struct drm_plane *plane)
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index c3707d47cd89..635ead039b8b 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -815,19 +815,6 @@ static void ade_disable_channel(struct ade_plane *aplane)
> ade_compositor_routing_disable(base, ch);
> }
>
> -static int ade_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - /* do nothing */
> - return 0;
> -}
> -
> -static void ade_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *old_state)
> -{
> - /* do nothing */
> -}
> -
> static int ade_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> @@ -895,8 +882,6 @@ static void ade_plane_atomic_disable(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {
> - .prepare_fb = ade_plane_prepare_fb,
> - .cleanup_fb = ade_plane_cleanup_fb,
> .atomic_check = ade_plane_atomic_check,
> .atomic_update = ade_plane_atomic_update,
> .atomic_disable = ade_plane_atomic_disable,
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 8495bd01b544..3de7ce33d3d4 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -480,17 +480,6 @@ static const struct drm_plane_funcs tegra_primary_plane_funcs = {
> .atomic_destroy_state = tegra_plane_atomic_destroy_state,
> };
>
> -static int tegra_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - return 0;
> -}
> -
> -static void tegra_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *old_fb)
> -{
> -}
> -
> static int tegra_plane_state_add(struct tegra_plane *plane,
> struct drm_plane_state *state)
> {
> @@ -624,8 +613,6 @@ static void tegra_plane_atomic_disable(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs tegra_primary_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_plane_atomic_check,
> .atomic_update = tegra_plane_atomic_update,
> .atomic_disable = tegra_plane_atomic_disable,
> @@ -796,8 +783,6 @@ static const struct drm_plane_funcs tegra_cursor_plane_funcs = {
> };
>
> static const struct drm_plane_helper_funcs tegra_cursor_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_cursor_atomic_check,
> .atomic_update = tegra_cursor_atomic_update,
> .atomic_disable = tegra_cursor_atomic_disable,
> @@ -866,8 +851,6 @@ static const uint32_t tegra_overlay_plane_formats[] = {
> };
>
> static const struct drm_plane_helper_funcs tegra_overlay_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_plane_atomic_check,
> .atomic_update = tegra_plane_atomic_update,
> .atomic_disable = tegra_plane_atomic_disable,
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 29e4b400e25e..881bf489478b 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -735,8 +735,6 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
> }
>
> static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
> - .prepare_fb = NULL,
> - .cleanup_fb = NULL,
> .atomic_check = vc4_plane_atomic_check,
> .atomic_update = vc4_plane_atomic_update,
> };
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/6] drm: Don't implement empty prepare_fb()/cleanup_fb()
Date: Fri, 19 Aug 2016 10:59:22 +0200 [thread overview]
Message-ID: <20160819085922.GX6232@phenom.ffwll.local> (raw)
In-Reply-To: <1471595974-28960-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On Fri, Aug 19, 2016 at 11:39:29AM +0300, Laurent Pinchart wrote:
> The plane .prepare_fb() and .cleanup_fb() helpers are optional, there's
> no need to implement empty stubs, and no need to explicitly set the
> function pointers to NULL either.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Rebased onto Chris' patch (which I had already in the queue) and applied
to drm-misc.
Thanks, Daniel
> ---
> drivers/gpu/drm/arc/arcpgu_crtc.c | 2 --
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 15 ---------------
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 15 ---------------
> drivers/gpu/drm/tegra/dc.c | 17 -----------------
> drivers/gpu/drm/vc4/vc4_plane.c | 2 --
> 5 files changed, 51 deletions(-)
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> index ee0a61c2861b..7130b044b004 100644
> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> @@ -183,8 +183,6 @@ static void arc_pgu_plane_atomic_update(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
> - .prepare_fb = NULL,
> - .cleanup_fb = NULL,
> .atomic_update = arc_pgu_plane_atomic_update,
> };
>
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> index e50467a0deb0..a7e5486bd1e9 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> @@ -169,25 +169,10 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,
> return;
> }
>
> -static void
> -fsl_dcu_drm_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> -}
> -
> -static int
> -fsl_dcu_drm_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - return 0;
> -}
> -
> static const struct drm_plane_helper_funcs fsl_dcu_drm_plane_helper_funcs = {
> .atomic_check = fsl_dcu_drm_plane_atomic_check,
> .atomic_disable = fsl_dcu_drm_plane_atomic_disable,
> .atomic_update = fsl_dcu_drm_plane_atomic_update,
> - .cleanup_fb = fsl_dcu_drm_plane_cleanup_fb,
> - .prepare_fb = fsl_dcu_drm_plane_prepare_fb,
> };
>
> static void fsl_dcu_drm_plane_destroy(struct drm_plane *plane)
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index c3707d47cd89..635ead039b8b 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -815,19 +815,6 @@ static void ade_disable_channel(struct ade_plane *aplane)
> ade_compositor_routing_disable(base, ch);
> }
>
> -static int ade_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - /* do nothing */
> - return 0;
> -}
> -
> -static void ade_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *old_state)
> -{
> - /* do nothing */
> -}
> -
> static int ade_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> @@ -895,8 +882,6 @@ static void ade_plane_atomic_disable(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs ade_plane_helper_funcs = {
> - .prepare_fb = ade_plane_prepare_fb,
> - .cleanup_fb = ade_plane_cleanup_fb,
> .atomic_check = ade_plane_atomic_check,
> .atomic_update = ade_plane_atomic_update,
> .atomic_disable = ade_plane_atomic_disable,
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 8495bd01b544..3de7ce33d3d4 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -480,17 +480,6 @@ static const struct drm_plane_funcs tegra_primary_plane_funcs = {
> .atomic_destroy_state = tegra_plane_atomic_destroy_state,
> };
>
> -static int tegra_plane_prepare_fb(struct drm_plane *plane,
> - const struct drm_plane_state *new_state)
> -{
> - return 0;
> -}
> -
> -static void tegra_plane_cleanup_fb(struct drm_plane *plane,
> - const struct drm_plane_state *old_fb)
> -{
> -}
> -
> static int tegra_plane_state_add(struct tegra_plane *plane,
> struct drm_plane_state *state)
> {
> @@ -624,8 +613,6 @@ static void tegra_plane_atomic_disable(struct drm_plane *plane,
> }
>
> static const struct drm_plane_helper_funcs tegra_primary_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_plane_atomic_check,
> .atomic_update = tegra_plane_atomic_update,
> .atomic_disable = tegra_plane_atomic_disable,
> @@ -796,8 +783,6 @@ static const struct drm_plane_funcs tegra_cursor_plane_funcs = {
> };
>
> static const struct drm_plane_helper_funcs tegra_cursor_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_cursor_atomic_check,
> .atomic_update = tegra_cursor_atomic_update,
> .atomic_disable = tegra_cursor_atomic_disable,
> @@ -866,8 +851,6 @@ static const uint32_t tegra_overlay_plane_formats[] = {
> };
>
> static const struct drm_plane_helper_funcs tegra_overlay_plane_helper_funcs = {
> - .prepare_fb = tegra_plane_prepare_fb,
> - .cleanup_fb = tegra_plane_cleanup_fb,
> .atomic_check = tegra_plane_atomic_check,
> .atomic_update = tegra_plane_atomic_update,
> .atomic_disable = tegra_plane_atomic_disable,
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 29e4b400e25e..881bf489478b 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -735,8 +735,6 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
> }
>
> static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
> - .prepare_fb = NULL,
> - .cleanup_fb = NULL,
> .atomic_check = vc4_plane_atomic_check,
> .atomic_update = vc4_plane_atomic_update,
> };
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> 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
next prev parent reply other threads:[~2016-08-19 8:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 8:39 [PATCH 0/6] R-Car DU: Fix IOMMU operation when connected to VSP Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:39 ` [PATCH 1/6] drm: Don't implement empty prepare_fb()/cleanup_fb() Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:59 ` Daniel Vetter [this message]
2016-08-19 8:59 ` Daniel Vetter
2016-08-19 8:39 ` [PATCH 2/6] drm: Unconstify state argument to prepare_fb()/cleanup_fb() Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:39 ` [PATCH 3/6] v4l: rcar-fcp: Don't get/put module reference Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:44 ` Geert Uytterhoeven
2016-08-19 8:44 ` Geert Uytterhoeven
2016-08-19 8:39 ` [PATCH 4/6] v4l: rcar-fcp: Add an API to retrieve the FCP device Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:39 ` [PATCH 5/6] v4l: vsp1: Add API to map and unmap DRM buffers through the VSP Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-08-19 8:39 ` [PATCH 6/6] drm: rcar-du: Map memory through the VSP device Laurent Pinchart
2016-08-19 8:39 ` Laurent Pinchart
2016-09-07 8:01 ` [PATCH 0/6] R-Car DU: Fix IOMMU operation when connected to VSP Magnus Damm
2016-09-07 8:01 ` Magnus Damm
2017-05-14 17:01 ` Laurent Pinchart
2017-05-14 17:01 ` Laurent Pinchart
2017-01-10 10:09 ` Geert Uytterhoeven
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=20160819085922.GX6232@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.