drm/msm/adreno: Support for CLX feature on A8xx
Subsystems (6)
Akhil P Oommen
reviewercover drm/msm/adreno: Support for CLX feature on A8xx
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. And enable this feature on both A840 and X285 GPU by adding the repective configurations to the gpu catalog.
---
---
Akhil P Oommen (3):
drm/msm/a6xx: Add HFI support for CLX feature drm/msm/a6xx: Enable CLX feature on A840 drm/msm/a8xx: Enable CLX feature on Adreno X2-85
drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 172 ++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 +++ drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 71 ++++++++++++ 3 files changed, 258 insertions(+)
---
base-commit: b462608de92a7cac450781f9d8d4c7cf3ccf82db
change-id: 20260514-a8xx-clx-support-2ee492a88da1
Best regards,
Signature · 1 line
Akhil P Oommen <[email protected]>
Akhil P Oommen
reviewerPATCH 1/3 drm/msm/a6xx: Add HFI support for CLX feature
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.
--- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 ++++++++ drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+)
drivers/gpu/drm/msm/adreno/a6xx_gpu.h +15 -0
@@ -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 {
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +71 -0
83 lines not on this page · raw message
Signature · 1 line
2.51.0
Re: [PATCH 1/3] drm/msm/a6xx: Add HFI support for CLX feature
Quoted 10 lines · Akhil P Oommen
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 <[email protected]>---
[...]
Quoted 8 lines
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +8
-0+static int a6xx_hfi_enable_clx (struct a6xx_gmu *gmu) +{ + struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu); +struct adreno_gpu *adreno_gpu = &a6xx_gpu->base; +const struct a6xx_info *info = adreno_gpu->info->a6xx; +struct a6xx_hfi_clx_table_v2_cmd cmd = {0 }; +int ret; +
drivers/gpu/drm/msm/adreno/a6xx_hfi.c static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu) · line 945
Quoted 10 lines
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +10
-0+if (!info->clx_tbl) +return 0 ; + + ret =a6xx_hfi_feature_ctrl_msg (gmu,HFI_FEATURE_CLX ,1 ,0 ); +if (ret) { +DRM_DEV_ERROR (gmu->dev,"Unable to enable CLX (%d)\n" , ret); +return ret; + } + +memcpy (&cmd, info->clx_tbl,sizeof (cmd));
You're not adjusting anything (unlike the other function), so you can just pass info->clx_tbl below
drivers/gpu/drm/msm/adreno/a6xx_hfi.c static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu) · line 951
Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +6
-0+ + ret =a6xx_hfi_send_msg (gmu,HFI_H2F_MSG_CLX_TBL , &cmd,sizeof (cmd),NULL ,0 ); +if (ret) { +DRM_DEV_ERROR (gmu->dev,"Unable to send CLX table (%d)\n" , ret); +return ret; + }
Konrad
Re: [PATCH 1/3] drm/msm/a6xx: Add HFI support for CLX feature
In reply to Akhil P OommenQuoted 55 lines · Akhil P Oommen
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 <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 ++++++++ drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+)drivers/gpu/drm/msm/adreno/a6xx_gpu.h +15
-0@@ -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 {drivers/gpu/drm/msm/adreno/a6xx_hfi.c +0
-0@@ -886,6 +886,73 @@ static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu)return 0 ; }
drivers/gpu/drm/msm/adreno/a6xx_hfi.c static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu) · line 898
Quoted 10 lines
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +10
-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
Akhil P Oommen
reviewerPATCH 2/3 drm/msm/a6xx: Enable CLX feature on A840
In reply to Akhil P OommenAdd the A840 CLX domain table and the IFF/PCLX limits table to the catalog. With the HFI plumbing in place, this enables the Current Limit Extension (CLX) feature on Adreno 840.
--- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+)
drivers/gpu/drm/msm/adreno/a6xx_catalog.c +86 -0
@@ -2108,6 +2108,90 @@ static const struct adreno_reglist_pipe a840_dyn_pwrup_reglist_regs[] = { };DECLARE_ADRENO_REGLIST_PIPE_LIST (a840_dyn_pwrup_reglist); +static const struct a6xx_hfi_clx_table_v2_cmd a840_clx_tbl = { + .version = (2 <<16 ) |1 , + .domain = { +/* GX DOMAIN */ + { + .data =CLX_DATA (60 ,5 ,1 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, +/* MXG DOMAIN */ + { + .data =CLX_DATA (60 ,1 ,1 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =50 , + }, + }, +}; + +struct a6xx_hfi_limits_tbl a840_limits_tbl[] = { + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =12 , + .mit_time =5 , + .curr_limit =6000 , + }, + }, + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =9 , + .mit_time =2000 , + .curr_limit =6000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =7 , + .mit_time =3 , + .curr_limit =30000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =0 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =7 , + .mit_time =3 , + .curr_limit =6000 , + }, + }, +}; +DECLARE_ADRENO_LIMITS_TABLE (a840_limits); +static const struct adreno_info a8xx_gpus[] = { { .chip_ids =ADRENO_CHIP_IDS (0x44070001 ),
@@ -2185,6 +2269,8 @@ static const struct adreno_info a8xx_gpus[] = { }, { /* sentinel */ }, }, + .clx_tbl = &a840_clx_tbl, + .limits_tbl = &a840_limits, }, .preempt_record_size = 19708 * SZ_1K, .speedbins = ADRENO_SPEEDBINS(
Signature · 1 line
2.51.0
Re: [PATCH 2/3] drm/msm/a6xx: Enable CLX feature on A840
Quoted 14 lines · Akhil P Oommen
Add the A840 CLX domain table and the IFF/PCLX limits table to the catalog. With the HFI plumbing in place, this enables the Current Limit Extension (CLX) feature on Adreno 840.
Signed-off-by Akhil P Oommen <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+)drivers/gpu/drm/msm/adreno/a6xx_catalog.c +0
-0
drivers/gpu/drm/msm/adreno/a6xx_catalog.c static const struct adreno_reglist_pipe a840_dyn_pwrup_reglist_regs[] = { · line 2112
Quoted 5 lines
drivers/gpu/drm/msm/adreno/a6xx_catalog.c +2
-0@@ -2108,6 +2108,90 @@ static const struct adreno_reglist_pipe a840_dyn_pwrup_reglist_regs[] = { };DECLARE_ADRENO_REGLIST_PIPE_LIST (a840_dyn_pwrup_reglist); +static const struct a6xx_hfi_clx_table_v2_cmd a840_clx_tbl = { + .version = (2 <<16 ) |1 ,
Is that major/minor or major=2 minor=0 patch=1? Please add a define
otherwise
Konrad
Akhil P Oommen
reviewerPATCH 3/3 drm/msm/a8xx: Enable CLX feature on Adreno X2-85
In reply to Akhil P OommenAdd the CLX domain table and the IFF/PCLX limits tables to the catalog to enable CLX feature support on Adreno X2-85 GPU present in the Glymur chipset.
--- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+)
drivers/gpu/drm/msm/adreno/a6xx_catalog.c +86 -0
@@ -1799,6 +1799,90 @@ static const struct adreno_reglist_pipe x285_dyn_pwrup_reglist_regs[] = { };DECLARE_ADRENO_REGLIST_PIPE_LIST (x285_dyn_pwrup_reglist); +static const struct a6xx_hfi_clx_table_v2_cmd x285_clx_tbl = { + .version = (2 <<16 ) |1 , + .domain = { +/* GX DOMAIN */ + { + .data =CLX_DATA (60 ,11 ,0 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, +/* MXG DOMAIN */ + { + .data =CLX_DATA (60 ,3 ,1 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, + }, +}; + +struct a6xx_hfi_limits_tbl x285_limits_tbl[] = { + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =12 , + .mit_time =5 , + .curr_limit =18000 , + }, + }, + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =18 , + .mit_time =2000 , + .curr_limit =6000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =66000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =0 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =18000 , + }, + }, +}; +DECLARE_ADRENO_LIMITS_TABLE (x285_limits); +static const struct adreno_reglist_pipe a840_nonctxt_regs[] = { {REG_A8XX_CP_SMMU_STREAM_ID_LPAC ,0x00000101 ,BIT (PIPE_NONE ) }, {REG_A8XX_GRAS_DBG_ECO_CNTL ,0x00000800 ,BIT (PIPE_BV ) |BIT (PIPE_BR ) },
@@ -2227,6 +2311,8 @@ static const struct adreno_info a8xx_gpus[] = { }, { /* sentinel */ }, }, + .clx_tbl = &x285_clx_tbl, + .limits_tbl = &x285_limits, }, .speedbins = ADRENO_SPEEDBINS( { 0, 0 },
Signature · 1 line
2.51.0
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 6 lines · Akhil P Oommen
Add the CLX domain table and the IFF/PCLX limits tables to the catalog to enable CLX feature support on Adreno X2-85 GPU present in the Glymur chipset.
Signed-off-by Akhil P Oommen <[email protected]>---
Konrad
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
In reply to Akhil P OommenQuoted 4 lines · Akhil P Oommen
Add the CLX domain table and the IFF/PCLX limits tables to the catalog to enable CLX feature support on Adreno X2-85 GPU present in the Glymur chipset.
This patch landed in next-20261001 and while it works on my Glymur CRD (COB), on the Asus Zenbook A14 I see the following failure during boot:
[ 4.843643] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt [msm]] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 4.853804] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob [msm]] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 4.853878] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu [msm]] *ERROR* gpu hw init failed: -110 [ 4.863980] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob [msm]] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 4.864038] platform 3d6c000.gmu: [drm:a6xx_hfi_stop [msm]] *ERROR* HFI queue 2 is not empty [ 5.128548] ------------[ cut here ]------------
And then as one can expect there's no more GPU.
Reverting this single patch makes next-20261001 work again.
#regzb introduced: 93b6c8d10fad ("drm/msm/a8xx: Enable CLX feature on Adreno X2-85")
Regards,
Bjorn
Quoted 114 lines
Signed-off-by Akhil P Oommen <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+)drivers/gpu/drm/msm/adreno/a6xx_catalog.c +86
-0@@ -1799,6 +1799,90 @@ static const struct adreno_reglist_pipe x285_dyn_pwrup_reglist_regs[] = { };DECLARE_ADRENO_REGLIST_PIPE_LIST (x285_dyn_pwrup_reglist); +static const struct a6xx_hfi_clx_table_v2_cmd x285_clx_tbl = { + .version = (2 <<16 ) |1 , + .domain = { +/* GX DOMAIN */ + { + .data =CLX_DATA (60 ,11 ,0 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, +/* MXG DOMAIN */ + { + .data =CLX_DATA (60 ,3 ,1 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, + }, +}; + +struct a6xx_hfi_limits_tbl x285_limits_tbl[] = { + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =12 , + .mit_time =5 , + .curr_limit =18000 , + }, + }, + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =18 , + .mit_time =2000 , + .curr_limit =6000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =66000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =0 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =18000 , + }, + }, +}; +DECLARE_ADRENO_LIMITS_TABLE (x285_limits); +static const struct adreno_reglist_pipe a840_nonctxt_regs[] = { {REG_A8XX_CP_SMMU_STREAM_ID_LPAC ,0x00000101 ,BIT (PIPE_NONE ) }, {REG_A8XX_GRAS_DBG_ECO_CNTL ,0x00000800 ,BIT (PIPE_BV ) |BIT (PIPE_BR ) },@@ -2227,6 +2311,8 @@ static const struct adreno_info a8xx_gpus[] = { }, { /* sentinel */ }, }, + .clx_tbl = &x285_clx_tbl, + .limits_tbl = &x285_limits, }, .speedbins = ADRENO_SPEEDBINS( { 0, 0 },Signature · 2 lines
-- 2.51.0
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Same on a Lenovo Yoga Slim 7x Gen 11 (Glymur) with next-20261001, GMU firmware v5.2.38:
[ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Compositor fails on the first start and works on the second.
Reverting this patch fixes it here as well.
Oleg
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 10 lines · Oleg Keri
Same on a Lenovo Yoga Slim 7x Gen 11 (Glymur) with next-20261001, GMU firmware v5.2.38:
[ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Quoted 3 lines
Compositor fails on the first start and works on the second.
Reverting this patch fixes it here as well.
Interesting.. I'd been using this patch, but cherry-picked on v7.3-rc3 (on glymur slim7x) for a few weeks with no issue
Can you share dmesg | grep drm? In my case the initrd is missing fw so gpu is initialized later, I guess when the compositor starts.
BR,
-R
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 2 lines · Rob Clark
Can you share
dmesg | grep drm? In my case the initrd is missing fw so gpu is initialized later, I guess when the compositor starts.
Here it is. The kernel is built without modules and with the firmware built in, so the GPU is brought up right at boot. The GMU firmware is gen80100_gmu.bin from linux-firmware (v5.2.38).
[ 0.620358] msm_dpu ae01000.display-controller: [drm] Using Transparent Hugepage [ 0.621120] [drm:dpu_kms_hw_init:1168] dpu hardware revision:0xc0020000 [ 0.625910] [drm] Initialized msm 1.13.0 for ae01000.display-controller on minor 0 [ 0.626015] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/gen80100_sqe.fw from new location [ 0.626115] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/gen80100_gmu.bin from new location [ 0.626994] [drm] Loaded GMU firmware v5.2.38 [ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 1.652389] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.652401] platform 3d6c000.gmu: [drm:a6xx_hfi_stop] *ERROR* HFI queue 2 is not empty [ 1.858322] msm_dpu ae01000.display-controller: [drm] fb0: msmdrmfb frame buffer device [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110 [ 8.187443] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.187650] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Oleg
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 9 lines · Oleg Keri
Quoted 2 lines · Rob Clark
Can you share
dmesg | grep drm? In my case the initrd is missing fw so gpu is initialized later, I guess when the compositor starts.Here it is. The kernel is built without modules and with the firmware built in, so the GPU is brought up right at boot. The GMU firmware is gen80100_gmu.bin from linux-firmware (v5.2.38).
Quoted 17 lines
[ 0.620358] msm_dpu ae01000.display-controller: [drm] Using Transparent Hugepage [ 0.621120] [drm:dpu_kms_hw_init:1168] dpu hardware revision:0xc0020000 [ 0.625910] [drm] Initialized msm 1.13.0 for ae01000.display-controller on minor 0 [ 0.626015] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/gen80100_sqe.fw from new location [ 0.626115] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/gen80100_gmu.bin from new location [ 0.626994] [drm] Loaded GMU firmware v5.2.38 [ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 1.652389] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.652401] platform 3d6c000.gmu: [drm:a6xx_hfi_stop] *ERROR* HFI queue 2 is not empty [ 1.858322] msm_dpu ae01000.display-controller: [drm] fb0: msmdrmfb frame buffer device [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110 [ 8.187443] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.187650] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Ok, now it would be interesting to compare the same from Bjorn's CRD vs zenbook..
BR,
-R
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
In reply to Oleg KeriQuoted 12 lines · Oleg Keri
Quoted 2 lines
This patch landed in next-20261001 and while it works on my Glymur CRD (COB), on the Asus Zenbook A14 I see the following failure during boot:
Same on a Lenovo Yoga Slim 7x Gen 11 (Glymur) with next-20261001, GMU firmware v5.2.38:
[ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Quoted 3 lines
Compositor fails on the first start and works on the second.
Reverting this patch fixes it here as well.
What's the status here? Was this fixed meanwhile? Or is this regression how heading towards mainline now that the merge window is open?
Ciao, Thorsten
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 14 lines · Thorsten Leemhuis
Quoted 12 lines · Oleg Keri
Quoted 2 lines
This patch landed in next-20261001 and while it works on my Glymur CRD (COB), on the Asus Zenbook A14 I see the following failure during boot:
Same on a Lenovo Yoga Slim 7x Gen 11 (Glymur) with next-20261001, GMU firmware v5.2.38:
[ 1.632277] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 1.642345] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 1.642360] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* gpu hw init failed: -110 [ 8.053367] platform 3d6c000.gmu: [drm:a6xx_gmu_resume] *ERROR* GMU firmware initialization timed out [ 8.053584] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu] *ERROR* Couldn't power up the GPU: -110
Quoted 5 lines
Quoted 3 lines
Compositor fails on the first start and works on the second.
Reverting this patch fixes it here as well.
What's the status here? Was this fixed meanwhile? Or is this regression how heading towards mainline now that the merge window is open?
AFAIU this is still open.. but seems to be contained to a non-typical config (modules + fw built-in). It seems to be caused by trying to initialize the GPU (and send the CLX tables to the GMU) before _something_ else is ready. Tracking down what that _something_ is is still ongoing.
OTOH not having CLX could lead to problems exceeding hw current limits, which itself is a problem. And why I did not revert CLX.
BR,
-R
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
I guess this should be investigated further. Yoga Slim 7x Gen 11, no modules, firmware built in, so the GMU comes up at 0.6 s.
It's rpmhpd. Before its sync_state, rpmhpd_aggregate_corner() pushes every vote to the highest corner. The gxclkctl probe does a runtime resume/suspend of its GFX and GMXC domains at 0.18 s (qcom_cc_probe -> pm_runtime -> genpd -> rpmhpd_power_on), and from that point both rails are stuck at max until rpmhpd syncs, which is at 2.8 s here. The GMU then does its CLX DCVS calibration on a rail that won't move.
The GMU log buffer (fw v5.2.38) agrees: the calibration trace of the bad boot matches the first good one step for step up to the ninth level. There it stops, and the firmware puts HFI_F2H_MSG_ERROR 0x007306c7 "ResMgrCalibrateDcvsLvl" on the debug queue. The GX_BW_PERF_VOTE timeout is simply the next message we send.
With gfx and gmxc taken out of the clamp (hack below) the first GPU init at 0.6 s just works, CLX tables included. Three boots so far.
The wedged GMU after a failed attempt is a different story. Retries after rpmhpd's sync_state still die with "GMU firmware initialization timed out" until gpucc's sync_state (fw_devlink timeout, 13 s) collapses CX. That's what the gpu_cc_cx_gdsc/NO_STAY_ON thing in my earlier mail was about: the recovery, not the cause.
The RSC side is not it. On A8xx the GMU firmware loads the RSC sequencer code and TCS slots on its own; preloading them before the first boot made no difference.
Abel's CRD failing even with msm loaded at 90 s doesn't match this, unless something keeps gfx.lvl high on the CRD after sync_state. Could be a second problem.
drivers/pmdomain/qcom/rpmhpd.c +1 -1
@@ -1009,7 +1009,7 @@ static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) -if (pd->state_synced) { +if (pd->state_synced || pd == &gfx || pd == &gmxc) {to_active_sleep (pd, corner, &this_active_corner, &this_sleep_corner); }else {/* Clamp to highest corner if sync_state hasn't happened */
Oleg
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 36 lines · Oleg Keri
I guess this should be investigated further. Yoga Slim 7x Gen 11, no modules, firmware built in, so the GMU comes up at 0.6 s.
It's rpmhpd. Before its
sync_state,rpmhpd_aggregate_corner()pushes every vote to the highest corner. The gxclkctl probe does a runtime resume/suspend of its GFX and GMXC domains at 0.18 s (qcom_cc_probe->pm_runtime-> genpd ->rpmhpd_power_on), and from that point both rails are stuck at max until rpmhpd syncs, which is at 2.8 s here. The GMU then does its CLX DCVS calibration on a rail that won't move.The GMU log buffer (fw v5.2.38) agrees: the calibration trace of the bad boot matches the first good one step for step up to the ninth level. There it stops, and the firmware puts
HFI_F2H_MSG_ERROR0x007306c7"ResMgrCalibrateDcvsLvl" on the debug queue. TheGX_BW_PERF_VOTEtimeout is simply the next message we send.With gfx and gmxc taken out of the clamp (hack below) the first GPU init at 0.6 s just works, CLX tables included. Three boots so far.
The wedged GMU after a failed attempt is a different story. Retries after rpmhpd's
sync_statestill die with "GMU firmware initialization timed out" until gpucc'ssync_state(fw_devlinktimeout, 13 s) collapses CX. That's what the gpu_cc_cx_gdsc/NO_STAY_ON thing in my earlier mail was about: the recovery, not the cause.The RSC side is not it. On A8xx the GMU firmware loads the RSC sequencer code and TCS slots on its own; preloading them before the first boot made no difference.
Abel's CRD failing even with msm loaded at 90 s doesn't match this, unless something keeps gfx.lvl high on the CRD after
sync_state. Could be a second problem.
drivers/pmdomain/qcom/rpmhpd.c static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) · line 1013
Quoted 6 lines
drivers/pmdomain/qcom/rpmhpd.c +1
-1@@ -1009,7 +1009,7 @@ static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner) -if (pd->state_synced) { +if (pd->state_synced || pd == &gfx || pd == &gmxc) {to_active_sleep (pd, corner, &this_active_corner, &this_sleep_corner); }else {/* Clamp to highest corner if sync_state hasn't happened */
Could you please send this out as a fix for v7.4? I will respin the gmu driver series and revert this bit there. But that would be v7.5 stuff.
-Akhil.
Quoted 1 line
Oleg
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Sent: https://lore.kernel.org/r/[email protected]
Narrowed it down meanwhile, with the clamp corner selectable on the command line: gmxc pinned at max is harmless. gfx pinned at level 11 (0x1c4, the top of the perf table), 12 or 13 fails every time, level 10 and below boots fine. So it isn't "the rail can't follow", it's the gfx rail sitting at or above the highest level in the table while the firmware calibrates. CLX being a current limiter, a limit entry would be my guess, but that's firmware territory.
If the CRD still fails after sync_state, gfx.lvl being held at the top level by something else would be the first thing I'd check there.
Oleg
Akhil P Oommen
reviewerRe: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
In reply to Bjorn AnderssonQuoted 16 lines · Bjorn Andersson
Quoted 4 lines · Akhil P Oommen
Add the CLX domain table and the IFF/PCLX limits tables to the catalog to enable CLX feature support on Adreno X2-85 GPU present in the Glymur chipset.
This patch landed in next-20261001 and while it works on my Glymur CRD (COB), on the Asus Zenbook A14 I see the following failure during boot:
[ 4.843643] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt [msm]] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 4.853804] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob [msm]] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 4.853878] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu [msm]] *ERROR* gpu hw init failed: -110 [ 4.863980] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob [msm]] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 4.864038] platform 3d6c000.gmu: [drm:a6xx_hfi_stop [msm]] *ERROR* HFI queue 2 is not empty [ 5.128548] ------------[ cut here ]------------
Quoted 5 lines
And then as one can expect there's no more GPU.
Reverting this single patch makes next-20261001 work again.
#regzb introduced:
93b6c8d10fad("drm/msm/a8xx: Enable CLX feature on Adreno X2-85")
Could you please try this fix?
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +6 -2
@@ -1241,8 +1241,12 @@ static int a6xx_gmu_secure_init(struct a6xx_gpu *a6xx_gpu) goto done; } - ret =qcom_scm_gpu_init_regs (QCOM_SCM_GPU_ALWAYS_EN_REQ | -QCOM_SCM_GPU_TSENSE_EN_REQ ); +u32 gpu_req =QCOM_SCM_GPU_ALWAYS_EN_REQ |QCOM_SCM_GPU_TSENSE_EN_REQ ; + +if (adreno_gpu->info->a6xx->clx_tbl) + gpu_req |=QCOM_SCM_GPU_CLX_EN_REQ ; + + ret =qcom_scm_gpu_init_regs (gpu_req);if (ret) {dev_warn_once (gpu->dev->dev,"SCM call failed\n" );
Quoted 114 lines
Regards,
BjornQuoted 110 lines
Signed-off-by Akhil P Oommen <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+)drivers/gpu/drm/msm/adreno/a6xx_catalog.c +86
-0@@ -1799,6 +1799,90 @@ static const struct adreno_reglist_pipe x285_dyn_pwrup_reglist_regs[] = { };DECLARE_ADRENO_REGLIST_PIPE_LIST (x285_dyn_pwrup_reglist); +static const struct a6xx_hfi_clx_table_v2_cmd x285_clx_tbl = { + .version = (2 <<16 ) |1 , + .domain = { +/* GX DOMAIN */ + { + .data =CLX_DATA (60 ,11 ,0 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, +/* MXG DOMAIN */ + { + .data =CLX_DATA (60 ,3 ,1 ,1 ), + .clxt =0 , + .clxh =0 , + .urg_mode =1 , + .lkg_en =0 , + .curr_budget =100 , + }, + }, +}; + +struct a6xx_hfi_limits_tbl x285_limits_tbl[] = { + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =12 , + .mit_time =5 , + .curr_limit =18000 , + }, + }, + { + .feature_id =GMU_MIT_IFF , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =18 , + .mit_time =2000 , + .curr_limit =6000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_GX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =1 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =66000 , + }, + }, + { + .feature_id =GMU_MIT_PCLX , + .domain =GMU_MX_DOMAIN , + .feature_rev =0 , + .cfg = { + .enable =0 , + .msg_path =0 , + .lkg_en =0 , + .mode =0 , + .sid =6 , + .mit_time =3 , + .curr_limit =18000 , + }, + }, +}; +DECLARE_ADRENO_LIMITS_TABLE (x285_limits); +static const struct adreno_reglist_pipe a840_nonctxt_regs[] = { {REG_A8XX_CP_SMMU_STREAM_ID_LPAC ,0x00000101 ,BIT (PIPE_NONE ) }, {REG_A8XX_GRAS_DBG_ECO_CNTL ,0x00000800 ,BIT (PIPE_BV ) |BIT (PIPE_BR ) },@@ -2227,6 +2311,8 @@ static const struct adreno_info a8xx_gpus[] = { }, { /* sentinel */ }, }, + .clx_tbl = &x285_clx_tbl, + .limits_tbl = &x285_limits, }, .speedbins = ADRENO_SPEEDBINS( { 0, 0 },
Quoted 4 lines
Quoted 4 lines
Signature · 1 line
2.51.0
-Akhil
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
Quoted 1 line · Akhil P Oommen
Could you please try this fix?
I tried it on the Lenovo Yoga Slim 7x Gen 11 (next-20261001, built-in firmware): no change, the first GPU init still times out on HFI_H2F_MSG_GX_BW_PERF_VOTE.
What I noticed: the first init at probe always fails, and every retry fails as well until gpucc's sync_state is forced by the fw_devlink timeout about 12 s into boot. The GMU node never binds a driver, so gpucc gets no earlier sync_state, and until then genpd keeps gpu_cc_cx_gdsc on. With GENPD_FLAG_NO_STAY_ON on gpu_cc_cx_gdsc the retry when the compositor starts succeeds.
Oleg
Re: [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85
In reply to Akhil P OommenQuoted 3 lines · Akhil P Oommen
Add the CLX domain table and the IFF/PCLX limits tables to the catalog to enable CLX feature support on Adreno X2-85 GPU present in the Glymur chipset.
Same on Glymur CRD with next-20261013, GMU fw v5.2.38:
[ 6.619232] platform 3d6c000.gmu: [drm:a6xx_hfi_wait_for_msg_interrupt [msm]] *ERROR* Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 11 timed out waiting for response [ 6.629590] platform 3d6c000.gmu: [drm:a6xx_gmu_set_oob [msm]] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x4 [ 6.629750] msm_dpu ae01000.display-controller: [drm:adreno_load_gpu [msm]] *ERROR* gpu hw init failed: -110 [ 14.795082] platform 3d6c000.gmu: [drm:a6xx_gmu_resume [msm]] *ERROR* GMU firmware initialization timed out
Dropping just the .clx_tbl/.limits_tbl from the 0x44070001 entry fixes it.
Tried on top of next-20261013, no change:
- the QCOM_SCM_GPU_CLX_EN_REQ change
- GENPD_FLAG_NO_STAY_ON on gpu_cc_cx_gdsc
- modprobe.blacklist=msm and modprobe msm at ~90s, after all sync_state() calls are done
So on CRD it is not an ordering issue. The CLX/IFF_PCLX HFI messages are all acked, then the first GX_BW_PERF_VOTE never gets a reply and the GMU stays wedged after that.