All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Muzaffer Kadir" <muzafferkadir@mainlining.org>
Cc: robh@kernel.org, linux-clk@vger.kernel.org,
	dmitry.torokhov@gmail.com, lee@kernel.org, mfd@lists.linux.dev,
	conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH v3 13/19] drm: msm: mdp5: Add MDP5 configuration for MSM8952
Date: Mon, 21 Sep 2026 18:45:51 +0000	[thread overview]
Message-ID: <20260921184551.71E831F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921-msm8952-initial-support-v3-13-b96fd3fe298b@mainlining.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] drm/msm: Missing designated initializers in lm.base array maps LM3 to 0x0
- [High] drm/msm: Hardware register corruption from exposing LM cursor as SSPP pipe
--

commit a462b33778a7f0e919c295ca897f61ab29c8108c
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
[ ... ]
> +static const struct mdp5_cfg_hw msm8952_config = {
> +	.name = "msm8952",
[ ... ]
> +	.pipe_cursor = {
> +		.count = 1,
> +		.base = { 0x440DC },
> +		.caps = MDP_PIPE_CAP_HFLIP	|
> +			MDP_PIPE_CAP_VFLIP	|
> +			MDP_PIPE_CAP_SW_PIX_EXT	|
> +			MDP_PIPE_CAP_CURSOR	|
> +			0,
> +	},

[Severity: High]
Does exposing the LM cursor as an SSPP pipe corrupt the LM cursor registers?

When userspace performs an atomic plane update on this cursor plane,
mdp5_plane_mode_set() writes standard SSPP pipe configurations to
0x440DC, which is the exact address of REG_MDP5_LM_CURSOR_STRIDE(0).

Because the two hardware blocks have completely different register layouts,
SSPP registers like SRC0_ADDR end up being written into LM CURSOR_XY
coordinates, corrupting the layer mixer's cursor configuration.

Should this cursor be handled by mdp5_crtc_cursor_set() instead of being
exposed as a pipe_cursor?

> +	.lm = {
> +		.count = 2,
> +		.base = { 0x44000, 0x47000 },

[Severity: High]
Will the base address for the LM3 (Writeback) hardware mixer evaluate to 0x0?

When the driver configures the Writeback interface (LM3), it indexes
mdp5_cfg->lm.base using the instance ID (mixer->lm = 3). Since the array
was initialized sequentially as { 0x44000, 0x47000 }, base[1] receives
0x47000 while base[3] is zero-initialized.

Writing layer mixer configuration to 0x0 corrupts the global MDP5 control
registers, leading to severe hardware malfunction or system crash.

Should this use designated initializers (e.g., [0] = 0x44000, [3] = 0x47000)?

> +		.instances = {
> +				{ .id = 0, .pp = 0, .dspp = 0,
> +				  .caps = MDP_LM_CAP_DISPLAY, },
> +				{ .id = 3, .pp = -1, .dspp = -1,
> +				  .caps = MDP_LM_CAP_WB },
> +			     },
> +		.nb_stages = 8,
> +		.max_width = 2048,
> +		.max_height = 0xFFFF,
> +	},
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921-msm8952-initial-support-v3-0-b96fd3fe298b@mainlining.org?part=13

  reply	other threads:[~2026-09-21 18:45 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 18:18 [PATCH v3 00/19] Add Initial Support For MSM8952, Add General Mobile Shamrock Muzaffer Kadir via B4 Relay
2026-09-21 18:18 ` Muzaffer Kadir
2026-09-21 18:18 ` [PATCH v3 01/19] dt-bindings: clock: qcom: Add MSM8952 global clock controller Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:25   ` sashiko-bot
2026-09-25 13:39   ` Krzysztof Kozlowski
2026-09-21 18:18 ` [PATCH v3 02/19] clk: qcom: Add global clock controller driver for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:44   ` sashiko-bot
2026-09-22 20:36   ` Abel Vesa
2026-09-21 18:18 ` [PATCH v3 03/19] dt-bindings: nvmem: Add compatible " Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:21   ` sashiko-bot
2026-09-21 18:18 ` [PATCH v3 04/19] dt-bindings: power: rpmpd: Add MSM8952 power domains Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:23   ` sashiko-bot
2026-09-27 17:47   ` Krzysztof Kozlowski
2026-09-28 13:57   ` Ulf Hansson
2026-09-21 18:18 ` [PATCH v3 05/19] dt-bindings: mmc: sdhci-msm: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:22   ` sashiko-bot
2026-09-27 17:47   ` Krzysztof Kozlowski
2026-09-29 13:34   ` Ulf Hansson
2026-09-21 18:18 ` [PATCH v3 06/19] dt-bindings: vendor-prefixes: Add General Mobile Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:21   ` sashiko-bot
2026-09-21 18:18 ` [PATCH v3 07/19] dt-bindings: arm: qcom: Document MSM8952 SoC binding Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:22   ` sashiko-bot
2026-09-21 18:18 ` [PATCH v3 08/19] dt-bindings: iommu: qcom,iommu: Add MSM8952 IOMMU to SMMUv2 compatibles Muzaffer Kadir via B4 Relay
2026-09-21 18:18   ` Muzaffer Kadir
2026-09-21 18:22   ` sashiko-bot
2026-09-27 17:49   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 09/19] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:25   ` sashiko-bot
2026-09-27 17:48   ` Krzysztof Kozlowski
2026-09-27 17:48     ` [PATCH v3 09/19] dt-bindings: mfd: qcom, tcsr: " Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 10/19] dt-bindings: display/msm: qcom, mdp5: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:24   ` sashiko-bot
2026-09-27 17:48   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 11/19] dt-bindings: firmware: qcom,scm: Document MSM8952 SCM Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:21   ` sashiko-bot
2026-09-27 17:48   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 12/19] dt-bindings: clock: qcom,rpmcc: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:26   ` sashiko-bot
2026-09-27 17:50   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 13/19] drm: msm: mdp5: Add MDP5 configuration for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:45   ` sashiko-bot [this message]
2026-10-01  1:57   ` Dmitry Baryshkov
2026-09-21 18:19 ` [PATCH v3 14/19] soc: qcom: ubwc: Add UBWC config " Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:22   ` sashiko-bot
2026-10-01  1:58   ` Dmitry Baryshkov
2026-09-21 18:19 ` [PATCH v3 15/19] dt-bindings: thermal: tsens: Add MSM8952 Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:26   ` sashiko-bot
2026-09-27 17:51   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 16/19] thermal: qcom: tsens: Add support for MSM8952 tsens Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:30   ` sashiko-bot
2026-09-29  7:11   ` Daniel Lezcano
2026-09-29 12:09     ` Muzaffer Kadir
2026-09-21 18:19 ` [PATCH v3 17/19] arm64: dts: qcom: Add initial support for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:34   ` sashiko-bot
2026-09-21 18:19 ` [PATCH v3 18/19] dt-bindings: input: touchscreen: goodix: Add binding for GT970 Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:29   ` sashiko-bot
2026-09-27 17:52   ` Krzysztof Kozlowski
2026-09-21 18:19 ` [PATCH v3 19/19] arm64: dts: qcom: generalmobile-shamrock: new device Muzaffer Kadir via B4 Relay
2026-09-21 18:19   ` Muzaffer Kadir
2026-09-21 18:37   ` sashiko-bot
2026-10-03  0:46 ` [PATCH v3 00/19] Add Initial Support For MSM8952, Add General Mobile Shamrock Dmitry Baryshkov
2026-10-05 14:00   ` Muzaffer Kadir
2026-10-06  8:53     ` Dmitry Baryshkov

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=20260921184551.71E831F000FF@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 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.