Reviewed-by: Andrey Grodzovsky <andrey.grodzov...@amd.com>

Andrey

On 4/23/20 4:47 PM, Alex Deucher wrote:
We don't support secure operation on compute rings at the
moment so reject them.

Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index ec2c5e164cd3..b91853fd66d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -161,6 +161,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;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to