* [PATCH] drm/amdgpu:set preemption flag bit
@ 2016-10-21 3:34 Monk Liu
[not found] ` <1477020857-2921-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Monk Liu @ 2016-10-21 3:34 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu
UMD need this bit if preemption want supported
Change-Id: Ic657b3e6f46a148ed3cf0e932ccf46f2c5230d7f
Signed-off-by: Monk Liu <Monk.Liu@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;
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu:set preemption flag bit
[not found] ` <1477020857-2921-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2016-10-21 9:59 ` Christian König
[not found] ` <882294ec-ec3b-95c3-2caf-8e9e49bd6a08-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2016-10-21 9:59 UTC (permalink / raw)
To: Monk Liu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Way to much overkill, just put that into the device info flags.
See AMDGPU_IDS_FLAGS_FUSION for reference.
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.Liu@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu:set preemption flag bit
[not found] ` <882294ec-ec3b-95c3-2caf-8e9e49bd6a08-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2016-10-21 14:55 ` Alex Deucher
[not found] ` <CADnq5_MY+NHBU7Xn9m6qOX4gC7sx2XhpUUe=Ls1whfq-Kwr0eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2016-10-21 14:55 UTC (permalink / raw)
To: Christian König; +Cc: amd-gfx list, Monk Liu
On Fri, Oct 21, 2016 at 5:59 AM, Christian König
<deathsimple@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.Liu@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/amdgpu:set preemption flag bit
[not found] ` <CADnq5_MY+NHBU7Xn9m6qOX4gC7sx2XhpUUe=Ls1whfq-Kwr0eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-10-24 3:40 ` Liu, Monk
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Monk @ 2016-10-24 3:40 UTC (permalink / raw)
To: Alex Deucher, Christian König; +Cc: amd-gfx list
Okay, good advice
BR Monk
-----Original Message-----
From: Alex Deucher [mailto:alexdeucher@gmail.com]
Sent: Friday, October 21, 2016 10:55 PM
To: Christian König <deathsimple@vodafone.de>
Cc: Liu, Monk <Monk.Liu@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu:set preemption flag bit
On Fri, Oct 21, 2016 at 5:59 AM, Christian König <deathsimple@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.Liu@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-24 3:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 3:34 [PATCH] drm/amdgpu:set preemption flag bit Monk Liu
[not found] ` <1477020857-2921-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-10-21 9:59 ` Christian König
[not found] ` <882294ec-ec3b-95c3-2caf-8e9e49bd6a08-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-10-21 14:55 ` Alex Deucher
[not found] ` <CADnq5_MY+NHBU7Xn9m6qOX4gC7sx2XhpUUe=Ls1whfq-Kwr0eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-24 3:40 ` Liu, Monk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.