summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-07-08 13:33:22 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-07-09 17:43:39 -0500
commit32eaeae0ef193b64a67177006bdf5d9130d83fd3 (patch)
tree019d9b1ca2306cabe125a216916eb9b106e09524 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent7f963d9f69bf28d639013630da30d7a4c95edd5d (diff)
downloadlinux-stable-32eaeae0ef193b64a67177006bdf5d9130d83fd3.tar.gz
linux-stable-32eaeae0ef193b64a67177006bdf5d9130d83fd3.tar.bz2
linux-stable-32eaeae0ef193b64a67177006bdf5d9130d83fd3.zip
drm/amdgpu/psp: add a mutex to protect access to the psp ring
We need to serialize access to the psp ring if there are multiple callers at runtime. Reviewed-by: Hawking Zhang <Hawking.Zhang@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.c1
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 7401bc95c15b..5a7f893cf724 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2537,6 +2537,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
hash_init(adev->mn_hash);
mutex_init(&adev->lock_reset);
mutex_init(&adev->virt.dpm_mutex);
+ mutex_init(&adev->psp.mutex);
r = amdgpu_device_check_arguments(adev);
if (r)