mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
To: Konrad Dybcio <konradybcio@kernel.org>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	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>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH 1/8] drm/msm/a6xx: Polish up the IFPC counter enable
Date: Tue, 24 Nov 2026 03:09:18 +0530	[thread overview]
Message-ID: <4d06325b-e1e9-4e82-82fa-a81c5e2d6134@oss.qualcomm.com> (raw)
In-Reply-To: <20261030-topic-a6xx_ifpc-v1-1-6992841a9a32@oss.qualcomm.com>



On 10/30/2026 3:33 PM, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Extend it to all targets with a real GMU and use a rmw instead of a
> full write to preserve other things within that register.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c             | 6 +++---
>  drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 1 +
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 92e8c8abb86d..48d3ee4d55d9 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -1332,10 +1332,10 @@ static int hw_init(struct msm_gpu *gpu)
>  	/* Turn on performance counters */
>  	gpu_write(gpu, REG_A6XX_RBBM_PERFCTR_CNTL, 0x1);
>  
> -	if (adreno_is_a7xx(adreno_gpu)) {
> +	if (!adreno_has_gmu_wrapper(adreno_gpu)) {
>  		/* Turn on the IFPC counter (countable 4 on XOCLK4) */
> -		gmu_write(&a6xx_gpu->gmu, REG_A6XX_GMU_CX_GMU_POWER_COUNTER_SELECT_1,
> -			  FIELD_PREP(GENMASK(7, 0), 0x4));
> +		gmu_rmw(&a6xx_gpu->gmu, REG_A6XX_GMU_CX_GMU_POWER_COUNTER_SELECT_1,
> +			GENMASK(7, 0), 0x4);
>  	}
>  
>  	/* Select CP0 to always count cycles */
> diff --git a/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml b/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
> index b3082738c99d..4f934c194f73 100644
> --- a/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
> +++ b/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
> @@ -83,6 +83,7 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
>  	<reg32 offset="0x1f84a" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_3_L"/>
>  	<reg32 offset="0x1f84b" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_3_H"/>
>  	<reg32 offset="0x1f84c" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_4_L"/>
> +	<reg32 offset="0x1fca8" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_4_L" variants="A8XX-"/>

nit: this is unused in this commit.

Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>

-Akhil
>  	<reg32 offset="0x1f84d" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_4_H"/>
>  	<reg32 offset="0x1f84e" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_5_L"/>
>  	<reg32 offset="0x1f84f" name="GMU_CX_GMU_POWER_COUNTER_XOCLK_5_H"/>
> 


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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 10:03 [PATCH 0/8] IFPC support for A6xx Konrad Dybcio
2026-10-30 10:03 ` [PATCH 1/8] drm/msm/a6xx: Polish up the IFPC counter enable Konrad Dybcio
2026-11-23 21:39   ` Akhil P Oommen [this message]
2026-10-30 10:03 ` [PATCH 2/8] drm/msm/adreno: Register GPU debugfs only on the primary minor Konrad Dybcio
2026-10-30 10:03 ` [PATCH 3/8] drm/msm/a6xx: Expose GMU IFPC entry count in debugfs Konrad Dybcio
2026-10-30 10:04 ` [PATCH 4/8] drm/msm/a6xx: Add A6xx IFPC support Konrad Dybcio
2026-10-30 10:04 ` [PATCH 5/8] drm/msm/a6xx: Add IFPC tables for Adreno 630 Konrad Dybcio
2026-10-30 10:04 ` [PATCH 6/8] drm/msm/a6xx: Add IFPC tables for Adreno 640/680 Konrad Dybcio
2026-10-30 10:04 ` [PATCH RFT 7/8] drm/msm/a6xx: Add IFPC tables for Adreno 650 family Konrad Dybcio
2026-11-19  6:20   ` Demeter Barna
2026-10-30 10:04 ` [PATCH RFT 8/8] drm/msm/a6xx: Wire up IFPC on A615-family GPUs Konrad Dybcio

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=4d06325b-e1e9-4e82-82fa-a81c5e2d6134@oss.qualcomm.com \
    --to=akhilpo@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®