drm/amdgpu: Add fw minimum version check for usermode queue
Subsystems (2)
PATCH v2 2/2 drm/amdgpu: Add fw minimum version check for usermode queue
This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123]
v2: Addressed review comments from Alex
- Just check the firmware versions directly.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +4 -1
@@ -1418,7 +1418,10 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)case IP_VERSION (12 ,0 ,1 ):#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ /* add firmware version checks here */ -if (0 ) { +if (adev->gfx.me_fw_version >=2780 && + adev->gfx.pfp_fw_version >=2840 && + adev->gfx.mec_fw_version >=3050 && + adev->mes.fw_version[0 ] >=123 ) { adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; }
Signature · 1 line
2.34.1
Alex,
This is v2 of 2/2 patch. Please review this.
~arvind
Quoted 31 lines · Arvind Yadav
This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123]
v2: Addressed review comments from Alex
- Just check the firmware versions directly.Cc Alex Deucher <[email protected]>Cc Christian Koenig <[email protected]>Cc Shashank Sharma <[email protected]>Cc Sunil Khatri <[email protected]>Signed-off-by Arvind Yadav <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +4
-1@@ -1418,7 +1418,10 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)case IP_VERSION (12 ,0 ,1 ):#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ /* add firmware version checks here */ -if (0 ) { +if (adev->gfx.me_fw_version >=2780 && + adev->gfx.pfp_fw_version >=2840 && + adev->gfx.mec_fw_version >=3050 && + adev->mes.fw_version[0 ] >=123 ) { adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; }
[AMD Official Use Only - AMD Internal Distribution Only]
________________________________
From: Yadav, Arvind <[email protected]>
Sent: Friday, April 11, 2025 12:54 AM
To: Yadav, Arvind <[email protected]>; Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Khatri, Sunil <[email protected]>; Sharma, Shashank <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [PATCH 2/2 v2] drm/amdgpu: Add fw minimum version check for usermode queue
Alex,
This is v2 of 2/2 patch. Please review this.
~arvind
Quoted 31 lines · Arvind Yadav
This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123]
v2: Addressed review comments from Alex
- Just check the firmware versions directly.Cc Alex Deucher <[email protected]>Cc Christian Koenig <[email protected]>Cc Shashank Sharma <[email protected]>Cc Sunil Khatri <[email protected]>Signed-off-by Arvind Yadav <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +4
-1@@ -1418,7 +1418,10 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)case IP_VERSION (12 ,0 ,1 ):#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ /* add firmware version checks here */ -if (0 ) { +if (adev->gfx.me_fw_version >=2780 && + adev->gfx.pfp_fw_version >=2840 && + adev->gfx.mec_fw_version >=3050 && + adev->mes.fw_version[0 ] >=123 ) { adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; }
Series LGTM, Reviewed-by: Sunil Khatri <[email protected]>
Quoted 50 lines · Alexander
[AMD Official Use Only - AMD Internal Distribution Only]
Acked-by Alex Deucher <[email protected]>------------------------------------------------------------------------
*From:* Yadav, Arvind <[email protected]>
*Sent:* Friday, April 11, 2025 12:54 AM
*To:* Yadav, Arvind <[email protected]>; Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Khatri, Sunil <[email protected]>; Sharma, Shashank <[email protected]> *Cc:* [email protected] <[email protected]>
*Subject:* Re: [PATCH 2/2 v2] drm/amdgpu: Add fw minimum version check for usermode queue
Alex,
This is v2 of 2/2 patch. Please review this.~arvind
Quoted 11 lines · Arvind Yadav
This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123]
v2: Addressed review comments from Alex
- Just check the firmware versions directly.Cc Alex Deucher <[email protected]>Cc Christian Koenig <[email protected]>Cc Shashank Sharma <[email protected]>Cc Sunil Khatri <[email protected]>Signed-off-by Arvind Yadav <[email protected]>Review
Quoted 5 lines
---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.cdrivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_sw_init(struct
Quoted 4 lines
index
3d87e445270e..3165fdfeca6a100644drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0
-0@@ -1418,7 +1418,10 @@ static int gfx_v12_0_sw_init(struct
amdgpu_ip_block*ip_block)Quoted 11 lines
case
IP_VERSION(12, 0, 1):
#ifdefCONFIG_DRM_AMDGPU_NAVI3X_USERQ
/* add firmware version checks here */ - if (0) {
+ if (adev->gfx.me_fw_version >= 2780 && +adev->gfx.pfp_fw_version>= 2840 && +adev->gfx.mec_fw_version>= 3050 && + adev->mes.fw_version[0] >= 123) { adev->userq_funcs[AMDGPU_HW_IP_GFX] =&userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] =&userq_mes_funcs; }
Hi,
Le 11/04/2025 à 06:54, Yadav, Arvind a écrit :
Quoted 21 lines
Alex,
This is v2 of 2/2 patch. Please review this.~arvind
Quoted 15 lines · Arvind Yadav
This patch is load usermode queue based on FW support for gfx12. CP Ucode FW Vesion: [PFP = 2840, ME = 2780, MEC = 3050, MES = 123]
v2: Addressed review comments from Alex
- Just check the firmware versions directly.Cc Alex Deucher <[email protected]>Cc Christian Koenig <[email protected]>Cc Shashank Sharma <[email protected]>Cc Sunil Khatri <[email protected]>Signed-off-by Arvind Yadav <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0
-0@@ -1418,7 +1418,10 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)case
IP_VERSION(12, 0, 1):
#ifdefCONFIG_DRM_AMDGPU_NAVI3X_USERQ
/* add firmware version checks here */
This comment could be removed now that you implemented the version checks (the same remark applies to patch 1/2).
Regards,
Pierre-eric
Quoted 8 lines
Quoted 8 lines
- if (0) {
+ if (adev->gfx.me_fw_version >= 2780 &&
+adev->gfx.pfp_fw_version>= 2840 &&
+adev->gfx.mec_fw_version>= 3050 &&
+ adev->mes.fw_version[0] >= 123) { adev->userq_funcs[AMDGPU_HW_IP_GFX] =&userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] =&userq_mes_funcs; }