drm/amdgpu:new ids flag for preempt
Subsystems (3)
PATCH 1/1 drm/amdgpu:new ids flag for preempt
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -0
@@ -503,6 +503,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.ids_flags =0 ;if (adev->flags &AMD_IS_APU ) dev_info.ids_flags |=AMDGPU_IDS_FLAGS_FUSION ; +if (amdgpu_sriov_vf (adev)) + dev_info.ids_flags |=AMDGPU_IDS_FLAGS_PREEMPTION ; dev_info.virtual_address_offset =AMDGPU_VA_RESERVED_SIZE ; dev_info.virtual_address_max = (uint64_t )adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; dev_info.virtual_address_alignment =max ((int )PAGE_SIZE ,AMDGPU_GPU_PAGE_SIZE );
include/uapi/drm/amdgpu_drm.h +1 -0
@@ -440,6 +440,7 @@ struct drm_amdgpu_cs_chunk_data {* */ #define AMDGPU_IDS_FLAGS_FUSION 0x1 +#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2/* indicate if acceleration can be working */ #define AMDGPU_INFO_ACCEL_WORKING 0x00
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1477280253-3180-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 24.10.2016 um 05:37 schrieb Monk Liu:
Quoted 2 lines
Change-Id Idae33c69198c30bd841fb555641729d3b6e06a2eSigned-off-by Monk Liu <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -503,6 +503,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.ids_flags =0 ;if (adev->flags &AMD_IS_APU ) dev_info.ids_flags |=AMDGPU_IDS_FLAGS_FUSION ; +if (amdgpu_sriov_vf (adev)) + dev_info.ids_flags |=AMDGPU_IDS_FLAGS_PREEMPTION ; dev_info.virtual_address_offset =AMDGPU_VA_RESERVED_SIZE ; dev_info.virtual_address_max = (uint64_t )adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; dev_info.virtual_address_alignment =max ((int )PAGE_SIZE ,AMDGPU_GPU_PAGE_SIZE );include/uapi/drm/amdgpu_drm.h +0
-0
include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_cs_chunk_data { · line 446
Quoted 7 lines
include/uapi/drm/amdgpu_drm.h +1
-0@@ -440,6 +440,7 @@ struct drm_amdgpu_cs_chunk_data {* */ #define AMDGPU_IDS_FLAGS_FUSION 0x1 +#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2/* 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
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 28 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: Sunday, October 23, 2016 11:38 PM
To: [email protected]
Cc: Liu, Monk
Subject: [PATCH] drm/amdgpu:new ids flag for preemptChange-Id Idae33c69198c30bd841fb555641729d3b6e06a2eSigned-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -503,6 +503,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev,void *data, struct
drm_filedrivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0dev_info.ids_flags =0 ;if (adev->flags &AMD_IS_APU ) dev_info.ids_flags |=
AMDGPU_IDS_FLAGS_FUSION;drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0+if (amdgpu_sriov_vf (adev)) + dev_info.ids_flags |=
Quoted 1 line
AMDGPU_IDS_FLAGS_PREEMPTION;
Do we need a separate flag for SR-IOV specifically? I.e., at some point in the future if we support pre-emption in general, would we set this flag even when SR-IOV is not enabled? I.e., is userspace using this as a check for pre-emption or sr-iov? If it's the latter, I'd suggest changing the name of the flag to something with SR-IOV. If it's the former, then the patch is:
Quoted 22 lines
dev_info.virtual_address_offset =
AMDGPU_VA_RESERVED_SIZE;
dev_info.virtual_address_max = (uint64_t)adev-Quoted 1 line
vm_manager.max_pfn *
AMDGPU_GPU_PAGE_SIZE;dev_info.virtual_address_alignment = max((int)PAGE_SIZE,
AMDGPU_GPU_PAGE_SIZE);include/uapi/drm/amdgpu_drm.h +1
-1@@ -440,6 +440,7 @@ struct drm_amdgpu_cs_chunk_data {* */ #define AMDGPU_IDS_FLAGS_FUSION 0x1 +#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2/* indicate if acceleration can be working */ #define AMDGPU_INFO_ACCEL_WORKING 0x00 --1.9.1
Quoted 4 lines
_______________________________________________
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