On Fri, Oct 21, 2016 at 5:59 AM, Christian König <deathsim...@vodafone.de> wrote: > Way to much overkill, just put that into the device info flags. > > See AMDGPU_IDS_FLAGS_FUSION for reference.
Yeah, agreed. Alex > > Christian. > > > Am 21.10.2016 um 05:34 schrieb Monk Liu: >> >> UMD need this bit if preemption want supported >> >> Change-Id: Ic657b3e6f46a148ed3cf0e932ccf46f2c5230d7f >> Signed-off-by: Monk Liu <monk....@amd.com> >> >> Conflicts: >> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++++++++ >> include/uapi/drm/amdgpu_drm.h | 4 ++++ >> 2 files changed, 12 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c >> index 58a0b59..85b4c5f 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c >> @@ -540,6 +540,14 @@ static int amdgpu_info_ioctl(struct drm_device *dev, >> void *data, struct drm_file >> return copy_to_user(out, &vce_clk_table, >> min((size_t)size, >> sizeof(vce_clk_table))) ? -EFAULT : 0; >> } >> + >> + case AMDGPU_INFO_PREEMPTION: { >> + if (amdgpu_sriov_vf(adev)) >> + ui32 |= AMDGPU_INFO_PREEMPTION_ENALBED; >> + return copy_to_user(out, &ui32, min(size, 4u)) ? -EFAULT: >> 0; >> + break; >> + } >> + >> default: >> DRM_DEBUG_KMS("Invalid request %d\n", info->query); >> return -EINVAL; >> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h >> index 667e9bc..2f25c50 100644 >> --- a/include/uapi/drm/amdgpu_drm.h >> +++ b/include/uapi/drm/amdgpu_drm.h >> @@ -501,6 +501,10 @@ struct drm_amdgpu_cs_chunk_data { >> #define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 >> #define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff >> +/* Query info about preemption */ >> +#define AMDGPU_INFO_PREEMPTION 0x1B >> + #define AMDGPU_INFO_PREEMPTION_ENALBED 1 >> + >> struct drm_amdgpu_query_fw { >> /** AMDGPU_INFO_FW_* */ >> __u32 fw_type; > > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx