diff options
| author | Alex Deucher <[email protected]> | 2020-04-23 20:45:10 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-04-28 20:20:30 +0000 |
| commit | b33f9d70b36889abafec3b638925640ac7c7fe12 (patch) | |
| tree | adcae3c2502d3945f7b862785ea4055e7b597bd5 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
| parent | drm/amdgpu: fix size calculation in amdgpu_ttm_copy_mem_to_mem (diff) | |
| download | kernel-b33f9d70b36889abafec3b638925640ac7c7fe12.tar.gz kernel-b33f9d70b36889abafec3b638925640ac7c7fe12.zip | |
drm/amdgpu: check ring type for secure IBs
We don't support secure operation on compute rings at the
moment so reject them.
Reviewed-by: Andrey Grodzovsky <[email protected]>
Reviewed-by: Aaron Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 24ae9f6c4255..aebbbb573884 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -162,6 +162,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, return -EINVAL; } + if ((ib->flags & AMDGPU_IB_FLAGS_SECURE) && + (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)) { + dev_err(adev->dev, "secure submissions not supported on compute rings\n"); + return -EINVAL; + } + alloc_size = ring->funcs->emit_frame_size + num_ibs * ring->funcs->emit_ib_size; |
