]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/amdgpu: Add Annotations to Process Isolation functions
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Wed, 27 Nov 2024 19:41:36 +0000 (01:11 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:28:13 +0000 (10:28 -0500)
commit55f4139b6598bc1f8e2fca2181c2749bca84ffee
treeb07fc953c1e3e96b8c492499166c991392b3a34f
parent57bcfa89feaacb39f3640e28f946a1364e41b6b7
drm/amd/amdgpu: Add Annotations to Process Isolation functions

This update adds explanations to key functions that manage how the
Kernel Fusion Driver (KFD) and Kernel Graphics Driver (KGD) share the
GPU.

amdgpu_gfx_enforce_isolation_wait_for_kfd: Controls the waiting period
for KFD to ensure it takes turns with KGD in using the GPU. It uses a
mutex to safely manage shared data, like timing and state, and tracks
when KFD starts and stops waiting.

amdgpu_gfx_enforce_isolation_ring_begin_use: Ensures KFD has enough time
to run before new tasks are submitted to the GPU ring. It uses a mutex
to synchronize access and may adjust the KFD scheduler.

amdgpu_gfx_enforce_isolation_ring_end_use: Handles cleanup and state
updates when finishing the use of a GPU ring. It may also adjust the KFD
scheduler, using a mutex to manage shared data access.

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c