Skip to contentSkip to conversation

Revert "drm/amdgpu: enable mcbp by default on gfx9"

PATCH In review Alex Deucher 3 participants 3 messages Jul 12, 2023 – Jul 13, 2023

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 Revert "drm/amdgpu: enable mcbp by default on gfx9"

This reverts commit 50a7c8765ca69543ffdbf855de0fd69aea769ccf.

This breaks some SQA tests on gfx9 dGPUs. Chistian also reported problems.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 -----
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -5
index bbe4ea93db611..3673015a7f93a 100644
@@ -3699,11 +3699,6 @@ static void amdgpu_device_set_mcbp(struct amdgpu_device *adev)
 	if (amdgpu_mcbp == 1)
 		adev->gfx.mcbp = true;
 
-	if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 0, 0)) &&
-	    (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 0, 0)) &&
-	    adev->gfx.num_gfx_rings)
-		adev->gfx.mcbp = true;
-
 	if (amdgpu_sriov_vf(adev))
 		adev->gfx.mcbp = true;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -3
index 33e370d998a87..f829a80e52924 100644
@@ -180,7 +180,7 @@ uint amdgpu_dc_feature_mask = 2;
 uint amdgpu_dc_debug_mask;
 uint amdgpu_dc_visual_confirm;
 int amdgpu_async_gfx_ring = 1;
-int amdgpu_mcbp = -1;
+int amdgpu_mcbp;
 int amdgpu_discovery = -1;
 int amdgpu_mes;
 int amdgpu_mes_kiq;
@@ -635,10 +635,10 @@ module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
 
 /**
  * DOC: mcbp (int)
- * It is used to enable mid command buffer preemption. (0 = disabled, 1 = enabled, -1 auto (default))
+ * It is used to enable mid command buffer preemption. (0 = disabled (default), 1 = enabled)
  */
 MODULE_PARM_DESC(mcbp,
-	"Enable Mid-command buffer preemption (0 = disabled, 1 = enabled), -1 = auto (default)");
+	"Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
 module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 
 /**
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Thanks,
Candice

-----Original Message-----
From: Deucher, Alexander <[email protected]>
Sent: Thursday, July 13, 2023 2:47 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Li, Candice <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu: enable mcbp by default on gfx9"

This reverts commit 50a7c8765ca69543ffdbf855de0fd69aea769ccf.

This breaks some SQA tests on gfx9 dGPUs. Chistian also reported problems.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 -----
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -5
index bbe4ea93db611..3673015a7f93a 100644
@@ -3699,11 +3699,6 @@ static void amdgpu_device_set_mcbp(struct amdgpu_device *adev)
        if (amdgpu_mcbp == 1)
                adev->gfx.mcbp = true;
 
-       if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 0, 0)) &&
-           (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 0, 0)) &&
-           adev->gfx.num_gfx_rings)
-               adev->gfx.mcbp = true;
-
        if (amdgpu_sriov_vf(adev))
                adev->gfx.mcbp = true;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -3
index 33e370d998a87..f829a80e52924 100644
@@ -180,7 +180,7 @@ uint amdgpu_dc_feature_mask = 2;
 uint amdgpu_dc_debug_mask;
 uint amdgpu_dc_visual_confirm;
 int amdgpu_async_gfx_ring = 1;
-int amdgpu_mcbp = -1;
+int amdgpu_mcbp;
 int amdgpu_discovery = -1;
 int amdgpu_mes;
 int amdgpu_mes_kiq;
@@ -635,10 +635,10 @@ module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
 
 /**
  * DOC: mcbp (int)
- * It is used to enable mid command buffer preemption. (0 = disabled, 1 = enabled, -1 auto (default))
+ * It is used to enable mid command buffer preemption. (0 = disabled (default), 1 = enabled)
  */
 MODULE_PARM_DESC(mcbp,
-       "Enable Mid-command buffer preemption (0 = disabled, 1 = enabled), -1 = auto (default)");
+       "Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
 module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 
 /**

--
2.41.0

#2 lore raw
In reply to Alex Deucher
Quoted 5 lines · Alex Deucher

This reverts commit 50a7c8765ca69543ffdbf855de0fd69aea769ccf.

This breaks some SQA tests on gfx9 dGPUs. Chistian also reported problems.

Apparently this is a bug in mesa which this change uncovered:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24082/diffs

Alex

Quoted 53 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 -----
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -5
index bbe4ea93db611..3673015a7f93a 100644
@@ -3699,11 +3699,6 @@ static void amdgpu_device_set_mcbp(struct amdgpu_device *adev)
        if (amdgpu_mcbp == 1)
                adev->gfx.mcbp = true;
 
-       if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 0, 0)) &&
-           (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 0, 0)) &&
-           adev->gfx.num_gfx_rings)
-               adev->gfx.mcbp = true;
-
        if (amdgpu_sriov_vf(adev))
                adev->gfx.mcbp = true;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -4
index 33e370d998a87..f829a80e52924 100644
@@ -180,7 +180,7 @@ uint amdgpu_dc_feature_mask = 2;
 uint amdgpu_dc_debug_mask;
 uint amdgpu_dc_visual_confirm;
 int amdgpu_async_gfx_ring = 1;
-int amdgpu_mcbp = -1;
+int amdgpu_mcbp;
 int amdgpu_discovery = -1;
 int amdgpu_mes;
 int amdgpu_mes_kiq;
@@ -635,10 +635,10 @@ module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
 
 /**
  * DOC: mcbp (int)
- * It is used to enable mid command buffer preemption. (0 = disabled, 1 = enabled, -1 auto (default))
+ * It is used to enable mid command buffer preemption. (0 = disabled (default), 1 = enabled)
  */
 MODULE_PARM_DESC(mcbp,
-       "Enable Mid-command buffer preemption (0 = disabled, 1 = enabled), -1 = auto (default)");
+       "Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
 module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 
 /**
--

2.41.0