From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
"me@adamthiede.com" <me@adamthiede.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"yassine.oudjana@gmail.com" <yassine.oudjana@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alpernebiyasak@gmail.com" <alpernebiyasak@gmail.com>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"Shawn Sung (宋孝謙)" <Shawn.Sung@mediatek.com>,
"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v9 2/5] drm/mediatek: ovl: Refine ignore_pixel_alpha comment and placement
Date: Tue, 8 Oct 2024 03:56:22 +0000 [thread overview]
Message-ID: <0540f783d0c011b8f8ba3fa1f173616ff2e26d91.camel@mediatek.com> (raw)
In-Reply-To: <20241007070101.23263-3-jason-jh.lin@mediatek.com>
Hi, Jason:
On Mon, 2024-10-07 at 15:00 +0800, Jason-JH.Lin wrote:
> Refine the comment for ignore_pixel_alpha flag and move it to
> if (state->fb) statement to make it less conditional.
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 8453a72f9e59..ddc826c42653 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -481,16 +481,16 @@ void mtk_ovl_layer_config(struct device *dev, unsigned int idx,
> */
> if (blend_mode || state->base.fb->format->has_alpha)
> con |= OVL_CON_AEN;
> - }
>
> - /* CONST_BLD must be enabled for XRGB formats although the alpha channel
> - * can be ignored, or OVL will still read the value from memory.
> - * For RGB888 related formats, whether CONST_BLD is enabled or not won't
> - * affect the result. Therefore we use !has_alpha as the condition.
> - */
> - if ((state->base.fb && !state->base.fb->format->has_alpha) ||
> - blend_mode == DRM_MODE_BLEND_PIXEL_NONE)
> - ignore_pixel_alpha = OVL_CONST_BLEND;
> + /*
> + * Although the alpha channel can be ignored, CONST_BLD must be enabled
> + * for XRGB format, otherwise OVL will still read the value from memory.
> + * For RGB888 related formats, whether CONST_BLD is enabled or not won't
> + * affect the result. Therefore we use !has_alpha as the condition.
> + */
> + if (blend_mode == DRM_MODE_BLEND_PIXEL_NONE || !state->base.fb->format->has_alpha)
> + ignore_pixel_alpha = OVL_CONST_BLEND;
> + }
>
> if (pending->rotation & DRM_MODE_REFLECT_Y) {
> con |= OVL_CON_VIRT_FLIP;
next prev parent reply other threads:[~2024-10-08 3:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 7:00 [PATCH v9 0/5] Fix degradation problem of alpha blending series Jason-JH.Lin
2024-10-07 7:00 ` [PATCH v9 1/5] drm/mediatek: ovl: Fix XRGB format breakage for blend_modes unsupported SoCs Jason-JH.Lin
2024-10-07 9:36 ` AngeloGioacchino Del Regno
2024-10-07 14:29 ` Jason-JH Lin (林睿祥)
2024-10-07 15:12 ` Markus Elfring
2024-10-08 3:51 ` CK Hu (胡俊光)
2024-10-08 6:33 ` Jason-JH Lin (林睿祥)
2024-10-07 7:00 ` [PATCH v9 2/5] drm/mediatek: ovl: Refine ignore_pixel_alpha comment and placement Jason-JH.Lin
2024-10-07 9:37 ` AngeloGioacchino Del Regno
2024-10-08 3:56 ` CK Hu (胡俊光) [this message]
2024-10-07 7:00 ` [PATCH v9 3/5] drm/mediatek: ovl: Remove the color format comment for ovl_fmt_convert() Jason-JH.Lin
2024-10-07 7:01 ` [PATCH v9 4/5] drm/mediatek: ovl: Add blend_modes to driver data Jason-JH.Lin
2024-10-07 15:40 ` Markus Elfring
2024-10-07 7:01 ` [PATCH v9 5/5] drm/mediatek: Add blend_modes to mtk_plane_init() for different SoCs Jason-JH.Lin
2024-10-08 4:15 ` [PATCH v9 0/5] Fix degradation problem of alpha blending series Chen-Yu Tsai
2024-10-08 6:39 ` Jason-JH Lin (林睿祥)
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=0540f783d0c011b8f8ba3fa1f173616ff2e26d91.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=Jason-JH.Lin@mediatek.com \
--cc=Nancy.Lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Shawn.Sung@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=alpernebiyasak@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=me@adamthiede.com \
--cc=yassine.oudjana@gmail.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
all inboxes | Powered by JetHome®