Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Sean Paul <sean@poorly.run>, Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonathan Marek <jonathan@marek.ca>,
	Jordan Crouse <jordan@cosmicpenguin.net>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Connor Abbott <cwabbott0@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 16/21] drm/msm/adreno: Do CX GBIF config before GMU start
Date: Thu, 13 Nov 2025 03:04:40 +0530	[thread overview]
Message-ID: <13c39ab6-f054-4552-a033-819906af29d5@oss.qualcomm.com> (raw)
In-Reply-To: <ae21a963-696a-48f3-af91-ee72aef4b60d@oss.qualcomm.com>

On 11/12/2025 4:07 PM, Konrad Dybcio wrote:
> On 11/10/25 5:37 PM, Akhil P Oommen wrote:
>> GMU lies on the CX domain and accesses CX GBIF. So do CX GBIF
>> configurations before GMU wakes up. This was not a problem so far, but
>> A840 GPU is very sensitive to this requirement. Also, move these
>> registers to the catalog.
>>
>> Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
>> ---
> 
> [...]
> 
>> +	/* For A7x and newer, do the CX GBIF configurations before GMU wake up */
>> +	for (int i = 0; (gbif_cx && gbif_cx[i].offset); i++)
>> +		gpu_write(gpu, gbif_cx[i].offset, gbif_cx[i].value);
> 
> We haven't been doing this a lot in the GPU driver, but adding a
> .num_entries-like field is both more memory efficient and less error-prone

Gbif config array is reused a lot. So this is more memory efficient in
this particular case. But generally I agree, we should stick to one
scheme. We can revisit this later.

