[PATCH v3] drm/amdgpu: fix the wrong logic checking when secure buffer is created (v3)

Christian König ckoenig.leichtzumerken at gmail.com
Tue Feb 18 10:43:41 UTC 2020


Am 18.02.20 um 11:39 schrieb Huang Rui:
> While the current amdgpu doesn't support TMZ, it will return the error if user
> mode would like to allocate secure buffer.
>
> Fixes: 17d907c drm/amdgpu: implement TMZ accessor (v3)
>
> v2: we didn't need this checking anymore.
> v3: only print message once time.
>
> Signed-off-by: Huang Rui <ray.huang at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index b51a060..5bec66e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -235,8 +235,8 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
>   	if (args->in.domains & ~AMDGPU_GEM_DOMAIN_MASK)
>   		return -EINVAL;
>   
> -	if (amdgpu_is_tmz(adev) && (flags & AMDGPU_GEM_CREATE_ENCRYPTED)) {
> -		DRM_ERROR("Cannot allocate secure buffer since TMZ is disabled\n");
> +	if (!amdgpu_is_tmz(adev) && (flags & AMDGPU_GEM_CREATE_ENCRYPTED)) {
> +		DRM_NOTE_ONCE("Cannot allocate secure buffer since TMZ is disabled\n");
>   		return -EINVAL;
>   	}
>   



More information about the amd-gfx mailing list