* [PATCH 0/2] Print GMU version at boot on >A630
@ 2024-12-19 22:36 Konrad Dybcio
2024-12-19 22:36 ` [PATCH 1/2] drm/msm: registers: Add GMU FW version register Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-12-19 22:36 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, David Airlie, Simona Vetter
Cc: Marijn Suijten, linux-arm-msm, dri-devel, freedreno, linux-kernel,
Akhil P Oommen, Konrad Dybcio
Might come in useful to try and track down otherwise inexplicable
failures in e.g. old CI logs. A630 uses a different mechanism that is
not implemented in this series.
Tested on 8280 and X1
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Konrad Dybcio (2):
drm/msm: registers: Add GMU FW version register
drm/msm/a6xx: Print GMU core firmware version at boot
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 5 +++++
2 files changed, 12 insertions(+)
---
base-commit: 8503810115fbff903f626adc0788daa048302bc0
change-id: 20241219-topic-gmu_fw_ver-609e8b867802
Best regards,
--
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] drm/msm: registers: Add GMU FW version register
2024-12-19 22:36 [PATCH 0/2] Print GMU version at boot on >A630 Konrad Dybcio
@ 2024-12-19 22:36 ` Konrad Dybcio
2024-12-19 22:36 ` [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot Konrad Dybcio
2025-01-02 20:12 ` [PATCH 0/2] Print GMU version at boot on >A630 Akhil P Oommen
2 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-12-19 22:36 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, David Airlie, Simona Vetter
Cc: Marijn Suijten, linux-arm-msm, dri-devel, freedreno, linux-kernel,
Akhil P Oommen, Konrad Dybcio
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Add a register that contains the GMU core firmware version on non-
legacy (non-sdm845-family) SoCs.
The name is guesstimated based on what it does downstream, but it'll
do.
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml b/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
index 6531749d30f4e4e57ca4f7b43a28b7829504a9f3..3d2cc339b8f19c8d24b2c9144569b2364afc5ebc 100644
--- a/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
+++ b/drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml
@@ -52,6 +52,11 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
<reg32 offset="0x23fd" name="GMU_DCVS_PERF_SETTING"/>
<reg32 offset="0x23fe" name="GMU_DCVS_BW_SETTING"/>
<reg32 offset="0x23ff" name="GMU_DCVS_RETURN"/>
+ <reg32 offset="0x2bf8" name="GMU_CORE_FW_VERSION">
+ <bitfield name="MAJOR" low="28" high="31"/>
+ <bitfield name="MINOR" low="16" high="27"/>
+ <bitfield name="STEP" low="0" high="15"/>
+ </reg32>
<reg32 offset="0x4c00" name="GMU_ICACHE_CONFIG"/>
<reg32 offset="0x4c01" name="GMU_DCACHE_CONFIG"/>
<reg32 offset="0x4c0f" name="GMU_SYS_BUS_CONFIG"/>
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot
2024-12-19 22:36 [PATCH 0/2] Print GMU version at boot on >A630 Konrad Dybcio
2024-12-19 22:36 ` [PATCH 1/2] drm/msm: registers: Add GMU FW version register Konrad Dybcio
@ 2024-12-19 22:36 ` Konrad Dybcio
2025-02-13 16:35 ` Abel Vesa
2025-01-02 20:12 ` [PATCH 0/2] Print GMU version at boot on >A630 Akhil P Oommen
2 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2024-12-19 22:36 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, David Airlie, Simona Vetter
Cc: Marijn Suijten, linux-arm-msm, dri-devel, freedreno, linux-kernel,
Akhil P Oommen, Konrad Dybcio
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Log the version for informational purposes, such as for keeping track
of possible GMU fw-related failures in crash / CI logs.
Intentionally not implemented on the if (gmu->legacy) codepath, as
these registers seem not to be used on there.
Downstream additionally warns if the firmware version is too old for
a given GPU, but we already pair the binary to a given GPU, so let's
not go there at the moment.
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 14db7376c712d19446b38152e480bd5a1e0a5198..a7ea2b2af1dc3816906236df929df36e37d8f606 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -729,6 +729,7 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
const struct firmware *fw_image = adreno_gpu->fw[ADRENO_FW_GMU];
const struct block_header *blk;
u32 reg_offset;
+ u32 ver;
u32 itcm_base = 0x00000000;
u32 dtcm_base = 0x00040000;
@@ -775,6 +776,12 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
}
}
+ ver = gmu_read(gmu, REG_A6XX_GMU_CORE_FW_VERSION);
+ DRM_INFO("Loaded GMU firmware v%u.%u.%u\n",
+ FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MAJOR__MASK, ver),
+ FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MINOR__MASK, ver),
+ FIELD_GET(A6XX_GMU_CORE_FW_VERSION_STEP__MASK, ver));
+
return 0;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Print GMU version at boot on >A630
2024-12-19 22:36 [PATCH 0/2] Print GMU version at boot on >A630 Konrad Dybcio
2024-12-19 22:36 ` [PATCH 1/2] drm/msm: registers: Add GMU FW version register Konrad Dybcio
2024-12-19 22:36 ` [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot Konrad Dybcio
@ 2025-01-02 20:12 ` Akhil P Oommen
2 siblings, 0 replies; 7+ messages in thread
From: Akhil P Oommen @ 2025-01-02 20:12 UTC (permalink / raw)
To: Konrad Dybcio, Rob Clark, Sean Paul, Abhinav Kumar,
Dmitry Baryshkov, David Airlie, Simona Vetter
Cc: Marijn Suijten, linux-arm-msm, dri-devel, freedreno, linux-kernel,
Konrad Dybcio
On 12/20/2024 4:06 AM, Konrad Dybcio wrote:
> Might come in useful to try and track down otherwise inexplicable
> failures in e.g. old CI logs. A630 uses a different mechanism that is
> not implemented in this series.
>
> Tested on 8280 and X1
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
For the whole series:
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
-Akhil
> ---
> Konrad Dybcio (2):
> drm/msm: registers: Add GMU FW version register
> drm/msm/a6xx: Print GMU core firmware version at boot
>
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
> drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 5 +++++
> 2 files changed, 12 insertions(+)
> ---
> base-commit: 8503810115fbff903f626adc0788daa048302bc0
> change-id: 20241219-topic-gmu_fw_ver-609e8b867802
>
> Best regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot
2024-12-19 22:36 ` [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot Konrad Dybcio
@ 2025-02-13 16:35 ` Abel Vesa
2025-02-13 16:41 ` Thomas Zimmermann
0 siblings, 1 reply; 7+ messages in thread
From: Abel Vesa @ 2025-02-13 16:35 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Rob Clark, Sean Paul, Abhinav Kumar, Dmitry Baryshkov,
David Airlie, Simona Vetter, Marijn Suijten, linux-arm-msm,
dri-devel, freedreno, linux-kernel, Akhil P Oommen, Konrad Dybcio
On 24-12-19 23:36:56, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Log the version for informational purposes, such as for keeping track
> of possible GMU fw-related failures in crash / CI logs.
>
> Intentionally not implemented on the if (gmu->legacy) codepath, as
> these registers seem not to be used on there.
>
> Downstream additionally warns if the firmware version is too old for
> a given GPU, but we already pair the binary to a given GPU, so let's
> not go there at the moment.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 14db7376c712d19446b38152e480bd5a1e0a5198..a7ea2b2af1dc3816906236df929df36e37d8f606 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -729,6 +729,7 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
> const struct firmware *fw_image = adreno_gpu->fw[ADRENO_FW_GMU];
> const struct block_header *blk;
> u32 reg_offset;
> + u32 ver;
>
> u32 itcm_base = 0x00000000;
> u32 dtcm_base = 0x00040000;
> @@ -775,6 +776,12 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
> }
> }
>
> + ver = gmu_read(gmu, REG_A6XX_GMU_CORE_FW_VERSION);
> + DRM_INFO("Loaded GMU firmware v%u.%u.%u\n",
> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MAJOR__MASK, ver),
> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MINOR__MASK, ver),
> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_STEP__MASK, ver));
I get the following spam:
[ 109.928924] [drm] Loaded GMU firmware v3.1.10
[ 110.301295] [drm] Loaded GMU firmware v3.1.10
[ 110.472620] [drm] Loaded GMU firmware v3.1.10
[ 111.164303] [drm] Loaded GMU firmware v3.1.10
[ 111.864830] [drm] Loaded GMU firmware v3.1.10
...
Stacktrace shows this being called from runtime resume:
[ 19.380390] Call trace:
[ 19.380391] show_stack+0x18/0x24 (C)
[ 19.380399] dump_stack_lvl+0x40/0x84
[ 19.380403] dump_stack+0x18/0x24
[ 19.380405] a6xx_gmu_resume+0x450/0xc44 [msm]
[ 19.380426] a6xx_gmu_pm_resume+0x34/0x220 [msm]
[ 19.380437] adreno_runtime_resume+0x28/0x34 [msm]
[ 19.380446] pm_generic_runtime_resume+0x28/0x3c
[ 19.380451] __rpm_callback+0x84/0x390
[ 19.380453] rpm_resume+0x3d0/0x5c0
[ 19.380455] __pm_runtime_resume+0x4c/0x94
[ 19.380457] adreno_get_param+0xdc/0x274 [msm]
[ 19.380466] msm_ioctl_get_param+0x5c/0x68 [msm]
[ 19.380475] drm_ioctl_kernel+0xd4/0x10c [drm]
[ 19.380491] drm_ioctl+0x26c/0x40c [drm]
[ 19.380499] __arm64_sys_ioctl+0x90/0xcc
[ 19.380503] invoke_syscall+0x40/0xf8
[ 19.380505] el0_svc_common+0xac/0xdc
[ 19.380506] do_el0_svc+0x1c/0x28
[ 19.380508] el0_svc+0x34/0x7c
[ 19.380512] el0t_64_sync_handler+0x84/0x108
[ 19.380513] el0t_64_sync+0x198/0x19c
So maybe DRM_INFO_ONCE instead ?
> +
> return 0;
> }
>
>
> --
> 2.47.1
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot
2025-02-13 16:35 ` Abel Vesa
@ 2025-02-13 16:41 ` Thomas Zimmermann
2025-02-13 16:47 ` Konrad Dybcio
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Zimmermann @ 2025-02-13 16:41 UTC (permalink / raw)
To: Abel Vesa, Konrad Dybcio
Cc: Rob Clark, Sean Paul, Abhinav Kumar, Dmitry Baryshkov,
David Airlie, Simona Vetter, Marijn Suijten, linux-arm-msm,
dri-devel, freedreno, linux-kernel, Akhil P Oommen, Konrad Dybcio
Hi
Am 13.02.25 um 17:35 schrieb Abel Vesa:
> On 24-12-19 23:36:56, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> Log the version for informational purposes, such as for keeping track
>> of possible GMU fw-related failures in crash / CI logs.
>>
>> Intentionally not implemented on the if (gmu->legacy) codepath, as
>> these registers seem not to be used on there.
>>
>> Downstream additionally warns if the firmware version is too old for
>> a given GPU, but we already pair the binary to a given GPU, so let's
>> not go there at the moment.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> ---
>> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
>> index 14db7376c712d19446b38152e480bd5a1e0a5198..a7ea2b2af1dc3816906236df929df36e37d8f606 100644
>> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
>> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
>> @@ -729,6 +729,7 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
>> const struct firmware *fw_image = adreno_gpu->fw[ADRENO_FW_GMU];
>> const struct block_header *blk;
>> u32 reg_offset;
>> + u32 ver;
>>
>> u32 itcm_base = 0x00000000;
>> u32 dtcm_base = 0x00040000;
>> @@ -775,6 +776,12 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
>> }
>> }
>>
>> + ver = gmu_read(gmu, REG_A6XX_GMU_CORE_FW_VERSION);
>> + DRM_INFO("Loaded GMU firmware v%u.%u.%u\n",
>> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MAJOR__MASK, ver),
>> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_MINOR__MASK, ver),
>> + FIELD_GET(A6XX_GMU_CORE_FW_VERSION_STEP__MASK, ver));
> I get the following spam:
>
> [ 109.928924] [drm] Loaded GMU firmware v3.1.10
> [ 110.301295] [drm] Loaded GMU firmware v3.1.10
> [ 110.472620] [drm] Loaded GMU firmware v3.1.10
> [ 111.164303] [drm] Loaded GMU firmware v3.1.10
> [ 111.864830] [drm] Loaded GMU firmware v3.1.10
> ...
>
> Stacktrace shows this being called from runtime resume:
>
> [ 19.380390] Call trace:
> [ 19.380391] show_stack+0x18/0x24 (C)
> [ 19.380399] dump_stack_lvl+0x40/0x84
> [ 19.380403] dump_stack+0x18/0x24
> [ 19.380405] a6xx_gmu_resume+0x450/0xc44 [msm]
> [ 19.380426] a6xx_gmu_pm_resume+0x34/0x220 [msm]
> [ 19.380437] adreno_runtime_resume+0x28/0x34 [msm]
> [ 19.380446] pm_generic_runtime_resume+0x28/0x3c
> [ 19.380451] __rpm_callback+0x84/0x390
> [ 19.380453] rpm_resume+0x3d0/0x5c0
> [ 19.380455] __pm_runtime_resume+0x4c/0x94
> [ 19.380457] adreno_get_param+0xdc/0x274 [msm]
> [ 19.380466] msm_ioctl_get_param+0x5c/0x68 [msm]
> [ 19.380475] drm_ioctl_kernel+0xd4/0x10c [drm]
> [ 19.380491] drm_ioctl+0x26c/0x40c [drm]
> [ 19.380499] __arm64_sys_ioctl+0x90/0xcc
> [ 19.380503] invoke_syscall+0x40/0xf8
> [ 19.380505] el0_svc_common+0xac/0xdc
> [ 19.380506] do_el0_svc+0x1c/0x28
> [ 19.380508] el0_svc+0x34/0x7c
> [ 19.380512] el0t_64_sync_handler+0x84/0x108
> [ 19.380513] el0t_64_sync+0x198/0x19c
>
> So maybe DRM_INFO_ONCE instead ?
drm_dbg() seems appropriate. Most of the time, firmware versions are not
interesting.
Best regards
Thomas
>
>> +
>> return 0;
>> }
>>
>>
>> --
>> 2.47.1
>>
>>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot
2025-02-13 16:41 ` Thomas Zimmermann
@ 2025-02-13 16:47 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2025-02-13 16:47 UTC (permalink / raw)
To: Thomas Zimmermann, Abel Vesa, Konrad Dybcio
Cc: Rob Clark, Sean Paul, Abhinav Kumar, Dmitry Baryshkov,
David Airlie, Simona Vetter, Marijn Suijten, linux-arm-msm,
dri-devel, freedreno, linux-kernel, Akhil P Oommen, Konrad Dybcio
On 13.02.2025 5:41 PM, Thomas Zimmermann wrote:
> Hi
>
> Am 13.02.25 um 17:35 schrieb Abel Vesa:
>> On 24-12-19 23:36:56, Konrad Dybcio wrote:
>>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>>
>>> Log the version for informational purposes, such as for keeping track
>>> of possible GMU fw-related failures in crash / CI logs.
>>>
>>> Intentionally not implemented on the if (gmu->legacy) codepath, as
>>> these registers seem not to be used on there.
>>>
>>> Downstream additionally warns if the firmware version is too old for
>>> a given GPU, but we already pair the binary to a given GPU, so let's
>>> not go there at the moment.
>>>
>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> ---
[...]
>> So maybe DRM_INFO_ONCE instead ?
>
> drm_dbg() seems appropriate. Most of the time, firmware versions are not interesting.
Unfortunately, in our case they are, given users source them from all
kinds of places..
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-13 16:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 22:36 [PATCH 0/2] Print GMU version at boot on >A630 Konrad Dybcio
2024-12-19 22:36 ` [PATCH 1/2] drm/msm: registers: Add GMU FW version register Konrad Dybcio
2024-12-19 22:36 ` [PATCH 2/2] drm/msm/a6xx: Print GMU core firmware version at boot Konrad Dybcio
2025-02-13 16:35 ` Abel Vesa
2025-02-13 16:41 ` Thomas Zimmermann
2025-02-13 16:47 ` Konrad Dybcio
2025-01-02 20:12 ` [PATCH 0/2] Print GMU version at boot on >A630 Akhil P Oommen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).