aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-04-14 17:11:10 +0000
committerAlex Deucher <[email protected]>2025-04-21 14:56:11 +0000
commit8f23a97907d92e16d34d4a2a9dc793398afa34a6 (patch)
tree394930f49ed25b13fcbbbae5b4ceae1703823284 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentdrm/amdgpu: rename enforce isolation variables (diff)
downloadkernel-8f23a97907d92e16d34d4a2a9dc793398afa34a6.tar.gz
kernel-8f23a97907d92e16d34d4a2a9dc793398afa34a6.zip
drm/amdgpu/userq: integrate with enforce isolation
Enforce isolation serializes access to the GFX IP. User queues are isolated in the MES scheduler, but we still need to serialize between kernel queues and user queues. For enforce isolation, group KGD user queues with KFD user queues. v2: split out variable renaming, add config guards v3: use new function names Reviewed-by: Sunil Khatri <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index c58d32983c45..e1dca45a152b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1970,6 +1970,9 @@ 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;
@@ -2027,6 +2030,9 @@ 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;