Skip to contentSkip to conversation

drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

PATCH In review Arvind Yadav 4 participants 4 messages Apr 23, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amdgpu: remove DRM_AMDGPU_NAVI3X_USERQ config for UQ

DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue.

v2: rebase.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Sunil Khatri <[email protected]>
Cc Arunpravin Paneer Selvam <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/Kconfig             |  8 --------
 drivers/gpu/drm/amd/amdgpu/Makefile            |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c     |  7 +------
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c        |  5 +----
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c      |  8 --------
 .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c    | 18 ------------------
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c         |  4 ----
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c         |  2 --
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c         |  3 +--
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c         |  3 ---
 10 files changed, 4 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -8
index 7b95221d2f3d..1a11cab741ac 100644
@@ -96,14 +96,6 @@ config DRM_AMDGPU_WERROR
 	  Add -Werror to the build flags for amdgpu.ko.
 	  Only enable this if you are warning code for amdgpu.ko.
 
-config DRM_AMDGPU_NAVI3X_USERQ
-	bool "Enable amdgpu usermode queues"
-	depends on DRM_AMDGPU
-	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 GFX11+.
-
 source "drivers/gpu/drm/amd/acp/Kconfig"
 source "drivers/gpu/drm/amd/display/Kconfig"
 source "drivers/gpu/drm/amd/amdkfd/Kconfig"
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 8595e05c691b..87080c06e5fc 100644
@@ -177,7 +177,7 @@ amdgpu-y += \
 	mes_v12_0.o \
 
 # add GFX userqueue support
-amdgpu-$(CONFIG_DRM_AMDGPU_NAVI3X_USERQ) += mes_userqueue.o
+amdgpu-y += mes_userqueue.o
 
 # add UVD block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -6
index b96e0613ea7e..fe68ba9997ae 100644
@@ -3513,9 +3513,7 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
 	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
 	amdgpu_amdkfd_suspend(adev, false);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 	amdgpu_userq_suspend(adev);
-#endif
 
 	/* Workaround for ASICs need to disable SMC first */
 	amdgpu_device_smu_fini_early(adev);
@@ -5086,9 +5084,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
 
 	if (!adev->in_s0ix) {
 		amdgpu_amdkfd_suspend(adev, adev->in_runpm);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		amdgpu_userq_suspend(adev);
-#endif
 	}
 
 	r = amdgpu_device_evict_resources(adev);
@@ -5156,11 +5152,10 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
 		r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
 		if (r)
 			goto exit;
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
 		r = amdgpu_userq_resume(adev);
 		if (r)
 			goto exit;
-#endif
 	}
 
 	r = amdgpu_device_ip_late_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -4
