From: sashiko-bot@kernel.org
To: "Ryan Brue" <ryanbrue.dev@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mediatek: ovl: Report coverage blending on older SoCs
Date: Fri, 20 Nov 2026 20:15:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-226021@kernel.org> (raw)
In-Reply-To: <20261120-rbrue-suez-mtk-ovl-coverage-v1-1-35040085fc37@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/mediatek: ovl: mtk_ovl_layer_config() sets OVL_CON_AEN on
XRGB formats
--
commit ecc63cbd272ca62ff2a9d686e47d8eb659dfe660
Author: Ryan Brue <ryanbrue.dev@gmail.com>
drm/mediatek: ovl: Report coverage blending on older SoCs
This commit sets .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE) on MT2701,
MT8167, MT8173, and MT8183 OVL driver data to eliminate the DRM plane
init warning when exposing alpha formats without a blend mode property.
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 5445870716f94..81a4143f294d5 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
[ ... ]
> @@ -667,6 +663,7 @@ static const struct mtk_disp_ovl_data mt2701_ovl_driver_data = {
> .gmc_bits = 8,
> .layer_nr = 4,
> .fmt_rgb565_is_0 = false,
> + .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE),
> .formats = mt8173_formats,
> .num_formats = ARRAY_SIZE(mt8173_formats),
> };
> @@ -677,6 +674,7 @@ static const struct mtk_disp_ovl_data mt8167_ovl_driver_data = {
> .layer_nr = 4,
> .fmt_rgb565_is_0 = true,
> .smi_id_en = true,
> + .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE),
> .formats = mt8173_formats,
> .num_formats = ARRAY_SIZE(mt8173_formats),
> };
> @@ -686,6 +684,7 @@ static const struct mtk_disp_ovl_data mt8173_ovl_driver_data = {
> .gmc_bits = 8,
> .layer_nr = 4,
> .fmt_rgb565_is_0 = true,
> + .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE),
> .formats = mt8173_formats,
> .num_formats = ARRAY_SIZE(mt8173_formats),
> };
> @@ -695,6 +694,7 @@ static const struct mtk_disp_ovl_data mt8183_ovl_driver_data = {
> .gmc_bits = 10,
> .layer_nr = 4,
> .fmt_rgb565_is_0 = true,
> + .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE),
> .formats = mt8173_formats,
> .num_formats = ARRAY_SIZE(mt8173_formats),
> };
> @@ -704,6 +704,7 @@ static const struct mtk_disp_ovl_data mt8183_ovl_2l_driver_data = {
> .gmc_bits = 10,
> .layer_nr = 2,
> .fmt_rgb565_is_0 = true,
> + .blend_modes = BIT(DRM_MODE_BLEND_COVERAGE),
> .formats = mt8173_formats,
> .num_formats = ARRAY_SIZE(mt8173_formats),
> };
[Severity: High]
Does advertising BIT(DRM_MODE_BLEND_COVERAGE) on these SoCs cause
mtk_ovl_layer_config() to set OVL_CON_AEN on opaque formats such as
DRM_FORMAT_XRGB8888?
DRM_MODE_BLEND_PREMULTI is 0 while DRM_MODE_BLEND_COVERAGE is 1. When
.blend_modes was 0, state->base.pixel_blend_mode stayed at 0, so
mtk_ovl_layer_config() only set OVL_CON_AEN when has_alpha was true:
drivers/gpu/drm/mediatek/mtk_disp_ovl.c:mtk_ovl_layer_config() {
...
unsigned int blend_mode = state->base.pixel_blend_mode;
...
if (blend_mode || state->base.fb->format->has_alpha)
con |= OVL_CON_AEN;
...
}
With state->base.pixel_blend_mode now initialized to
DRM_MODE_BLEND_COVERAGE (1), blend_mode is non-zero and OVL_CON_AEN is
always set. Because these older OVL blocks map XRGB8888 to
OVL_CON_CLRFMT_ARGB8888 and do not support OVL_CONST_BLEND, enabling
OVL_CON_AEN makes the hardware read the X byte from memory as per-pixel
alpha, reintroducing the XRGB scanout regression fixed by 995d4d558eea
("drm/mediatek: ovl: Fix XRGB format breakage for blend_modes unsupported
SoCs").
Checking whether ovl->data->blend_modes includes
BIT(DRM_MODE_BLEND_PIXEL_NONE) instead of testing blend_mode as a boolean
would preserve OVL_CON_AEN behavior on coverage-only SoCs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-rbrue-suez-mtk-ovl-coverage-v1-1-35040085fc37@gmail.com?part=1
prev parent reply other threads:[~2026-11-20 20:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 20:05 [PATCH] drm/mediatek: ovl: Report coverage blending on older SoCs Ryan Brue
2026-11-20 20:15 ` sashiko-bot [this message]
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=sashiko-outbox-226021@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ryanbrue.dev@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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