Skip to content

Commit 50a7c87

Browse files
committed
drm/amdgpu: enable mcbp by default on gfx9
It's required for high priority queues. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2535 Reviewed-and-tested-by: Jiadong Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 02ff519 commit 50a7c87

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3678,6 +3678,11 @@ static void amdgpu_device_set_mcbp(struct amdgpu_device *adev)
36783678
if (amdgpu_mcbp == 1)
36793679
adev->gfx.mcbp = true;
36803680

3681+
if ((adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 0, 0)) &&
3682+
(adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 0, 0)) &&
3683+
adev->gfx.num_gfx_rings)
3684+
adev->gfx.mcbp = true;
3685+
36813686
if (amdgpu_sriov_vf(adev))
36823687
adev->gfx.mcbp = true;
36833688

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ uint amdgpu_dc_feature_mask = 2;
180180
uint amdgpu_dc_debug_mask;
181181
uint amdgpu_dc_visual_confirm;
182182
int amdgpu_async_gfx_ring = 1;
183-
int amdgpu_mcbp;
183+
int amdgpu_mcbp = -1;
184184
int amdgpu_discovery = -1;
185185
int amdgpu_mes;
186186
int amdgpu_mes_kiq;
@@ -634,10 +634,10 @@ module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
634634

635635
/**
636636
* DOC: mcbp (int)
637-
* It is used to enable mid command buffer preemption. (0 = disabled (default), 1 = enabled)
637+
* It is used to enable mid command buffer preemption. (0 = disabled, 1 = enabled, -1 auto (default))
638638
*/
639639
MODULE_PARM_DESC(mcbp,
640-
"Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
640+
"Enable Mid-command buffer preemption (0 = disabled, 1 = enabled), -1 = auto (default)");
641641
module_param_named(mcbp, amdgpu_mcbp, int, 0444);
642642

643643
/**

0 commit comments

Comments
 (0)