index cb9ffb17ab98..cc5d6250ac69 100644
@@ -1980,9 +1980,7 @@ static void amdgpu_gfx_kfd_sch_ctrl(struct amdgpu_device *adev, u32 idx,
 		if (adev->gfx.userq_sch_req_count[idx] == 0) {
 			cancel_delayed_work_sync(&adev->gfx.enforce_isolation[idx].work);
 			if (!adev->gfx.userq_sch_inactive[idx]) {
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 				amdgpu_userq_stop_sched_for_enforce_isolation(adev, idx);
-#endif
 				if (adev->kfd.init_complete)
 					amdgpu_amdkfd_stop_sched(adev, idx);
 				adev->gfx.userq_sch_inactive[idx] = true;
@@ -2040,9 +2038,8 @@ void amdgpu_gfx_enforce_isolation_handler(struct work_struct *work)
 		/* Tell KFD to resume the runqueue */
 		WARN_ON_ONCE(!adev->gfx.userq_sch_inactive[idx]);
 		WARN_ON_ONCE(adev->gfx.userq_sch_req_count[idx]);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
 		amdgpu_userq_start_sched_for_enforce_isolation(adev, idx);
-#endif
 		if (adev->kfd.init_complete)
 			amdgpu_amdkfd_start_sched(adev, idx);
 		adev->gfx.userq_sch_inactive[idx] = false;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -8
index b0e8098a3988..451890ee3fb7 100644
@@ -129,7 +129,6 @@ amdgpu_userq_active(struct amdgpu_userq_mgr *uq_mgr)
 	return ret;
 }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 static struct amdgpu_usermode_queue *
 amdgpu_userq_find(struct amdgpu_userq_mgr *uq_mgr, int qid)
 {
@@ -520,13 +519,6 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
 
 	return r;
 }
-#else
-int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
-		       struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
 
 static int
 amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0 -18
index be068e8e37d1..3288c2ff692e 100644
@@ -216,7 +216,6 @@ void amdgpu_userq_fence_driver_put(struct amdgpu_userq_fence_driver *fence_drv)
 	kref_put(&fence_drv->refcount, amdgpu_userq_fence_driver_destroy);
 }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 static int amdgpu_userq_fence_alloc(struct amdgpu_userq_fence **userq_fence)
 {
 	*userq_fence = kmem_cache_alloc(amdgpu_userq_fence_slab, GFP_ATOMIC);
@@ -288,7 +287,6 @@ static int amdgpu_userq_fence_create(struct amdgpu_usermode_queue *userq,
 
 	return 0;
 }
-#endif
 
 static const char *amdgpu_userq_fence_get_driver_name(struct dma_fence *f)
 {
@@ -343,7 +341,6 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {
 	.release = amdgpu_userq_fence_release,
 };
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 /**
  * amdgpu_userq_fence_read_wptr - Read the userq wptr value
  *
@@ -594,15 +591,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
 
 	return r;
 }
-#else
-int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
-			      struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
 			    struct drm_file *filp)
 {
@@ -968,10 +957,3 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
 
 	return r;
 }
-#else
-int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
-			    struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -4
index ac7ac58e25a6..519b82f77cff 100644
@@ -1630,7 +1630,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 0, 0):
 	case IP_VERSION(11, 0, 2):
 	case IP_VERSION(11, 0, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		if (!adev->gfx.disable_uq &&
 		    adev->gfx.me_fw_version  >= 2390 &&
 		    adev->gfx.pfp_fw_version >= 2530 &&
@@ -1639,7 +1638,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 			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):
 	case IP_VERSION(11, 0, 4):
@@ -1647,13 +1645,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 1):
 	case IP_VERSION(11, 5, 2):
 	case IP_VERSION(11, 5, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		/* add firmware version checks here */
 		if (0 && !adev->gfx.disable_uq) {
 			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
 			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
 		}
-#endif
 		break;
 	default:
 		break;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0 -2
index dfa0830a4eb1..f09d96bfee16 100644
@@ -1416,7 +1416,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
 	switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
 	case IP_VERSION(12, 0, 0):
 	case IP_VERSION(12, 0, 1):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		if (!adev->gfx.disable_uq &&
 		    adev->gfx.me_fw_version  >= 2780 &&
 		    adev->gfx.pfp_fw_version >= 2840 &&
@@ -1425,7 +1424,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
 			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
 			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
 		}
-#endif
 		break;
 	default:
 		break;
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -2
index 6bb36187a53d..da5b5d64f137 100644
@@ -1363,11 +1363,10 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
 	else
 		DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 	/* add firmware version checks here */
 	if (0 && !adev->sdma.disable_uq)
 		adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
+
 	r = amdgpu_sdma_sysfs_reset_mask_init(adev);
 	if (r)
 		return r;
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +0 -3
index 943c6446a0a7..befe013b11a7 100644
@@ -1338,12 +1338,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
 	else
 		DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 	/* add firmware version checks here */
 	if (0 && !adev->sdma.disable_uq)
 		adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
-
 
 	return r;
 }
Signature · 1 line
2.34.1
#1 lore raw

LGTM, Reviewed-by: Sunil Khatri <[email protected]>

I think you should also get an acknowledgement from Alex too before pushing to ASDN.

Regards
Sunil khatri

Quoted 286 lines · Arvind Yadav

DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue.

v2: rebase.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Sunil Khatri <[email protected]>
Cc Arunpravin Paneer Selvam <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/Kconfig             |  8 --------
  drivers/gpu/drm/amd/amdgpu/Makefile            |  2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c     |  7 +------
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c        |  5 +----
  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c      |  8 --------
  .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c    | 18 ------------------
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c         |  4 ----
  drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c         |  2 --
  drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c         |  3 +--
  drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c         |  3 ---
  10 files changed, 4 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -8
index 7b95221d2f3d..1a11cab741ac 100644
@@ -96,14 +96,6 @@ config DRM_AMDGPU_WERROR
  	  Add -Werror to the build flags for amdgpu.ko.
  	  Only enable this if you are warning code for amdgpu.ko.
 
-config DRM_AMDGPU_NAVI3X_USERQ
-	bool "Enable amdgpu usermode queues"
-	depends on DRM_AMDGPU
-	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 GFX11+.
-
  source "drivers/gpu/drm/amd/acp/Kconfig"
  source "drivers/gpu/drm/amd/display/Kconfig"
  source "drivers/gpu/drm/amd/amdkfd/Kconfig"
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 8595e05c691b..87080c06e5fc 100644
@@ -177,7 +177,7 @@ amdgpu-y += \
  	mes_v12_0.o \
 
  # add GFX userqueue support
-amdgpu-$(CONFIG_DRM_AMDGPU_NAVI3X_USERQ) += mes_userqueue.o
+amdgpu-y += mes_userqueue.o
 
  # add UVD block
  amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -6
index b96e0613ea7e..fe68ba9997ae 100644
@@ -3513,9 +3513,7 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
  	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
  	amdgpu_amdkfd_suspend(adev, false);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  	amdgpu_userq_suspend(adev);
-#endif
 
  	/* Workaround for ASICs need to disable SMC first */
  	amdgpu_device_smu_fini_early(adev);
@@ -5086,9 +5084,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
 
  	if (!adev->in_s0ix) {
  		amdgpu_amdkfd_suspend(adev, adev->in_runpm);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  		amdgpu_userq_suspend(adev);
-#endif
  	}
 
  	r = amdgpu_device_evict_resources(adev);
@@ -5156,11 +5152,10 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
  		r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
  		if (r)
  			goto exit;
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
  		r = amdgpu_userq_resume(adev);
  		if (r)
  			goto exit;
-#endif
  	}
 
  	r = amdgpu_device_ip_late_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -4
index cb9ffb17ab98..cc5d6250ac69 100644
@@ -1980,9 +1980,7 @@ static void amdgpu_gfx_kfd_sch_ctrl(struct amdgpu_device *adev, u32 idx,
  		if (adev->gfx.userq_sch_req_count[idx] == 0) {
  			cancel_delayed_work_sync(&adev->gfx.enforce_isolation[idx].work);
  			if (!adev->gfx.userq_sch_inactive[idx]) {
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  				amdgpu_userq_stop_sched_for_enforce_isolation(adev, idx);
-#endif
  				if (adev->kfd.init_complete)
  					amdgpu_amdkfd_stop_sched(adev, idx);
  				adev->gfx.userq_sch_inactive[idx] = true;
@@ -2040,9 +2038,8 @@ void amdgpu_gfx_enforce_isolation_handler(struct work_struct *work)
  		/* Tell KFD to resume the runqueue */
  		WARN_ON_ONCE(!adev->gfx.userq_sch_inactive[idx]);
  		WARN_ON_ONCE(adev->gfx.userq_sch_req_count[idx]);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
  		amdgpu_userq_start_sched_for_enforce_isolation(adev, idx);
-#endif
  		if (adev->kfd.init_complete)
  			amdgpu_amdkfd_start_sched(adev, idx);
  		adev->gfx.userq_sch_inactive[idx] = false;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -8
index b0e8098a3988..451890ee3fb7 100644
@@ -129,7 +129,6 @@ amdgpu_userq_active(struct amdgpu_userq_mgr *uq_mgr)
  	return ret;
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static struct amdgpu_usermode_queue *
  amdgpu_userq_find(struct amdgpu_userq_mgr *uq_mgr, int qid)
  {
@@ -520,13 +519,6 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
 
  	return r;
  }
-#else
-int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
-		       struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
 
  static int
  amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0 -18
index be068e8e37d1..3288c2ff692e 100644
@@ -216,7 +216,6 @@ void amdgpu_userq_fence_driver_put(struct amdgpu_userq_fence_driver *fence_drv)
  	kref_put(&fence_drv->refcount, amdgpu_userq_fence_driver_destroy);
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static int amdgpu_userq_fence_alloc(struct amdgpu_userq_fence **userq_fence)
  {
  	*userq_fence = kmem_cache_alloc(amdgpu_userq_fence_slab, GFP_ATOMIC);
@@ -288,7 +287,6 @@ static int amdgpu_userq_fence_create(struct amdgpu_usermode_queue *userq,
 
  	return 0;
  }
-#endif
 
  static const char *amdgpu_userq_fence_get_driver_name(struct dma_fence *f)
  {
@@ -343,7 +341,6 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {
  	.release = amdgpu_userq_fence_release,
  };
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  /**
   * amdgpu_userq_fence_read_wptr - Read the userq wptr value
   *
@@ -594,15 +591,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
 
  	return r;
  }
-#else
-int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
-			      struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
  			    struct drm_file *filp)
  {
@@ -968,10 +957,3 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
 
  	return r;
  }
-#else
-int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
-			    struct drm_file *filp)
-{
-	return -ENOTSUPP;
-}
-#endif
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -4
index ac7ac58e25a6..519b82f77cff 100644
@@ -1630,7 +1630,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 0, 0):
  	case IP_VERSION(11, 0, 2):
  	case IP_VERSION(11, 0, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  		if (!adev->gfx.disable_uq &&
  		    adev->gfx.me_fw_version  >= 2390 &&
  		    adev->gfx.pfp_fw_version >= 2530 &&
@@ -1639,7 +1638,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  			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):
  	case IP_VERSION(11, 0, 4):
@@ -1647,13 +1645,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 5, 1):
  	case IP_VERSION(11, 5, 2):
  	case IP_VERSION(11, 5, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  		/* add firmware version checks here */
  		if (0 && !adev->gfx.disable_uq) {
  			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
  			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
  		}
-#endif
  		break;
  	default:
  		break;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0 -2
index dfa0830a4eb1..f09d96bfee16 100644
@@ -1416,7 +1416,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
  	switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
  	case IP_VERSION(12, 0, 0):
  	case IP_VERSION(12, 0, 1):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  		if (!adev->gfx.disable_uq &&
  		    adev->gfx.me_fw_version  >= 2780 &&
  		    adev->gfx.pfp_fw_version >= 2840 &&
@@ -1425,7 +1424,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
  			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
  			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
  		}
-#endif
  		break;
  	default:
  		break;
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -2
index 6bb36187a53d..da5b5d64f137 100644
@@ -1363,11 +1363,10 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
  	else
  		DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  	/* add firmware version checks here */
  	if (0 && !adev->sdma.disable_uq)
  		adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
+
  	r = amdgpu_sdma_sysfs_reset_mask_init(adev);
  	if (r)
  		return r;
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +0 -3
index 943c6446a0a7..befe013b11a7 100644
@@ -1338,12 +1338,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
  	else
  		DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  	/* add firmware version checks here */
  	if (0 && !adev->sdma.disable_uq)
  		adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
-
 
  	return r;
  }
Reviewed-by
#2 lore raw
Quoted 5 lines · Sunil

LGTM, Reviewed-by: Sunil Khatri <[email protected]>

I think you should also get an acknowledgement from Alex too before pushing to ASDN.

Please go ahead.

Quoted 291 lines

Regards
Sunil khatri

Quoted 286 lines · Arvind Yadav

DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue.

v2: rebase.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Sunil Khatri <[email protected]>
Cc Arunpravin Paneer Selvam <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/Kconfig             |  8 --------
  drivers/gpu/drm/amd/amdgpu/Makefile            |  2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c     |  7 +------
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c        |  5 +----
  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c      |  8 --------
  .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c    | 18 ------------------
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c         |  4 ----
  drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c         |  2 --
  drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c         |  3 +--
  drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c         |  3 ---
  10 files changed, 4 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -8
index 7b95221d2f3d..1a11cab741ac 100644
@@ -96,14 +96,6 @@ config DRM_AMDGPU_WERROR
        Add -Werror to the build flags for amdgpu.ko.
        Only enable this if you are warning code for amdgpu.ko.
 
-config DRM_AMDGPU_NAVI3X_USERQ
-     bool "Enable amdgpu usermode queues"
-     depends on DRM_AMDGPU
-     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 GFX11+.
-
  source "drivers/gpu/drm/amd/acp/Kconfig"
  source "drivers/gpu/drm/amd/display/Kconfig"
  source "drivers/gpu/drm/amd/amdkfd/Kconfig"
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 8595e05c691b..87080c06e5fc 100644
@@ -177,7 +177,7 @@ amdgpu-y += \
      mes_v12_0.o \
 
  # add GFX userqueue support
-amdgpu-$(CONFIG_DRM_AMDGPU_NAVI3X_USERQ) += mes_userqueue.o
+amdgpu-y += mes_userqueue.o
 
  # add UVD block
  amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -6
index b96e0613ea7e..fe68ba9997ae 100644
@@ -3513,9 +3513,7 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
      amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
      amdgpu_amdkfd_suspend(adev, false);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      amdgpu_userq_suspend(adev);
-#endif
 
      /* Workaround for ASICs need to disable SMC first */
      amdgpu_device_smu_fini_early(adev);
@@ -5086,9 +5084,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
 
      if (!adev->in_s0ix) {
              amdgpu_amdkfd_suspend(adev, adev->in_runpm);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              amdgpu_userq_suspend(adev);
-#endif
      }
 
      r = amdgpu_device_evict_resources(adev);
@@ -5156,11 +5152,10 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
              r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
              if (r)
                      goto exit;
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
              r = amdgpu_userq_resume(adev);
              if (r)
                      goto exit;
-#endif
      }
 
      r = amdgpu_device_ip_late_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -4
index cb9ffb17ab98..cc5d6250ac69 100644
@@ -1980,9 +1980,7 @@ static void amdgpu_gfx_kfd_sch_ctrl(struct amdgpu_device *adev, u32 idx,
              if (adev->gfx.userq_sch_req_count[idx] == 0) {
                      cancel_delayed_work_sync(&adev->gfx.enforce_isolation[idx].work);
                      if (!adev->gfx.userq_sch_inactive[idx]) {
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                              amdgpu_userq_stop_sched_for_enforce_isolation(adev, idx);
-#endif
                              if (adev->kfd.init_complete)
                                      amdgpu_amdkfd_stop_sched(adev, idx);
                              adev->gfx.userq_sch_inactive[idx] = true;
@@ -2040,9 +2038,8 @@ void amdgpu_gfx_enforce_isolation_handler(struct work_struct *work)
              /* Tell KFD to resume the runqueue */
              WARN_ON_ONCE(!adev->gfx.userq_sch_inactive[idx]);
              WARN_ON_ONCE(adev->gfx.userq_sch_req_count[idx]);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
              amdgpu_userq_start_sched_for_enforce_isolation(adev, idx);
-#endif
              if (adev->kfd.init_complete)
                      amdgpu_amdkfd_start_sched(adev, idx);
              adev->gfx.userq_sch_inactive[idx] = false;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -8
index b0e8098a3988..451890ee3fb7 100644
@@ -129,7 +129,6 @@ amdgpu_userq_active(struct amdgpu_userq_mgr *uq_mgr)
      return ret;
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static struct amdgpu_usermode_queue *
  amdgpu_userq_find(struct amdgpu_userq_mgr *uq_mgr, int qid)
  {
@@ -520,13 +519,6 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
-                    struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
 
  static int
  amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0 -18
index be068e8e37d1..3288c2ff692e 100644
@@ -216,7 +216,6 @@ void amdgpu_userq_fence_driver_put(struct amdgpu_userq_fence_driver *fence_drv)
      kref_put(&fence_drv->refcount, amdgpu_userq_fence_driver_destroy);
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static int amdgpu_userq_fence_alloc(struct amdgpu_userq_fence **userq_fence)
  {
      *userq_fence = kmem_cache_alloc(amdgpu_userq_fence_slab, GFP_ATOMIC);
@@ -288,7 +287,6 @@ static int amdgpu_userq_fence_create(struct amdgpu_usermode_queue *userq,
 
      return 0;
  }
-#endif
 
  static const char *amdgpu_userq_fence_get_driver_name(struct dma_fence *f)
  {
@@ -343,7 +341,6 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {
      .release = amdgpu_userq_fence_release,
  };
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  /**
   * amdgpu_userq_fence_read_wptr - Read the userq wptr value
   *
@@ -594,15 +591,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
-                           struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
                          struct drm_file *filp)
  {
@@ -968,10 +957,3 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
-                         struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -4
index ac7ac58e25a6..519b82f77cff 100644
@@ -1630,7 +1630,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
      case IP_VERSION(11, 0, 0):
      case IP_VERSION(11, 0, 2):
      case IP_VERSION(11, 0, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              if (!adev->gfx.disable_uq &&
                  adev->gfx.me_fw_version  >= 2390 &&
                  adev->gfx.pfp_fw_version >= 2530 &&
@@ -1639,7 +1638,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
                      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):
      case IP_VERSION(11, 0, 4):
@@ -1647,13 +1645,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
      case IP_VERSION(11, 5, 1):
      case IP_VERSION(11, 5, 2):
      case IP_VERSION(11, 5, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              /* add firmware version checks here */
              if (0 && !adev->gfx.disable_uq) {
                      adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                      adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
              }
-#endif
              break;
      default:
              break;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0 -2
index dfa0830a4eb1..f09d96bfee16 100644
@@ -1416,7 +1416,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
      switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
      case IP_VERSION(12, 0, 0):
      case IP_VERSION(12, 0, 1):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              if (!adev->gfx.disable_uq &&
                  adev->gfx.me_fw_version  >= 2780 &&
                  adev->gfx.pfp_fw_version >= 2840 &&
@@ -1425,7 +1424,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
                      adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                      adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
              }
-#endif
              break;
      default:
              break;
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -2
index 6bb36187a53d..da5b5d64f137 100644
@@ -1363,11 +1363,10 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
      else
              DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      /* add firmware version checks here */
      if (0 && !adev->sdma.disable_uq)
              adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
+
      r = amdgpu_sdma_sysfs_reset_mask_init(adev);
      if (r)
              return r;
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +0 -3
index 943c6446a0a7..befe013b11a7 100644
@@ -1338,12 +1338,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
      else
              DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      /* add firmware version checks here */
      if (0 && !adev->sdma.disable_uq)
              adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
-
 
      return r;
  }
maintainer
#3 lore raw
Quoted 10 lines · Alex Deucher
Quoted 5 lines · Sunil

LGTM, Reviewed-by: Sunil Khatri <[email protected]>

I think you should also get an acknowledgement from Alex too before pushing to ASDN.

Please go ahead.

Feel free to add Reviewed-by: Christian König <[email protected]> as well.

Christian.

Quoted 292 lines
Quoted 292 lines

Regards
Sunil khatri

Quoted 286 lines · Arvind Yadav

DRM_AMDGPU_NAVI3X_USERQ config support is not required for usermode queue.

v2: rebase.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Sunil Khatri <[email protected]>
Cc Arunpravin Paneer Selvam <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/Kconfig             |  8 --------
  drivers/gpu/drm/amd/amdgpu/Makefile            |  2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c     |  7 +------
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c        |  5 +----
  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c      |  8 --------
  .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c    | 18 ------------------
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c         |  4 ----
  drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c         |  2 --
  drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c         |  3 +--
  drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c         |  3 ---
  10 files changed, 4 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -8
index 7b95221d2f3d..1a11cab741ac 100644
@@ -96,14 +96,6 @@ config DRM_AMDGPU_WERROR
        Add -Werror to the build flags for amdgpu.ko.
        Only enable this if you are warning code for amdgpu.ko.
 
-config DRM_AMDGPU_NAVI3X_USERQ
-     bool "Enable amdgpu usermode queues"
-     depends on DRM_AMDGPU
-     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 GFX11+.
-
  source "drivers/gpu/drm/amd/acp/Kconfig"
  source "drivers/gpu/drm/amd/display/Kconfig"
  source "drivers/gpu/drm/amd/amdkfd/Kconfig"
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 8595e05c691b..87080c06e5fc 100644
@@ -177,7 +177,7 @@ amdgpu-y += \
      mes_v12_0.o \
 
  # add GFX userqueue support
-amdgpu-$(CONFIG_DRM_AMDGPU_NAVI3X_USERQ) += mes_userqueue.o
+amdgpu-y += mes_userqueue.o
 
  # add UVD block
  amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -6
index b96e0613ea7e..fe68ba9997ae 100644
@@ -3513,9 +3513,7 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
      amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
      amdgpu_amdkfd_suspend(adev, false);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      amdgpu_userq_suspend(adev);
-#endif
 
      /* Workaround for ASICs need to disable SMC first */
      amdgpu_device_smu_fini_early(adev);
@@ -5086,9 +5084,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
 
      if (!adev->in_s0ix) {
              amdgpu_amdkfd_suspend(adev, adev->in_runpm);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              amdgpu_userq_suspend(adev);
-#endif
      }
 
      r = amdgpu_device_evict_resources(adev);
@@ -5156,11 +5152,10 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
              r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
              if (r)
                      goto exit;
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
              r = amdgpu_userq_resume(adev);
              if (r)
                      goto exit;
-#endif
      }
 
      r = amdgpu_device_ip_late_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -4
index cb9ffb17ab98..cc5d6250ac69 100644
@@ -1980,9 +1980,7 @@ static void amdgpu_gfx_kfd_sch_ctrl(struct amdgpu_device *adev, u32 idx,
              if (adev->gfx.userq_sch_req_count[idx] == 0) {
                      cancel_delayed_work_sync(&adev->gfx.enforce_isolation[idx].work);
                      if (!adev->gfx.userq_sch_inactive[idx]) {
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                              amdgpu_userq_stop_sched_for_enforce_isolation(adev, idx);
-#endif
                              if (adev->kfd.init_complete)
                                      amdgpu_amdkfd_stop_sched(adev, idx);
                              adev->gfx.userq_sch_inactive[idx] = true;
@@ -2040,9 +2038,8 @@ void amdgpu_gfx_enforce_isolation_handler(struct work_struct *work)
              /* Tell KFD to resume the runqueue */
              WARN_ON_ONCE(!adev->gfx.userq_sch_inactive[idx]);
              WARN_ON_ONCE(adev->gfx.userq_sch_req_count[idx]);
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
+
              amdgpu_userq_start_sched_for_enforce_isolation(adev, idx);
-#endif
              if (adev->kfd.init_complete)
                      amdgpu_amdkfd_start_sched(adev, idx);
              adev->gfx.userq_sch_inactive[idx] = false;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -8
index b0e8098a3988..451890ee3fb7 100644
@@ -129,7 +129,6 @@ amdgpu_userq_active(struct amdgpu_userq_mgr *uq_mgr)
      return ret;
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static struct amdgpu_usermode_queue *
  amdgpu_userq_find(struct amdgpu_userq_mgr *uq_mgr, int qid)
  {
@@ -520,13 +519,6 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
-                    struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
 
  static int
  amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +0 -18
index be068e8e37d1..3288c2ff692e 100644
@@ -216,7 +216,6 @@ void amdgpu_userq_fence_driver_put(struct amdgpu_userq_fence_driver *fence_drv)
      kref_put(&fence_drv->refcount, amdgpu_userq_fence_driver_destroy);
  }
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  static int amdgpu_userq_fence_alloc(struct amdgpu_userq_fence **userq_fence)
  {
      *userq_fence = kmem_cache_alloc(amdgpu_userq_fence_slab, GFP_ATOMIC);
@@ -288,7 +287,6 @@ static int amdgpu_userq_fence_create(struct amdgpu_usermode_queue *userq,
 
      return 0;
  }
-#endif
 
  static const char *amdgpu_userq_fence_get_driver_name(struct dma_fence *f)
  {
@@ -343,7 +341,6 @@ static const struct dma_fence_ops amdgpu_userq_fence_ops = {
      .release = amdgpu_userq_fence_release,
  };
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  /**
   * amdgpu_userq_fence_read_wptr - Read the userq wptr value
   *
@@ -594,15 +591,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
-                           struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
  int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
                          struct drm_file *filp)
  {
@@ -968,10 +957,3 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
 
      return r;
  }
-#else
-int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
-                         struct drm_file *filp)
-{
-     return -ENOTSUPP;
-}
-#endif
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -4
index ac7ac58e25a6..519b82f77cff 100644
@@ -1630,7 +1630,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
      case IP_VERSION(11, 0, 0):
      case IP_VERSION(11, 0, 2):
      case IP_VERSION(11, 0, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              if (!adev->gfx.disable_uq &&
                  adev->gfx.me_fw_version  >= 2390 &&
                  adev->gfx.pfp_fw_version >= 2530 &&
@@ -1639,7 +1638,6 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
                      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):
      case IP_VERSION(11, 0, 4):
@@ -1647,13 +1645,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
      case IP_VERSION(11, 5, 1):
      case IP_VERSION(11, 5, 2):
      case IP_VERSION(11, 5, 3):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              /* add firmware version checks here */
              if (0 && !adev->gfx.disable_uq) {
                      adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                      adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
              }
-#endif
              break;
      default:
              break;
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0 -2
index dfa0830a4eb1..f09d96bfee16 100644
@@ -1416,7 +1416,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
      switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
      case IP_VERSION(12, 0, 0):
      case IP_VERSION(12, 0, 1):
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
              if (!adev->gfx.disable_uq &&
                  adev->gfx.me_fw_version  >= 2780 &&
                  adev->gfx.pfp_fw_version >= 2840 &&
@@ -1425,7 +1424,6 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
                      adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                      adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
              }
-#endif
              break;
      default:
              break;
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -2
index 6bb36187a53d..da5b5d64f137 100644
@@ -1363,11 +1363,10 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
      else
              DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      /* add firmware version checks here */
      if (0 && !adev->sdma.disable_uq)
              adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
+
      r = amdgpu_sdma_sysfs_reset_mask_init(adev);
      if (r)
              return r;
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +0 -3
index 943c6446a0a7..befe013b11a7 100644
@@ -1338,12 +1338,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
      else
              DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n");
 
-#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
      /* add firmware version checks here */
      if (0 && !adev->sdma.disable_uq)
              adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
-#endif
-
 
      return r;
  }