Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Akhil P Oommen" <akhilpo@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support
Date: Tue, 17 Nov 2026 23:17:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-219788@kernel.org> (raw)
In-Reply-To: <20261118-nord-gpu1-v2-1-8d6d9908b7c5@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/msm/a6xx: missing UBWC L2/L3 swizzle disable in
  a6xx_set_ubwc_config()
--

commit 0728c6891f9936a41b152874415dd989fc9326a8
Author: Shivam Rawat <shivrawa@qti.qualcomm.com>

drm/msm/a6xx: Add Adreno 753 support

This commit adds an A7xx catalog entry, an adreno_is_a753() helper, and
hardware initialization adjustments for the Adreno 753 GPU in the Qualcomm
Nord SoC.

> diff --git a/drivers/gpu/drm/msm/adreno/a7xx_catalog.c b/drivers/gpu/drm/msm/adreno/a7xx_catalog.c
> index 6f704898cea6e..9465ffa3dd12e 100644
> --- a/drivers/gpu/drm/msm/adreno/a7xx_catalog.c
> +++ b/drivers/gpu/drm/msm/adreno/a7xx_catalog.c
> @@ -451,6 +451,41 @@ static const struct adreno_info a7xx_gpus[] = {
>  			},
>  		},
>  		.preempt_record_size = 3572 * SZ_1K,
> +	}, {
> +		.chip_ids = ADRENO_CHIP_IDS(0x43051701), /* "C523v2" */
> +		.family = ADRENO_7XX_GEN3,
> +		.fw = {
> +			[ADRENO_FW_SQE] = "gen71300_sqe.fw",
> +			[ADRENO_FW_GMU] = "gen71300_gmu.bin",
> +		},
> +		.gmem = 3 * SZ_1M,
> +		.inactive_period = DRM_MSM_INACTIVE_PERIOD,
> +		.quirks = ADRENO_QUIRK_HAS_CACHED_COHERENT |
> +			  ADRENO_QUIRK_HAS_HW_APRIV |
> +			  ADRENO_QUIRK_PREEMPTION |
> +			  ADRENO_QUIRK_IFPC,
> +		.funcs = &a7xx_gpu_funcs,

[Severity: High]
Does a6xx_set_ubwc_config() need to disable level 3 UBWC bank swizzling
and program the swizzle disable bits into REG_A7XX_GRAS_NC_MODE_CNTL for
Adreno 753 on Nord?

In drivers/soc/qcom/ubwc_config.c, "qcom,nord" maps to glymur_data, which
sets both UBWC_FLAG_DISABLE_SWIZZLE_LVL2 and
UBWC_FLAG_DISABLE_SWIZZLE_LVL3.  That configuration is exposed to
userspace via MSM_PARAM_UBWC_SWIZZLE and programmed into MDSS and Iris,
and a8xx_set_ubwc_config() writes both level2_swizzling_dis and
level3_swizzling_dis for other glymur_data platforms.

Adreno 753 uses a7xx_gpu_funcs -> hw_init() -> a6xx_set_ubwc_config(),
which only checks UBWC_SWIZZLE_ENABLE_LVL2 and omits level 3 swizzle
disable from REG_A6XX_RB_NC_MODE_CNTL, REG_A6XX_TPL1_NC_MODE_CNTL and
REG_A6XX_SP_NC_MODE_CNTL, and writes neither level2_swizzling_dis nor
level3_swizzling_dis to REG_A7XX_GRAS_NC_MODE_CNTL:

drivers/gpu/drm/msm/adreno/a6xx_gpu.c:a6xx_set_ubwc_config() {
	...
	u32 level2_swizzling_dis = !(qcom_ubwc_swizzle(cfg) & UBWC_SWIZZLE_ENABLE_LVL2);
	...
	if (adreno_is_a7xx(adreno_gpu)) {
		for (u32 pipe_id = PIPE_BR; pipe_id <= PIPE_BV; pipe_id++) {
			gpu_write(gpu, REG_A7XX_CP_APERTURE_CNTL_HOST,
				  A7XX_CP_APERTURE_CNTL_HOST_PIPE(pipe_id));
			gpu_write(gpu, REG_A7XX_GRAS_NC_MODE_CNTL,
				  FIELD_PREP(GENMASK(8, 5), hbb_lo));
		}
	...
}

Leaving level 3 swizzling enabled in RB/TPL1/SP and both level 2 and
level 3 swizzling enabled in GRAS mismatches the rest of the SoC and
userspace, corrupting UBWC surfaces during rendering and buffer sharing.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118-nord-gpu1-v2-0-8d6d9908b7c5@oss.qualcomm.com?part=1

  reply	other threads:[~2026-11-17 23:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 23:00 [PATCH v2 0/5] drm/msm: Support for GPU in Nord Akhil P Oommen
2026-11-17 23:00 ` [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support Akhil P Oommen
2026-11-17 23:17   ` sashiko-bot [this message]
2026-11-17 23:00 ` [PATCH v2 2/5] dt-bindings: display/msm: Document Adreno 753 GPU/GMU Akhil P Oommen
2026-11-17 23:00 ` [PATCH v2 3/5] arm64: dts: qcom: nord: Add GPU and GMU nodes Akhil P Oommen
2026-11-17 23:00 ` [PATCH v2 4/5] arm64: dts: qcom: nord: Add GPU cooling Akhil P Oommen
2026-11-17 23:00 ` [PATCH v2 5/5] arm64: dts: qcom: nord-rrd: Enable Adreno 753 GPU Akhil P Oommen

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-219788@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.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