[PATCH] drm/amdgpu: check ring type for secure IBs

Christian König ckoenig.leichtzumerken at gmail.com
Fri Apr 24 06:37:23 UTC 2020


Am 23.04.20 um 22:47 schrieb Alex Deucher:
> We don't support secure operation on compute rings at the
> moment so reject them.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Christian König <christian.koenig at 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;
>   



More information about the amd-gfx mailing list