From: sashiko-bot@kernel.org
To: "Muzaffer Kadir" <muzafferkadir@mainlining.org>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-input@vger.kernel.org, robh@kernel.org, lee@kernel.org,
dri-devel@lists.freedesktop.org, mfd@lists.linux.dev,
conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH RFC 14/20] drm: msm: mdp5: Add MDP5 configuration for MSM8952
Date: Sat, 12 Sep 2026 09:19:00 +0000 [thread overview]
Message-ID: <20260912091901.4A01C1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912-msm8952-initial-support-v1-14-0e742578b524@mainlining.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Critical] Missing designated initializers in the lm.base array maps the LM3 base address to the wrong index, causing register corruption.
- [Critical] Defining `.pipe_cursor` with a Layer Mixer offset (`0x440DC`) causes the driver to incorrectly program LM cursor registers as if they were a standard SSPP pipe, trashing the configuration.
- [High] Inconsistent MDP_PIPE_CAP_SW_PIX_EXT capability between pipe_cursor and main pipes.
--
commit fb5220e24e57b56379d9ec75eb6d29f391529a7b
Author: Muzaffer Kadir <muzafferkadir@mainlining.org>
drm: msm: mdp5: Add MDP5 configuration for MSM8952
Add the mdp5_cfg_hw entry for MDP5 version v1.12 found on MSM8952.
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> index 7c91fc1915f39..d34c94d6f7e2e 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> @@ -744,6 +744,86 @@ static const struct mdp5_cfg_hw msm8x76_config = {
[ ... ]
> +static const struct mdp5_cfg_hw msm8952_config = {
> + .name = "msm8952",
[ ... ]
> + .pipe_cursor = {
> + .count = 1,
> + .base = { 0x440DC },
[Severity: Critical]
This isn't a bug introduced by this patch, but copying this configuration
defines a Layer Mixer offset (0x440DC) for an SSPP pipe.
Does this cause the driver to incorrectly program LM cursor registers as if
they were a standard SSPP pipe?
During cursor plane updates via mdp5_hwpipe_mode_set(), standard SSPP macros
like REG_MDP5_PIPE_* will treat 0x440DC as the SSPP base.
REG_MDP5_PIPE_OUT_XY (offset 0x10) will write to 0x440DC + 0x10 = 0x440EC
(LM_CURSOR_FORMAT), and REG_MDP5_PIPE_SRC_SIZE (offset 0x0) overwrites
LM_CURSOR_STRIDE. This misalignment destroys the LM cursor configurations
and causes hardware faults.
> + .caps = MDP_PIPE_CAP_HFLIP |
> + MDP_PIPE_CAP_VFLIP |
> + MDP_PIPE_CAP_SW_PIX_EXT |
> + MDP_PIPE_CAP_CURSOR |
> + 0,
> + },
[Severity: High]
This isn't a bug introduced by this patch, but copying this configuration
leaves an inconsistent MDP_PIPE_CAP_SW_PIX_EXT capability between
pipe_cursor and the main pipes.
Are we exposing Software Pixel Extension capabilities on the cursor pipe
while main pipes lack it?
If the SoC does not support Software Pixel Extension,
mdp5_plane_atomic_update() will call mdp5_write_pixel_ext() and write to
non-existent SW_PIX_EXT registers when programming the cursor pipe,
triggering a Synchronous External Abort. If it does support it, the main
planes are underutilizing the hardware.
> + .lm = {
> + .count = 2,
> + .base = { 0x44000, 0x47000 },
> + .instances = {
> + { .id = 0, .pp = 0, .dspp = 0,
> + .caps = MDP_LM_CAP_DISPLAY, },
> + { .id = 3, .pp = -1, .dspp = -1,
> + .caps = MDP_LM_CAP_WB },
> + },
[Severity: Critical]
This isn't a bug introduced by this patch, but copying this configuration
leaves the lm.base array initialized sequentially without designated
initializers.
Will this map the LM3 base address to the wrong index and cause register
corruption?
Because lm.base is initialized sequentially as { 0x44000, 0x47000 },
base[0] becomes 0x44000 and base[1] becomes 0x47000. The remaining indices,
including base[3], are implicitly initialized to 0.
When the driver creates a mixer for LM3 (since its .id is 3), atomic commits
will cause REG_MDP5_LM_OUT_SIZE(3) to resolve to __offset_LM(3). This
returns mdp5_cfg->lm.base[3], which evaluates to 0x0. Writes to LM3
registers will thus write to SOC offset 0x0, corrupting the global MDP
configuration registers.
Should this use designated initializers for the base array to ensure base[3]
is mapped correctly?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260912-msm8952-initial-support-v1-0-0e742578b524@mainlining.org?part=14
next prev parent reply other threads:[~2026-09-12 9:19 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 8:39 [PATCH RFC 00/20] Add Initial Support For MSM8952, Add General Mobile Shamrock Muzaffer Kadir via B4 Relay
2026-09-12 8:39 ` [PATCH RFC 01/20] dt-bindings: clock: qcom: Add MSM8952 global clock controller Muzaffer Kadir via B4 Relay
2026-09-12 8:45 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 02/20] clk: qcom: Add global clock controller driver for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:54 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 03/20] dt-bindings: nvmem: Add compatible " Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 04/20] dt-bindings: power: rpmpd: Add MSM8952 power domains Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 05/20] dt-bindings: mmc: sdhci-msm: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:43 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 06/20] dt-bindings: vendor-prefixes: Add General Mobile Muzaffer Kadir via B4 Relay
2026-09-12 8:41 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 07/20] dt-bindings: arm: qcom: Document MSM8952 SoC binding Muzaffer Kadir via B4 Relay
2026-09-12 8:48 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 08/20] dt-bindings: iommu: qcom,iommu: Add MSM8952 IOMMU to SMMUv2 compatibles Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 09/20] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 10/20] dt-bindings: display/msm: qcom, mdp5: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:47 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 11/20] dt-bindings: firmware: qcom,scm: Document MSM8952 SCM Muzaffer Kadir via B4 Relay
2026-09-12 8:44 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 12/20] dt-bindings: clock: qcom,rpmcc: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:46 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 13/20] clk: qcom: smd-rpm: Add clocks for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:46 ` sashiko-bot
2026-09-14 11:18 ` Konrad Dybcio
2026-09-12 8:39 ` [PATCH RFC 14/20] drm: msm: mdp5: Add MDP5 configuration " Muzaffer Kadir via B4 Relay
2026-09-12 9:19 ` sashiko-bot [this message]
2026-09-12 8:39 ` [PATCH RFC 15/20] soc: qcom: ubwc: Add UBWC config " Muzaffer Kadir via B4 Relay
2026-09-12 8:43 ` sashiko-bot
2026-09-14 11:23 ` Konrad Dybcio
2026-09-14 14:21 ` Abel Vesa
2026-09-12 8:39 ` [PATCH RFC 16/20] dt-bindings: thermal: tsens: Add MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:51 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 17/20] thermal: qcom: tsens: Add support for MSM8952 tsens Muzaffer Kadir via B4 Relay
2026-09-12 8:51 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 18/20] arm64: dts: qcom: Add initial support for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:56 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 19/20] dt-bindings: input: touchscreen: goodix: Add binding for GT970 Muzaffer Kadir via B4 Relay
2026-09-12 8:50 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 20/20] arm64: dts: qcom: generalmobile-shamrock: new device Muzaffer Kadir via B4 Relay
2026-09-12 8:58 ` sashiko-bot
2026-09-12 15:47 ` David Heidelberg
2026-09-12 17:42 ` Muzaffer Kadir
2026-09-14 11:22 ` Konrad Dybcio
2026-09-14 11:58 ` Muzaffer Kadir
2026-09-14 12:01 ` Konrad Dybcio
2026-09-14 12:03 ` David Heidelberg
2026-09-14 12:05 ` David Heidelberg
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=20260912091901.4A01C1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=muzafferkadir@mainlining.org \
--cc=robh@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).