drm/amdgpu: new ids flag for tmz (v2)
Subsystems (3)
PATCH 1/1 drm/amdgpu: new ids flag for tmz (v2)
Allows UMD to know if TMZ is supported and enabled.
This commit also bumps KMS_DRIVER_MINOR because if we don't UMD can't tell if "ids_flags & AMDGPU_IDS_FLAGS_TMZ == 0" means "tmz is not enabled" or "tmz may be enabled but the kernel doesn't report it".
v2: use amdgpu_is_tmz() and reworded commit message.
---
Patch for using it in Mesa is at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049
(ac/gpu_info: add detection of TMZ support).
I've kept the AMDGPU_IDS_FLAGS_TMZ name to match the existing AMDGPU_IDS_FLAGS_PREEMPTION flag.
Pierre-Eric
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ include/uapi/drm/amdgpu_drm.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
@@ -88,9 +88,10 @@* - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness * - 3.38.0 - Add AMDGPU_IB_FLAG_EMIT_MEM_SYNC * - 3.39.0 - DMABUF implicit sync does a full pipeline sync +* - 3.40.0 - Add AMDGPU_IDS_FLAGS_TMZ */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 39 +#define KMS_DRIVER_MINOR 40#define KMS_DRIVER_PATCHLEVEL 0int amdgpu_vram_limit =0 ;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -0
@@ -736,6 +736,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.ids_flags |=AMDGPU_IDS_FLAGS_FUSION ;if (amdgpu_mcbp ||amdgpu_sriov_vf (adev)) dev_info.ids_flags |=AMDGPU_IDS_FLAGS_PREEMPTION ; +if (amdgpu_is_tmz (adev)) + dev_info.ids_flags |=AMDGPU_IDS_FLAGS_TMZ ; vm_size = adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; vm_size -=AMDGPU_VA_RESERVED_SIZE ;
include/uapi/drm/amdgpu_drm.h +1 -0
@@ -676,6 +676,7 @@ struct drm_amdgpu_cs_chunk_data {*/ #define AMDGPU_IDS_FLAGS_FUSION 0x1#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 +#define AMDGPU_IDS_FLAGS_TMZ 0x4/* indicate if acceleration can be working */ #define AMDGPU_INFO_ACCEL_WORKING 0x00
Signature · 6 lines
2.26.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 30.07.20 um 15:54 schrieb Pierre-Eric Pelloux-Prayer:
Quoted 8 lines
Allows UMD to know if TMZ is supported and enabled.
This commit also bumps
KMS_DRIVER_MINORbecause if we don't UMD can't tell if "ids_flags&AMDGPU_IDS_FLAGS_TMZ== 0" means "tmz is not enabled" or "tmz may be enabled but the kernel doesn't report it".v2: use
amdgpu_is_tmz()and reworded commit message.
Your signed-off-by line is missing, but apart from that the patch is Reviewed-by: Christian König <[email protected]>
Quoted 47 lines
---
Patch for using it in Mesa is at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049
(ac/gpu_info: add detection of TMZ support).
I've kept theAMDGPU_IDS_FLAGS_TMZname to match the existingAMDGPU_IDS_FLAGS_PREEMPTIONflag.Pierre-Eric
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ include/uapi/drm/amdgpu_drm.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-1@@ -88,9 +88,10 @@* - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness * - 3.38.0 - Add AMDGPU_IB_FLAG_EMIT_MEM_SYNC * - 3.39.0 - DMABUF implicit sync does a full pipeline sync +* - 3.40.0 - Add AMDGPU_IDS_FLAGS_TMZ */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 39 +#define KMS_DRIVER_MINOR 40#define KMS_DRIVER_PATCHLEVEL 0int amdgpu_vram_limit =0 ;drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -736,6 +736,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.ids_flags |=AMDGPU_IDS_FLAGS_FUSION ;if (amdgpu_mcbp ||amdgpu_sriov_vf (adev)) dev_info.ids_flags |=AMDGPU_IDS_FLAGS_PREEMPTION ; +if (amdgpu_is_tmz (adev)) + dev_info.ids_flags |=AMDGPU_IDS_FLAGS_TMZ ; vm_size = adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; vm_size -=AMDGPU_VA_RESERVED_SIZE ;include/uapi/drm/amdgpu_drm.h +0
-0
include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_cs_chunk_data { · line 682
Quoted 7 lines
include/uapi/drm/amdgpu_drm.h +1
-0@@ -676,6 +676,7 @@ struct drm_amdgpu_cs_chunk_data {*/ #define AMDGPU_IDS_FLAGS_FUSION 0x1#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 +#define AMDGPU_IDS_FLAGS_TMZ 0x4/* indicate if acceleration can be working */ #define AMDGPU_INFO_ACCEL_WORKING 0x00
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Christian,
Quoted 11 lines · Christian König
Am 30.07.20 um 15:54 schrieb Pierre-Eric Pelloux-Prayer:
Quoted 8 lines
Allows UMD to know if TMZ is supported and enabled.
This commit also bumps
KMS_DRIVER_MINORbecause if we don't UMD can't tell if "ids_flags&AMDGPU_IDS_FLAGS_TMZ== 0" means "tmz is not enabled" or "tmz may be enabled but the kernel doesn't report it".v2: use
amdgpu_is_tmz()and reworded commit message.Your signed-off-by line is missing, but apart from that the patch is Reviewed-by: Christian König <[email protected]>
Thanks, I'll add my s-o-b tag before pushing the patch.
Pierre-Eric
Quoted 49 lines
Quoted 49 lines
---
Patch for using it in Mesa is at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049
(ac/gpu_info: add detection of TMZ support).
I've kept theAMDGPU_IDS_FLAGS_TMZname to match the existingAMDGPU_IDS_FLAGS_PREEMPTIONflag.Pierre-Eric
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 2 ++
include/uapi/drm/amdgpu_drm.h | 1 +3 files changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-1@@ -88,9 +88,10 @@* - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness * - 3.38.0 - Add AMDGPU_IB_FLAG_EMIT_MEM_SYNC * - 3.39.0 - DMABUF implicit sync does a full pipeline sync +* - 3.40.0 - Add AMDGPU_IDS_FLAGS_TMZ */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 39 +#define KMS_DRIVER_MINOR 40 #define KMS_DRIVER_PATCHLEVEL 0 int amdgpu_vram_limit = 0;drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -736,6 +736,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION; if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION; + if (amdgpu_is_tmz(adev)) + dev_info.ids_flags |= AMDGPU_IDS_FLAGS_TMZ; vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE; vm_size -= AMDGPU_VA_RESERVED_SIZE;include/uapi/drm/amdgpu_drm.h +0
-0@@ -676,6 +676,7 @@ struct drm_amdgpu_cs_chunk_data {*/ #define AMDGPU_IDS_FLAGS_FUSION 0x1 #define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
Quoted 8 lines
include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_cs_chunk_data { · line 682
Quoted 3 lines
include/uapi/drm/amdgpu_drm.h +1
-0+#define AMDGPU_IDS_FLAGS_TMZ 0x4 /* indicate if acceleration can be working */ #define AMDGPU_INFO_ACCEL_WORKING 0x00_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx