drm/amdgpu: return an error in the userq IOCTL when DRM_AMDGPU_NAVI3X_USERQ=n
Subsystems (2)
Alex Deucher
maintainerPATCH 1/5 drm/amdgpu: return an error in the userq IOCTL when DRM_AMDGPU_NAVI3X_USERQ=n
I'd swear this was already fixed, but I guess the patch never landed. Add it now.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c +1 -1
@@ -416,7 +416,7 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,int amdgpu_userq_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) { -return 0 ; +return -ENOTSUPP ; }#endif
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/5 drm/amdgpu/Kconfig: fix wording of DRM_AMDGPU_NAVI3X_USERQ
The feature is not navi3x specific at this point.
--- drivers/gpu/drm/amd/amdgpu/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +2 -2
@@ -96,13 +96,13 @@ config DRM_AMDGPU_WERROR Only enable this if you are warning code for amdgpu.ko. config DRM_AMDGPU_NAVI3X_USERQ - bool "Enable Navi 3x gfx usermode queues" + bool "Enable amdgpu usermode queues" depends on DRM_AMDGPU depends on BROKEN default n help Choose this option to enable GFX usermode queue support for GFX/SDMA/Compute - workload submission. This feature is experimental and supported on Navi 3X only. + workload submission. This feature is experimental and supported on GFX11+. source "drivers/gpu/drm/amd/acp/Kconfig" source "drivers/gpu/drm/amd/display/Kconfig"
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 3/5 drm/amdgpu/gfx11: fix config guard
In reply to Alex Deuchers/CONFIG_DRM_AMD_USERQ_GFX/CONFIG_DRM_AMDGPU_NAVI3X_USERQ/
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -1
@@ -1610,7 +1610,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) adev->gfx.mec.num_mec =1 ; adev->gfx.mec.num_pipe_per_mec =4 ; adev->gfx.mec.num_queue_per_pipe =4 ; -#ifdef CONFIG_DRM_AMD_USERQ_GFX +#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs;#endif
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 4/5 drm/amdgpu: add userq firmware version checks
In reply to Alex DeucherCurrently disabled until the firmwares are officially released.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 14 ++++++++++---- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 4 +++- 4 files changed, 21 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +10 -4
@@ -1594,8 +1594,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) adev->gfx.mec.num_pipe_per_mec =4 ; adev->gfx.mec.num_queue_per_pipe =4 ;#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ - adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; - adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; +/* add firmware version checks here */ +if (0 ) { + adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; + adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; + }#endif break ;case IP_VERSION (11 ,0 ,1 ):
@@ -1611,8 +1614,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) adev->gfx.mec.num_pipe_per_mec =4 ; adev->gfx.mec.num_queue_per_pipe =4 ;#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ - adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; - adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; +/* add firmware version checks here */ +if (0 ) { + adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; + adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; + }#endif break ;default :
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +5 -2
@@ -1390,8 +1390,11 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block) adev->gfx.mec.num_pipe_per_mec =2 ; adev->gfx.mec.num_queue_per_pipe =4 ;#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ - adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; - adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; +/* add firmware version checks here */ +if (0 ) { + adev->userq_funcs[AMDGPU_HW_IP_GFX ] = &userq_mes_funcs; + adev->userq_funcs[AMDGPU_HW_IP_COMPUTE ] = &userq_mes_funcs; + }#endif break ;default :
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +3 -1
@@ -1381,7 +1381,9 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)DRM_ERROR ("Failed to allocated memory for SDMA IP Dump\n" );#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ - adev->userq_funcs[AMDGPU_HW_IP_DMA ] = &userq_mes_funcs; +/* add firmware version checks here */ +if (0 ) + adev->userq_funcs[AMDGPU_HW_IP_DMA ] = &userq_mes_funcs;#endif r =amdgpu_sdma_sysfs_reset_mask_init (adev);if (r)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +3 -1
@@ -1383,7 +1383,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)DRM_ERROR ("Failed to allocated memory for SDMA IP Dump\n" );#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ - adev->userq_funcs[AMDGPU_HW_IP_DMA ] = &userq_mes_funcs; +/* add firmware version checks here */ +if (0 ) + adev->userq_funcs[AMDGPU_HW_IP_DMA ] = &userq_mes_funcs;#endif return r;
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 5/5 drm/amdgpu/userq: remove BROKEN from config
In reply to Alex DeucherThis can be enabled now. We have the firmware checks in place.
--- drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -1
@@ -98,7 +98,6 @@ config DRM_AMDGPU_WERROR config DRM_AMDGPU_NAVI3X_USERQ bool "Enable amdgpu usermode queues" depends on DRM_AMDGPU - depends on BROKEN default n help Choose this option to enable GFX usermode queue support for GFX/SDMA/Compute
Signature · 1 line
2.48.1
RE: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from config
[Public]
Question: Why use the CONFIG_DRM_AMDGPU_NAVI3X_USERQ to guard all the various GFX user mode queue enablement paths? It seems more generic and reasonable to use the config name CONFIG_DRM_AMDGPU_NAVI3X_USERQ.
Except for that question, the series patch is Reviewed-by: Prike Liang <[email protected]> .
Regards,
Prike
Quoted 31 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Saturday, March 1, 2025 3:54 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from configThis can be enabled now. We have the firmware checks in place.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/amd/amdgpu/Kconfig +0
-0@@ -98,7 +98,6 @@ config DRM_AMDGPU_WERROR config
DRM_AMDGPU_NAVI3X_USERQ
bool "Enable amdgpu usermode queues"
depends onDRM_AMDGPU
- depends on BROKEN
default n
help
Choose this option to enable GFX usermode queue support for
GFX/SDMA/Compute
--
2.48.1
Re: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from config
Quoted 5 lines · Prike
[Public]
Question: Why use the
CONFIG_DRM_AMDGPU_NAVI3X_USERQto guard all the various GFX user mode queue enablement paths? It seems more generic and reasonable to use the config nameCONFIG_DRM_AMDGPU_NAVI3X_USERQ.
I assume you mean something more generic like CONFIG_DRM_AMDGPU_USERQ?
At this point it would make more sense, but at the time it was added
there was only gfx11 support. We could change it, but at this point, I'd be more inclined to just remove it.
Quoted 1 line
Except for that question, the series patch is Reviewed-by: Prike Liang <[email protected]> .
Thanks.
Alex
Quoted 36 lines
Regards,
PrikeQuoted 31 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Saturday, March 1, 2025 3:54 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from configThis can be enabled now. We have the firmware checks in place.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/amd/amdgpu/Kconfig +0
-0@@ -98,7 +98,6 @@ config DRM_AMDGPU_WERROR config
DRM_AMDGPU_NAVI3X_USERQ
bool "Enable amdgpu usermode queues"
depends onDRM_AMDGPU
- depends on BROKEN
default n
help
Choose this option to enable GFX usermode queue support for
GFX/SDMA/Compute
--
2.48.1
RE: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from config
[Public]
Quoted 17 lines
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, March 4, 2025 12:15 AM
To: Liang, Prike <[email protected]>
Cc: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: Re: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from configQuoted 4 lines · Prike
[Public]
Question: Why use the
CONFIG_DRM_AMDGPU_NAVI3X_USERQto guard allthe various GFX user mode queue enablement paths? It seems more generic and reasonable to use the config name
CONFIG_DRM_AMDGPU_NAVI3X_USERQ.Quoted 1 line
Quoted 6 lines
I assume you mean something more generic like
CONFIG_DRM_AMDGPU_USERQ?
At this point it would make more sense, but at the time it was added there was
only gfx11 support. We could change it, but at this point, I'd be more inclined to just remove it.
Yes, it's a typo, and I mean we may need to change the userq config label to CONFIG_DRM_AMDGPU_USERQ later.
Thanks,
Prike
Quoted 43 lines
Quoted 1 line
Except for that question, the series patch is Reviewed-by: Prike Liang
Thanks.
Alex
Quoted 36 lines
Regards,
PrikeQuoted 31 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Saturday, March 1, 2025 3:54 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 5/5] drm/amdgpu/userq: remove BROKEN from configThis can be enabled now. We have the firmware checks in place.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/amd/amdgpu/Kconfig +0
-0@@ -98,7 +98,6 @@ config DRM_AMDGPU_WERROR config
DRM_AMDGPU_NAVI3X_USERQ
bool "Enable amdgpu usermode queues"
depends onDRM_AMDGPU
- depends on BROKEN
default n
help
Choose this option to enable GFX usermode queue support for
GFX/SDMA/Compute
--
2.48.1