drm/amdgpu: s/ENCRYPTED/SECURE/ on GEM create flag
Subsystems (3)
PATCH 1/1 drm/amdgpu: s/ENCRYPTED/SECURE/ on GEM create flag
Rename to SECURE to align with the CS flag naming.
---
Several other teams thought it would be cleaner to call it SECURE since it aligns better with the CS interface. I don't have a strong opinion either way.
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- include/uapi/drm/amdgpu_drm.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 -3
@@ -227,7 +227,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,AMDGPU_GEM_CREATE_VRAM_CLEARED |AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |AMDGPU_GEM_CREATE_EXPLICIT_SYNC | - AMDGPU_GEM_CREATE_ENCRYPTED)) + AMDGPU_GEM_CREATE_SECURE)) return -EINVAL;
@@ -235,7 +235,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,if (args->in.domains & ~AMDGPU_GEM_DOMAIN_MASK )return -EINVAL ; -if (!adev->tmz.enabled && (flags &AMDGPU_GEM_CREATE_ENCRYPTED )) { +if (!adev->tmz.enabled && (flags &AMDGPU_GEM_CREATE_SECURE )) {DRM_ERROR ("Cannot allocate secure buffer while tmz is disabled\n" );return -EINVAL ; }
@@ -261,7 +261,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data, resv = vm->root.base.bo->tbo.base.resv; } -if (flags &AMDGPU_GEM_CREATE_ENCRYPTED ) { +if (flags &AMDGPU_GEM_CREATE_SECURE ) {/* XXX: pad out alignment to meet TMZ requirements */ }
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 -1
@@ -232,7 +232,7 @@ static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo)*/ static inline bool amdgpu_bo_encrypted (struct amdgpu_bo *bo) { -return bo->flags &AMDGPU_GEM_CREATE_ENCRYPTED ; +return bo->flags &AMDGPU_GEM_CREATE_SECURE ; }bool amdgpu_bo_is_amdgpu_bo (struct ttm_buffer_object *bo);
include/uapi/drm/amdgpu_drm.h +2 -2
@@ -135,11 +135,11 @@ extern "C" {* releasing the memory */ #define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9) -/* Flag that BO will be encrypted and that the TMZ bit should be +/* Flag that BO will be secure and that the TMZ bit should be * set in the PTEs when mapping this buffer via GPUVM or * accessing it with various hw blocks */ -#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10) +#define AMDGPU_GEM_CREATE_SECURE (1 << 10)struct drm_amdgpu_gem_create_in {/** the requested memory size */
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 11.12.19 um 17:21 schrieb Alex Deucher:
Quoted 3 lines
Rename to SECURE to align with the CS flag naming.
Signed-off-by Alex Deucher <[email protected]>
I was rather close to given an acked-by, but then thought if that actually makes sense.
The flags describe what should happen to the buffer and CS, and considering that to distinct that actually makes sense.
In other words the buffer is encrypted and because of this can only be accessed by a secure submission.
Regards,
Christian.
Quoted 63 lines
---
Several other teams thought it would be cleaner to call it SECURE since it aligns better with the CS interface. I don't have a strong opinion either way.
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- include/uapi/drm/amdgpu_drm.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3
-3@@ -227,7 +227,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,AMDGPU_GEM_CREATE_VRAM_CLEARED |AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |AMDGPU_GEM_CREATE_EXPLICIT_SYNC | - AMDGPU_GEM_CREATE_ENCRYPTED)) + AMDGPU_GEM_CREATE_SECURE)) return -EINVAL;@@ -235,7 +235,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,if (args->in.domains & ~AMDGPU_GEM_DOMAIN_MASK )return -EINVAL ; -if (!adev->tmz.enabled && (flags &AMDGPU_GEM_CREATE_ENCRYPTED )) { +if (!adev->tmz.enabled && (flags &AMDGPU_GEM_CREATE_SECURE )) {DRM_ERROR ("Cannot allocate secure buffer while tmz is disabled\n" );return -EINVAL ; }@@ -261,7 +261,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data, resv = vm->root.base.bo->tbo.base.resv; } -if (flags &AMDGPU_GEM_CREATE_ENCRYPTED ) { +if (flags &AMDGPU_GEM_CREATE_SECURE ) {/* XXX: pad out alignment to meet TMZ requirements */ }drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1
-1@@ -232,7 +232,7 @@ static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo)*/ static inline bool amdgpu_bo_encrypted (struct amdgpu_bo *bo) { -return bo->flags &AMDGPU_GEM_CREATE_ENCRYPTED ; +return bo->flags &AMDGPU_GEM_CREATE_SECURE ; }bool amdgpu_bo_is_amdgpu_bo (struct ttm_buffer_object *bo);include/uapi/drm/amdgpu_drm.h +0
-0@@ -135,11 +135,11 @@ extern "C" {* releasing the memory */ #define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9)
include/uapi/drm/amdgpu_drm.h extern "C" { · line 145
Quoted 10 lines
include/uapi/drm/amdgpu_drm.h +2
-2-/* Flag that BO will be encrypted and that the TMZ bit should be +/* Flag that BO will be secure and that the TMZ bit should be * set in the PTEs when mapping this buffer via GPUVM or * accessing it with various hw blocks */ -#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10) +#define AMDGPU_GEM_CREATE_SECURE (1 << 10)struct drm_amdgpu_gem_create_in {/** the requested memory size */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx