diff options
author | Jacob He <jacob.he@amd.com> | 2020-02-27 14:17:40 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-02-28 22:59:21 +0100 |
commit | 460c484f2411b1f3d291a3237d1bab7327448f01 (patch) | |
tree | 82348223160cababc8594779a50d9a1fbd1534dd /drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | |
parent | drm/amdgpu/sriov: Use kiq to copy the gpu clock (diff) | |
download | linux-460c484f2411b1f3d291a3237d1bab7327448f01.tar.xz linux-460c484f2411b1f3d291a3237d1bab7327448f01.zip |
drm/amdgpu: Initialize SPM_VMID with 0xf (v2)
SPM_VMID is a global resource, SPM access the video memory according to
SPM_VMID. The initial valude of SPM_VMID is 0 which is used by kernel.
That means UMD can overwrite the memory of VMID0 by enabling SPM, that
is really dangerous.
Initialize SPM_VMID with 0xf, it messes up other user mode process at
most.
v2: squash in indentation fix
Signed-off-by: Jacob He <jacob.he@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h index d3d4707f2168..52509c254cbd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h @@ -126,6 +126,7 @@ struct amdgpu_rlc_funcs { void (*stop)(struct amdgpu_device *adev); void (*reset)(struct amdgpu_device *adev); void (*start)(struct amdgpu_device *adev); + void (*update_spm_vmid)(struct amdgpu_device *adev, unsigned vmid); }; struct amdgpu_rlc { |