From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>,
open list <linux-kernel@vger.kernel.org>,
Sean Paul <sean@poorly.run>
Subject: Re: [PATCH 1/2] drm/atomic: Initialise planes with opaque alpha values
Date: Wed, 19 Sep 2018 19:15:45 +0300 [thread overview]
Message-ID: <20180919161545.GH5565@intel.com> (raw)
In-Reply-To: <20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com>
On Wed, Sep 19, 2018 at 04:56:58PM +0100, Kieran Bingham wrote:
> Planes without an alpha property, using __drm_atomic_helper_plane_reset
> will have their plane state alpha initialised as zero, which represents
> a transparent alpha.
>
> If this value is then used for the plane, it may not be visible by
> default, and thus doesn't represent a good initialisation state.
>
> Update the default state->alpha value to DRM_BLEND_ALPHA_OPAQUE
> unconditionally when the plane is reset.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 3cf1aa132778..e49b22381048 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3569,9 +3569,7 @@ void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
> state->plane = plane;
> state->rotation = DRM_MODE_ROTATE_0;
>
> - /* Reset the alpha value to fully opaque if it matters */
> - if (plane->alpha_property)
> - state->alpha = plane->alpha_property->values[1];
> + state->alpha = DRM_BLEND_ALPHA_OPAQUE;
I can't come up with a solid excuse for not initializing it always.
Reviewed-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
>
> plane->state = state;
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrj�l�
Intel
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>,
open list <linux-kernel@vger.kernel.org>,
Sean Paul <sean@poorly.run>
Subject: Re: [PATCH 1/2] drm/atomic: Initialise planes with opaque alpha values
Date: Wed, 19 Sep 2018 19:15:45 +0300 [thread overview]
Message-ID: <20180919161545.GH5565@intel.com> (raw)
In-Reply-To: <20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com>
On Wed, Sep 19, 2018 at 04:56:58PM +0100, Kieran Bingham wrote:
> Planes without an alpha property, using __drm_atomic_helper_plane_reset
> will have their plane state alpha initialised as zero, which represents
> a transparent alpha.
>
> If this value is then used for the plane, it may not be visible by
> default, and thus doesn't represent a good initialisation state.
>
> Update the default state->alpha value to DRM_BLEND_ALPHA_OPAQUE
> unconditionally when the plane is reset.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 3cf1aa132778..e49b22381048 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3569,9 +3569,7 @@ void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
> state->plane = plane;
> state->rotation = DRM_MODE_ROTATE_0;
>
> - /* Reset the alpha value to fully opaque if it matters */
> - if (plane->alpha_property)
> - state->alpha = plane->alpha_property->values[1];
> + state->alpha = DRM_BLEND_ALPHA_OPAQUE;
I can't come up with a solid excuse for not initializing it always.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
>
> plane->state = state;
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2018-09-19 21:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 15:56 [PATCH 0/2] drm: Alpha blending issue Kieran Bingham
2018-09-19 15:56 ` Kieran Bingham
2018-09-19 15:56 ` [PATCH 1/2] drm/atomic: Initialise planes with opaque alpha values Kieran Bingham
2018-09-19 15:56 ` Kieran Bingham
2018-09-19 16:15 ` Ville Syrjälä [this message]
2018-09-19 16:15 ` Ville Syrjälä
2018-09-19 16:43 ` Alexandru-Cosmin Gheorghe
2018-09-19 16:43 ` Alexandru-Cosmin Gheorghe
2018-09-19 16:43 ` Alexandru-Cosmin Gheorghe
2018-09-20 10:03 ` Kieran Bingham
2018-09-20 10:03 ` Kieran Bingham
2018-09-20 10:19 ` Alexandru-Cosmin Gheorghe
2018-09-20 10:19 ` Alexandru-Cosmin Gheorghe
2018-09-20 11:17 ` Laurent Pinchart
2018-09-19 15:56 ` [PATCH 2/2] drm: rcar-du: Enable alpha property on primary planes Kieran Bingham
2018-09-19 15:56 ` Kieran Bingham
2018-09-20 11:22 ` Laurent Pinchart
2018-09-20 11:22 ` Laurent Pinchart
2018-11-21 18:29 ` Laurent Pinchart
2018-11-21 21:10 ` Kieran Bingham
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=20180919161545.GH5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Alexandru-Cosmin.Gheorghe@arm.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=sean@poorly.run \
/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.