summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2020-02-18 13:07:42 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-28 16:20:29 -0400
commit11b407a781f42d8513da64499f24fafdfd32426f (patch)
tree66a8c2a23ad313a76012d161e3aa011709d34ce7 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parent0bb5d5b03f78aeb5f87d47877eb15532875c64da (diff)
downloadlinux-stable-11b407a781f42d8513da64499f24fafdfd32426f.tar.gz
linux-stable-11b407a781f42d8513da64499f24fafdfd32426f.tar.bz2
linux-stable-11b407a781f42d8513da64499f24fafdfd32426f.zip
drm/amdgpu: fix the wrong logic checking when secure buffer is created (v3)
While the current amdgpu doesn't support TMZ, it will return the error if user mode would like to allocate secure buffer. v2: we didn't need this checking anymore. v3: only print message once time. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Nirmoy Das <Nirmoy.Das@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c4
1 files 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 46cea436945f..77d988a0033f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -242,8 +242,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;
}