> 
>> +
>> +	/* For A7x and newer, do the CX GBIF configurations before GMU wake up */
> 
> duplicate comment
> 
>> +	if (adreno_is_a8xx(adreno_gpu)) {
>> +		gpu_write(gpu, REG_A8XX_GBIF_CX_CONFIG, 0x20023000);
>> +		gmu_write(gmu, REG_A6XX_GMU_MRC_GBIF_QOS_CTRL, 0x33);
> 
> Either set this prio value here, or in a8xx_gpu.c

We should remove the other one.

> 
>> +	}
>> +
>>  	/* Set up the lowest idle level on the GMU */
>>  	a6xx_gmu_power_config(gmu);
>>  
>> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
>> index 029f7bd25baf..66771958edb2 100644
>> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
>> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
>> @@ -1265,17 +1265,20 @@ static int hw_init(struct msm_gpu *gpu)
>>  	/* enable hardware clockgating */
>>  	a6xx_set_hwcg(gpu, true);
>>  
>> -	/* VBIF/GBIF start*/
>> -	if (adreno_is_a610_family(adreno_gpu) ||
>> -	    adreno_is_a640_family(adreno_gpu) ||
>> -	    adreno_is_a650_family(adreno_gpu) ||
>> -	    adreno_is_a7xx(adreno_gpu)) {
>> +	/* For gmuwrapper implementations, do the VBIF/GBIF CX configuration here */
>> +	if (adreno_is_a610_family(adreno_gpu)) {
>>  		gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE0, 0x00071620);
> 
> a640/650 family GPUs didn't receive a .gbif_cx addition in the catalog to match>

Oops, I missed that. Will fix this. Thanks.

>>  		gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE1, 0x00071620);
>>  		gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE2, 0x00071620);
>>  		gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE3, 0x00071620);
>> -		gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL,
>> -			  adreno_is_a7xx(adreno_gpu) ? 0x2120212 : 0x3);
>> +	}
>> +
>> +	if (adreno_is_a610_family(adreno_gpu) ||
>> +	    adreno_is_a640_family(adreno_gpu) ||
>> +	    adreno_is_a650_family(adreno_gpu)) {
>> +		gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x3);
>> +	} else if (adreno_is_a7xx(adreno_gpu)) {
>> +		gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x2120212);
>>  	} else {
>>  		gpu_write(gpu, REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL, 0x3);
> 
> Downstream seems to set QOS_CNTL at the same time as QSB_SIDEn for
> these targets

This register is under GX power domain, so we can't configure this
early. This should be okay.

> 
> 
>>  	}
>> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
>> index 031ca0e4b689..cf700f7de09b 100644
>> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
>> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
>> @@ -46,6 +46,7 @@ struct a6xx_info {
>>  	const struct adreno_protect *protect;
>>  	const struct adreno_reglist_list *pwrup_reglist;
>>  	const struct adreno_reglist_list *ifpc_reglist;
>> +	const struct adreno_reglist *gbif_cx;
>>  	const struct adreno_reglist_pipe *nonctxt_reglist;
>>  	u32 gmu_chipid;
>>  	u32 gmu_cgc_mode;
>> diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
>> index 2ef69161f1d0..ad140b0d641d 100644
>> --- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
>> +++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
>> @@ -500,6 +500,9 @@ static int hw_init(struct msm_gpu *gpu)
>>  
>>  	gpu_write(gpu, REG_A6XX_RBBM_SECVID_TSB_CNTL, 0);
>>  
>> +	/* Increase priority of GMU traffic over GPU traffic */
>> +	gmu_write(gmu, REG_A6XX_GMU_MRC_GBIF_QOS_CTRL, 0x33);
> 
> Kgsl (later) added this for A740 too - would it be beneficial to enable
> unconditionally on gen7+?
These are actually recommendations coming from HW designers for each
chipset. So we should just stick to that. I will check separately about
a740.

-Akhil.
> 
> Konrad




  reply	other threads:[~2025-11-12 21:35 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 16:37 [PATCH v2 00/21] drm/msm/adreno: Introduce Adreno 8xx family support Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 01/21] drm/msm/a6xx: Flush LRZ cache before PT switch Akhil P Oommen
2025-11-12 10:07   ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 02/21] drm/msm/a6xx: Fix the gemnoc workaround Akhil P Oommen
2025-11-12 10:18   ` Konrad Dybcio
2025-11-12 22:09     ` Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 04/21] drm/msm/adreno: Create adreno_func->submit_flush() Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 05/21] drm/msm/adreno: Move adreno_gpu_func to catalogue Akhil P Oommen
2025-11-12 10:22   ` Konrad Dybcio
2025-11-12 22:02     ` Akhil P Oommen
2025-11-13  3:38       ` Dmitry Baryshkov
2025-11-13  9:27         ` Konrad Dybcio
2025-11-13 12:22           ` Dmitry Baryshkov
2025-11-13 13:10             ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 06/21] drm/msm/adreno: Move gbif_halt() to adreno_gpu_func Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 07/21] drm/msm/adreno: Add MMU fault handler " Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 09/21] drm/msm/a6xx: Rebase GMU register offsets Akhil P Oommen
2025-11-12 10:56   ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 10/21] drm/msm/a8xx: Add support for A8x GMU Akhil P Oommen
2025-11-13 13:10   ` Konrad Dybcio
2025-11-13 20:00     ` Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 11/21] drm/msm/a6xx: Improve MX rail fallback in RPMH vote init Akhil P Oommen
2025-11-12 10:59   ` Konrad Dybcio
2025-11-14 11:26     ` Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 12/21] drm/msm/a6xx: Share dependency vote table with GMU Akhil P Oommen
2025-11-13  9:42   ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 13/21] drm/msm/adreno: Introduce A8x GPU Support Akhil P Oommen
2025-11-13 10:15   ` Konrad Dybcio
2025-11-13 20:09     ` Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 14/21] drm/msm/adreno: Support AQE engine Akhil P Oommen
2025-11-12 11:07   ` Konrad Dybcio
2025-11-12 21:16     ` Akhil P Oommen
2025-11-13  9:29       ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 15/21] drm/msm/a8xx: Add support for Adreno 840 GPU Akhil P Oommen
2025-11-13 10:58   ` Konrad Dybcio
2025-11-10 16:37 ` [PATCH v2 16/21] drm/msm/adreno: Do CX GBIF config before GMU start Akhil P Oommen
2025-11-12 10:37   ` Konrad Dybcio
2025-11-12 21:34     ` Akhil P Oommen [this message]
2025-11-10 16:37 ` [PATCH v2 17/21] drm/msm/a8xx: Add support for Adreno X2-85 GPU Akhil P Oommen
2025-11-12 14:41   ` Konrad Dybcio
2025-11-12 21:07     ` Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 18/21] dt-bindings: arm-smmu: Add Kaanapali GPU SMMU Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 19/21] dt-bindings: display/msm/gmu: Add Adreno 840 GMU Akhil P Oommen
2025-11-10 16:37 ` [PATCH v2 20/21] dt-bindings: display/msm/gmu: Add Adreno X2-85 GMU Akhil P Oommen
2025-11-11  7:49   ` Krzysztof Kozlowski
2025-11-11 14:25     ` Akhil P Oommen
2025-11-13  8:14       ` Krzysztof Kozlowski
2025-11-13  8:21         ` Krzysztof Kozlowski
2025-11-10 16:37 ` [PATCH v2 21/21] dt-bindings: arm-smmu: Add Glymur GPU SMMU Akhil P Oommen
2025-11-11  7:50   ` Krzysztof Kozlowski
2025-11-11 14:27     ` 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=13c39ab6-f054-4552-a033-819906af29d5@oss.qualcomm.com \
    --to=akhilpo@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cwabbott0@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=iommu@lists.linux.dev \
    --cc=jesszhan0024@gmail.com \
    --cc=jonathan@marek.ca \
    --cc=jordan@cosmicpenguin.net \
    --cc=joro@8bytes.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=robin.murphy@arm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=will@kernel.org \
    /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