diff options
| author | Alex Deucher <[email protected]> | 2025-03-12 13:44:19 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-03-19 19:52:56 +0000 |
| commit | 553673a3e1bc0abbb994d9884f772189c739e3a0 (patch) | |
| tree | 0a513eae9134f774886c49c0c513d2c010237d16 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amdkfd: Fix bug in config_dequeue_wait_counts (diff) | |
| download | kernel-553673a3e1bc0abbb994d9884f772189c739e3a0.tar.gz kernel-553673a3e1bc0abbb994d9884f772189c739e3a0.zip | |
drm/amdgpu/gfx: fix ref counting for ring based profile handling
We need to make sure the workload profile ref counts are
balanced. This isn't currently the case because we can
increment the count on submissions, but the decrement may
be delayed as work comes in. Track when we enable the
workload profile so the references are balanced.
v2: switch to a mutex and active flag
v3: fix mutex init
Fixes: 8fdb3958e396 ("drm/amdgpu/gfx: add ring helpers for setting workload profile")
Cc: Yang Wang <[email protected]>
Cc: Kenneth Feng <[email protected]>
Tested-by: Kenneth Feng <[email protected]>
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 35ace1368b9c..173048c46fc3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4282,6 +4282,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, /* Initialize the mutex for cleaner shader isolation between GFX and compute processes */ mutex_init(&adev->enforce_isolation_mutex); mutex_init(&adev->gfx.kfd_sch_mutex); + mutex_init(&adev->gfx.workload_profile_mutex); amdgpu_device_init_apu_flags(adev); |
