From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic
Date: Thu, 26 Jul 2018 23:17:57 +0300 [thread overview]
Message-ID: <5705422.OO4MiyceDJ@avalon> (raw)
In-Reply-To: <20180726161756.1794-8-alexandru-cosmin.gheorghe@arm.com>
Hi Alexandru,
Thank you for the patch.
On Thursday, 26 July 2018 19:17:53 EEST Alexandru Gheorghe wrote:
> A new helper function(__drm_atomic_helper_plane_reset) has been added
> for linking a plane with its state and resetting the core
> properties(alpha, rotation, etc.) to their default values.
> Use that instead of duplicating the logic.
>
> __drm_atomic_helper_plane_reset initializes the alpha property to its
> max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE,
> so nothing changes regarding the alpha value.
>
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> ---
> drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +---
> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index c20f7ed48c8d..19a9d5f6db1c
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -689,15 +689,13 @@ static void rcar_du_plane_reset(struct drm_plane
> *plane)
> state = kzalloc(sizeof(*state), GFP_KERNEL);
> if (state == NULL)
> return;
As I'd like you to fix the two small issues below, could you also add a blank
line here ?
> + __drm_atomic_helper_plane_reset(plane, &state->state);
>
> state->hwindex = -1;
> state->source = RCAR_DU_PLANE_MEMORY;
> state->colorkey = RCAR_DU_COLORKEY_NONE;
> state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
>
This blank line should be removed.
> - plane->state = &state->state;
> - plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE;
> - plane->state->plane = plane;
> }
>
> static int rcar_du_plane_atomic_set_property(struct drm_plane *plane,
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 72eebeda518e..0a0aa490f805
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -346,11 +346,9 @@ static void rcar_du_vsp_plane_reset(struct drm_plane
> *plane)
> if (state == NULL)
> return;
>
> - state->state.alpha = DRM_BLEND_ALPHA_OPAQUE;
> + __drm_atomic_helper_plane_reset(plane, &state->state);
> state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
>
And this one too.
> - plane->state = &state->state;
> - plane->state->plane = plane;
> }
>
> static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = {
Apart from that,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2018-07-26 20:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 16:17 [PATCH v2 00/10] Add helper for plane reset Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset Alexandru Gheorghe
2018-07-26 20:20 ` Laurent Pinchart
2018-07-26 16:17 ` [PATCH v2 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 03/10] drm: mali-dp: " Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 04/10] drm: atmel-hlcdc: " Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 05/10] drm/exynos: " Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 06/10] drm/imx: " Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 07/10] drm: rcar-du: " Alexandru Gheorghe
2018-07-26 20:17 ` Laurent Pinchart [this message]
2018-07-26 16:17 ` [PATCH v2 08/10] drm/sun4i: " Alexandru Gheorghe
2018-07-27 12:54 ` Maxime Ripard
2018-07-26 16:17 ` [PATCH v2 09/10] drm/vc4: " Alexandru Gheorghe
2018-07-26 16:17 ` [PATCH v2 10/10] drm/vmwgfx: " Alexandru Gheorghe
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=5705422.OO4MiyceDJ@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox