From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Konrad Dybcio <konradybcio@kernel.org>,
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
Subject: Re: [PATCH 1/3] drm/msm/a6xx: Add HFI support for CLX feature
Date: Mon, 18 May 2026 10:05:54 +0200 [thread overview]
Message-ID: <159aa418-ed40-479d-a635-a170e0ab06c5@oss.qualcomm.com> (raw)
In-Reply-To: <20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com>
On 5/15/26 10:07 PM, Akhil P Oommen wrote:
> Add support for Current Limit Extension (CLX) feature found on a few A8x
> GPUs. This feature is required to limit the peak current consumption to
> avoid HW spec violation on GX/MX rails.
>
> Add the necessary HFI interface support to pass the recommended CLX and
> IFF/PCLX limits tables to the GMU. Per-GPU configuration is consumed
> from the catalog entries.
>
> Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 ++++++++
> drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 71 +++++++++++++++++++++++++++++++++++
> 2 files changed, 86 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
> index eb431e5e00b1..f6a3f1924bb3 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
> @@ -34,6 +34,19 @@ struct cpu_gpu_lock {
> uint64_t regs[62];
> };
>
> +struct a6xx_limits_tbl {
> + /** @tbl: List of limits table **/
> + struct a6xx_hfi_limits_tbl *tbl;
> + /** @count: Number of entries in the list **/
> + u32 count;
> +};
> +
> +#define DECLARE_ADRENO_LIMITS_TABLE(name) \
> +static const struct a6xx_limits_tbl name = { \
> + .tbl = name ## _tbl, \
> + .count = ARRAY_SIZE(name ## _tbl), \
> +}
> +
> /**
> * struct a6xx_info - a6xx specific information from device table
> *
> @@ -54,6 +67,8 @@ struct a6xx_info {
> u32 gmu_cgc_mode;
> u32 prim_fifo_threshold;
> const struct a6xx_bcm *bcms;
> + const struct a6xx_hfi_clx_table_v2_cmd *clx_tbl;
> + const struct a6xx_limits_tbl *limits_tbl;
> };
>
> struct a6xx_gpu {
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
> index 487c2736f2b3..13ae34d0d898 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
> @@ -886,6 +886,73 @@ static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu)
> return 0;
> }
>
> +static int a6xx_hfi_enable_iff_pclx(struct a6xx_gmu *gmu, const struct a6xx_limits_tbl *limits)
> +{
> + struct a6xx_hfi_table_entry *entry;
> + struct a6xx_hfi_table *tbl;
> + size_t entry_size;
> + size_t size;
> + int ret;
> +
> + if (!limits)
> + return 0;
Is this considered a valid configuation (CLX on without IFF_PCLX data)?
If not, let's throw an error here since it's only called from _enable_clx()
Konrad
next prev parent reply other threads:[~2026-05-18 8:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 20:07 [PATCH 0/3] drm/msm/adreno: Support for CLX feature on A8xx Akhil P Oommen
2026-05-15 20:07 ` [PATCH 1/3] drm/msm/a6xx: Add HFI support for CLX feature Akhil P Oommen
2026-05-18 8:04 ` Konrad Dybcio
2026-05-18 8:05 ` Konrad Dybcio [this message]
2026-05-15 20:07 ` [PATCH 2/3] drm/msm/a6xx: Enable CLX feature on A840 Akhil P Oommen
2026-05-18 8:10 ` Konrad Dybcio
2026-05-15 20:07 ` [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85 Akhil P Oommen
2026-05-18 8:11 ` Konrad Dybcio
2026-10-02 14:38 ` Bjorn Andersson
2026-10-02 17:47 ` Oleg Keri
2026-10-02 18:12 ` Rob Clark
2026-10-02 18:29 ` Oleg Keri
2026-10-02 18:43 ` Rob Clark
2026-10-02 21:51 ` Akhil P Oommen
2026-10-03 19:13 ` Oleg Keri
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=159aa418-ed40-479d-a635-a170e0ab06c5@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.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®