diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2025-03-12 09:48:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2025-03-19 15:54:36 -0400 |
commit | ca6575a32a37c1a3ebab904792bb415249481992 (patch) | |
tree | 91d1eb798cdd36b3135baa9d1790a3ccaa0b851d /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 553673a3e1bc0abbb994d9884f772189c739e3a0 (diff) | |
download | linux-ca6575a32a37c1a3ebab904792bb415249481992.tar.gz linux-ca6575a32a37c1a3ebab904792bb415249481992.tar.bz2 linux-ca6575a32a37c1a3ebab904792bb415249481992.zip |
drm/amdgpu/vcn: 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: 1443dd3c67f6 ("drm/amd/pm: fix and simplify workload handling")
Cc: Yang Wang <kevinyang.wang@amd.com>
Cc: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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 173048c46fc3..44d3afad71d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4283,6 +4283,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, mutex_init(&adev->enforce_isolation_mutex); mutex_init(&adev->gfx.kfd_sch_mutex); mutex_init(&adev->gfx.workload_profile_mutex); + mutex_init(&adev->vcn.workload_profile_mutex); amdgpu_device_init_apu_flags(adev); |