All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amdgpu: Query uvd handles info
@ 2019-04-30 10:51 Sahu, Satyajit
  2019-04-30 10:59 ` Christian König
  0 siblings, 1 reply; 6+ messages in thread
From: Sahu, Satyajit @ 2019-04-30 10:51 UTC (permalink / raw)
  To: dri-devel; +Cc: Sharma, Deepak, Sahu, Satyajit

Query the max uvd handles and used uvd handles.

Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
---
 amdgpu/amdgpu.h          | 14 ++++++++++++++
 amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index c44a495a..407b5fae 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle dev,
 int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
 		      unsigned size, void *value);
 
+/**
+ * Query uvd handles info.
+ *
+ *
+ * \param   dev     - \c [in] Device handle. See #amdgpu_device_initialize()
+ * \param   size    - \c [in] Size of the returned value.
+ * \param   value   - \c [out] Pointer to the return value.
+ *
+ * \return   0 on success\n
+ *          <0 - Negative POSIX error code
+ *
+*/
+int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
+                      unsigned size, void *value);
 /**
  * Query hardware or driver information.
  *
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
index 777087f2..253c4da7 100644
--- a/amdgpu/amdgpu_gpu_info.c
+++ b/amdgpu/amdgpu_gpu_info.c
@@ -44,6 +44,21 @@ drm_public int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
 			       sizeof(struct drm_amdgpu_info));
 }
 
+drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
+                                        unsigned size, void *value)
+{
+	struct drm_amdgpu_info request;
+
+	memset(&request, 0, sizeof(request));
+	request.return_pointer = (uintptr_t)value;
+	request.return_size = size;
+	request.query = AMDGPU_INFO_NUM_HANDLES;
+	request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
+
+	return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
+			       sizeof(struct drm_amdgpu_info));
+}
+
 drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev, unsigned id,
 					 int32_t *result)
 {
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] amdgpu: Query uvd handles info
  2019-04-30 10:51 [PATCH] amdgpu: Query uvd handles info Sahu, Satyajit
@ 2019-04-30 10:59 ` Christian König
  2019-04-30 11:12   ` Sahu, Satyajit
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2019-04-30 10:59 UTC (permalink / raw)
  To: Sahu, Satyajit, dri-devel; +Cc: Sharma, Deepak

Am 30.04.19 um 12:51 schrieb Sahu, Satyajit:
> Query the max uvd handles and used uvd handles.

NAK, please use the generic amdgpu_query_info() function for this.

Regards,
Christian.

>
> Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
> ---
>   amdgpu/amdgpu.h          | 14 ++++++++++++++
>   amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
>   2 files changed, 29 insertions(+)
>
> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> index c44a495a..407b5fae 100644
> --- a/amdgpu/amdgpu.h
> +++ b/amdgpu/amdgpu.h
> @@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle dev,
>   int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>   		      unsigned size, void *value);
>   
> +/**
> + * Query uvd handles info.
> + *
> + *
> + * \param   dev     - \c [in] Device handle. See #amdgpu_device_initialize()
> + * \param   size    - \c [in] Size of the returned value.
> + * \param   value   - \c [out] Pointer to the return value.
> + *
> + * \return   0 on success\n
> + *          <0 - Negative POSIX error code
> + *
> +*/
> +int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
> +                      unsigned size, void *value);
>   /**
>    * Query hardware or driver information.
>    *
> diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
> index 777087f2..253c4da7 100644
> --- a/amdgpu/amdgpu_gpu_info.c
> +++ b/amdgpu/amdgpu_gpu_info.c
> @@ -44,6 +44,21 @@ drm_public int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>   			       sizeof(struct drm_amdgpu_info));
>   }
>   
> +drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
> +                                        unsigned size, void *value)
> +{
> +	struct drm_amdgpu_info request;
> +
> +	memset(&request, 0, sizeof(request));
> +	request.return_pointer = (uintptr_t)value;
> +	request.return_size = size;
> +	request.query = AMDGPU_INFO_NUM_HANDLES;
> +	request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
> +
> +	return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
> +			       sizeof(struct drm_amdgpu_info));
> +}
> +
>   drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev, unsigned id,
>   					 int32_t *result)
>   {

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] amdgpu: Query uvd handles info
  2019-04-30 10:59 ` Christian König
@ 2019-04-30 11:12   ` Sahu, Satyajit
  2019-04-30 11:32     ` Christian König
  0 siblings, 1 reply; 6+ messages in thread
From: Sahu, Satyajit @ 2019-04-30 11:12 UTC (permalink / raw)
  To: Koenig, Christian, dri-devel; +Cc: Sharma, Deepak


On 4/30/2019 4:29 PM, Christian König wrote:
> [CAUTION: External Email]
>
> Am 30.04.19 um 12:51 schrieb Sahu, Satyajit:
>> Query the max uvd handles and used uvd handles.
>
> NAK, please use the generic amdgpu_query_info() function for this.
>
> Regards,
> Christian.

Currently amdgpu_query_info does not provide an option to specify the 
hw_ip_type. For AMDGPU_INFO_NUM_HANDLES the hw_ip_type needs to be 
AMDGPU_HW_IP_UVD, otherwise the kernel returns error.

Regards,

Satyajit

>
>>
>> Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
>> ---
>>   amdgpu/amdgpu.h          | 14 ++++++++++++++
>>   amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
>>   2 files changed, 29 insertions(+)
>>
>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>> index c44a495a..407b5fae 100644
>> --- a/amdgpu/amdgpu.h
>> +++ b/amdgpu/amdgpu.h
>> @@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle 
>> dev,
>>   int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>                     unsigned size, void *value);
>>
>> +/**
>> + * Query uvd handles info.
>> + *
>> + *
>> + * \param   dev     - \c [in] Device handle. See 
>> #amdgpu_device_initialize()
>> + * \param   size    - \c [in] Size of the returned value.
>> + * \param   value   - \c [out] Pointer to the return value.
>> + *
>> + * \return   0 on success\n
>> + *          <0 - Negative POSIX error code
>> + *
>> +*/
>> +int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>> +                      unsigned size, void *value);
>>   /**
>>    * Query hardware or driver information.
>>    *
>> diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
>> index 777087f2..253c4da7 100644
>> --- a/amdgpu/amdgpu_gpu_info.c
>> +++ b/amdgpu/amdgpu_gpu_info.c
>> @@ -44,6 +44,21 @@ drm_public int 
>> amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>                              sizeof(struct drm_amdgpu_info));
>>   }
>>
>> +drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>> +                                        unsigned size, void *value)
>> +{
>> +     struct drm_amdgpu_info request;
>> +
>> +     memset(&request, 0, sizeof(request));
>> +     request.return_pointer = (uintptr_t)value;
>> +     request.return_size = size;
>> +     request.query = AMDGPU_INFO_NUM_HANDLES;
>> +     request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
>> +
>> +     return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
>> +                            sizeof(struct drm_amdgpu_info));
>> +}
>> +
>>   drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev, 
>> unsigned id,
>>                                        int32_t *result)
>>   {
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] amdgpu: Query uvd handles info
  2019-04-30 11:12   ` Sahu, Satyajit
@ 2019-04-30 11:32     ` Christian König
  2019-04-30 12:03       ` Sahu, Satyajit
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2019-04-30 11:32 UTC (permalink / raw)
  To: Sahu, Satyajit, Koenig, Christian, dri-devel; +Cc: Sharma, Deepak

Am 30.04.19 um 13:12 schrieb Sahu, Satyajit:
> On 4/30/2019 4:29 PM, Christian König wrote:
>> [CAUTION: External Email]
>>
>> Am 30.04.19 um 12:51 schrieb Sahu, Satyajit:
>>> Query the max uvd handles and used uvd handles.
>> NAK, please use the generic amdgpu_query_info() function for this.
>>
>> Regards,
>> Christian.
> Currently amdgpu_query_info does not provide an option to specify the
> hw_ip_type. For AMDGPU_INFO_NUM_HANDLES the hw_ip_type needs to be
> AMDGPU_HW_IP_UVD, otherwise the kernel returns error.

Ok, that makes sense.

But please still add a generic query function which takes query and 
hw_ip_type instead of hard coding those values.

BTW: What do you need this for? The number returned is pretty useless on 
newer hardware.

Regards,
Christian.

>
> Regards,
>
> Satyajit
>
>>> Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
>>> ---
>>>    amdgpu/amdgpu.h          | 14 ++++++++++++++
>>>    amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
>>>    2 files changed, 29 insertions(+)
>>>
>>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>>> index c44a495a..407b5fae 100644
>>> --- a/amdgpu/amdgpu.h
>>> +++ b/amdgpu/amdgpu.h
>>> @@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle
>>> dev,
>>>    int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>                      unsigned size, void *value);
>>>
>>> +/**
>>> + * Query uvd handles info.
>>> + *
>>> + *
>>> + * \param   dev     - \c [in] Device handle. See
>>> #amdgpu_device_initialize()
>>> + * \param   size    - \c [in] Size of the returned value.
>>> + * \param   value   - \c [out] Pointer to the return value.
>>> + *
>>> + * \return   0 on success\n
>>> + *          <0 - Negative POSIX error code
>>> + *
>>> +*/
>>> +int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>> +                      unsigned size, void *value);
>>>    /**
>>>     * Query hardware or driver information.
>>>     *
>>> diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
>>> index 777087f2..253c4da7 100644
>>> --- a/amdgpu/amdgpu_gpu_info.c
>>> +++ b/amdgpu/amdgpu_gpu_info.c
>>> @@ -44,6 +44,21 @@ drm_public int
>>> amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>                               sizeof(struct drm_amdgpu_info));
>>>    }
>>>
>>> +drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>> +                                        unsigned size, void *value)
>>> +{
>>> +     struct drm_amdgpu_info request;
>>> +
>>> +     memset(&request, 0, sizeof(request));
>>> +     request.return_pointer = (uintptr_t)value;
>>> +     request.return_size = size;
>>> +     request.query = AMDGPU_INFO_NUM_HANDLES;
>>> +     request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
>>> +
>>> +     return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
>>> +                            sizeof(struct drm_amdgpu_info));
>>> +}
>>> +
>>>    drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev,
>>> unsigned id,
>>>                                         int32_t *result)
>>>    {
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] amdgpu: Query uvd handles info
  2019-04-30 11:32     ` Christian König
@ 2019-04-30 12:03       ` Sahu, Satyajit
  2019-04-30 12:32         ` Koenig, Christian
  0 siblings, 1 reply; 6+ messages in thread
From: Sahu, Satyajit @ 2019-04-30 12:03 UTC (permalink / raw)
  To: Koenig, Christian, dri-devel; +Cc: Sharma, Deepak


On 4/30/2019 5:02 PM, Christian König wrote:
> [CAUTION: External Email]
>
> Am 30.04.19 um 13:12 schrieb Sahu, Satyajit:
>> On 4/30/2019 4:29 PM, Christian König wrote:
>>> [CAUTION: External Email]
>>>
>>> Am 30.04.19 um 12:51 schrieb Sahu, Satyajit:
>>>> Query the max uvd handles and used uvd handles.
>>> NAK, please use the generic amdgpu_query_info() function for this.
>>>
>>> Regards,
>>> Christian.
>> Currently amdgpu_query_info does not provide an option to specify the
>> hw_ip_type. For AMDGPU_INFO_NUM_HANDLES the hw_ip_type needs to be
>> AMDGPU_HW_IP_UVD, otherwise the kernel returns error.
>
> Ok, that makes sense.
>
> But please still add a generic query function which takes query and
> hw_ip_type instead of hard coding those values.
Should I add a new parameter in amdgpu_query_info or add a new query_info?
>
> BTW: What do you need this for? The number returned is pretty useless on
> newer hardware.
On stoney chromebook when  simultaneous used uvd handles exceeds max 
supported uvd handles, there is a failure which is not handled. Thatswhy 
there is a need to check it before allocation so that we can fallback to 
software decoding.
>
> Regards,
> Christian.
>
>>
>> Regards,
>>
>> Satyajit

Regards,

Satyajit

>>
>>>> Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
>>>> ---
>>>>    amdgpu/amdgpu.h          | 14 ++++++++++++++
>>>>    amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
>>>>    2 files changed, 29 insertions(+)
>>>>
>>>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>>>> index c44a495a..407b5fae 100644
>>>> --- a/amdgpu/amdgpu.h
>>>> +++ b/amdgpu/amdgpu.h
>>>> @@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle
>>>> dev,
>>>>    int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>>                      unsigned size, void *value);
>>>>
>>>> +/**
>>>> + * Query uvd handles info.
>>>> + *
>>>> + *
>>>> + * \param   dev     - \c [in] Device handle. See
>>>> #amdgpu_device_initialize()
>>>> + * \param   size    - \c [in] Size of the returned value.
>>>> + * \param   value   - \c [out] Pointer to the return value.
>>>> + *
>>>> + * \return   0 on success\n
>>>> + *          <0 - Negative POSIX error code
>>>> + *
>>>> +*/
>>>> +int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>>> +                      unsigned size, void *value);
>>>>    /**
>>>>     * Query hardware or driver information.
>>>>     *
>>>> diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
>>>> index 777087f2..253c4da7 100644
>>>> --- a/amdgpu/amdgpu_gpu_info.c
>>>> +++ b/amdgpu/amdgpu_gpu_info.c
>>>> @@ -44,6 +44,21 @@ drm_public int
>>>> amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>>                               sizeof(struct drm_amdgpu_info));
>>>>    }
>>>>
>>>> +drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>>> +                                        unsigned size, void *value)
>>>> +{
>>>> +     struct drm_amdgpu_info request;
>>>> +
>>>> +     memset(&request, 0, sizeof(request));
>>>> +     request.return_pointer = (uintptr_t)value;
>>>> +     request.return_size = size;
>>>> +     request.query = AMDGPU_INFO_NUM_HANDLES;
>>>> +     request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
>>>> +
>>>> +     return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
>>>> +                            sizeof(struct drm_amdgpu_info));
>>>> +}
>>>> +
>>>>    drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev,
>>>> unsigned id,
>>>>                                         int32_t *result)
>>>>    {
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] amdgpu: Query uvd handles info
  2019-04-30 12:03       ` Sahu, Satyajit
@ 2019-04-30 12:32         ` Koenig, Christian
  0 siblings, 0 replies; 6+ messages in thread
From: Koenig, Christian @ 2019-04-30 12:32 UTC (permalink / raw)
  To: Sahu, Satyajit, dri-devel; +Cc: Sharma, Deepak

Am 30.04.19 um 14:03 schrieb Sahu, Satyajit:
> On 4/30/2019 5:02 PM, Christian König wrote:
>> [CAUTION: External Email]
>>
>> Am 30.04.19 um 13:12 schrieb Sahu, Satyajit:
>>> On 4/30/2019 4:29 PM, Christian König wrote:
>>>> [CAUTION: External Email]
>>>>
>>>> Am 30.04.19 um 12:51 schrieb Sahu, Satyajit:
>>>>> Query the max uvd handles and used uvd handles.
>>>> NAK, please use the generic amdgpu_query_info() function for this.
>>>>
>>>> Regards,
>>>> Christian.
>>> Currently amdgpu_query_info does not provide an option to specify the
>>> hw_ip_type. For AMDGPU_INFO_NUM_HANDLES the hw_ip_type needs to be
>>> AMDGPU_HW_IP_UVD, otherwise the kernel returns error.
>> Ok, that makes sense.
>>
>> But please still add a generic query function which takes query and
>> hw_ip_type instead of hard coding those values.
> Should I add a new parameter in amdgpu_query_info or add a new query_info?

Add a new one and please double check if there isn't something existing 
which can be used.

>> BTW: What do you need this for? The number returned is pretty useless on
>> newer hardware.
> On stoney chromebook when  simultaneous used uvd handles exceeds max
> supported uvd handles, there is a failure which is not handled. Thatswhy
> there is a need to check it before allocation so that we can fallback to
> software decoding.

Well that is still racy, e.g. two processes can at the same time query 
that there is only 1 handle slot left and then both try to use it.

Better would be to add the missing handling that we can't create an UVD 
context in this case.

Christian.

>> Regards,
>> Christian.
>>
>>> Regards,
>>>
>>> Satyajit
> Regards,
>
> Satyajit
>
>>>>> Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
>>>>> ---
>>>>>     amdgpu/amdgpu.h          | 14 ++++++++++++++
>>>>>     amdgpu/amdgpu_gpu_info.c | 15 +++++++++++++++
>>>>>     2 files changed, 29 insertions(+)
>>>>>
>>>>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>>>>> index c44a495a..407b5fae 100644
>>>>> --- a/amdgpu/amdgpu.h
>>>>> +++ b/amdgpu/amdgpu.h
>>>>> @@ -1174,6 +1174,20 @@ int amdgpu_query_gpu_info(amdgpu_device_handle
>>>>> dev,
>>>>>     int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>>>                       unsigned size, void *value);
>>>>>
>>>>> +/**
>>>>> + * Query uvd handles info.
>>>>> + *
>>>>> + *
>>>>> + * \param   dev     - \c [in] Device handle. See
>>>>> #amdgpu_device_initialize()
>>>>> + * \param   size    - \c [in] Size of the returned value.
>>>>> + * \param   value   - \c [out] Pointer to the return value.
>>>>> + *
>>>>> + * \return   0 on success\n
>>>>> + *          <0 - Negative POSIX error code
>>>>> + *
>>>>> +*/
>>>>> +int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>>>> +                      unsigned size, void *value);
>>>>>     /**
>>>>>      * Query hardware or driver information.
>>>>>      *
>>>>> diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
>>>>> index 777087f2..253c4da7 100644
>>>>> --- a/amdgpu/amdgpu_gpu_info.c
>>>>> +++ b/amdgpu/amdgpu_gpu_info.c
>>>>> @@ -44,6 +44,21 @@ drm_public int
>>>>> amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id,
>>>>>                                sizeof(struct drm_amdgpu_info));
>>>>>     }
>>>>>
>>>>> +drm_public int amdgpu_query_uvd_handles(amdgpu_device_handle dev,
>>>>> +                                        unsigned size, void *value)
>>>>> +{
>>>>> +     struct drm_amdgpu_info request;
>>>>> +
>>>>> +     memset(&request, 0, sizeof(request));
>>>>> +     request.return_pointer = (uintptr_t)value;
>>>>> +     request.return_size = size;
>>>>> +     request.query = AMDGPU_INFO_NUM_HANDLES;
>>>>> +     request.query_hw_ip.type = AMDGPU_HW_IP_UVD;
>>>>> +
>>>>> +     return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
>>>>> +                            sizeof(struct drm_amdgpu_info));
>>>>> +}
>>>>> +
>>>>>     drm_public int amdgpu_query_crtc_from_id(amdgpu_device_handle dev,
>>>>> unsigned id,
>>>>>                                          int32_t *result)
>>>>>     {
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-30 12:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 10:51 [PATCH] amdgpu: Query uvd handles info Sahu, Satyajit
2019-04-30 10:59 ` Christian König
2019-04-30 11:12   ` Sahu, Satyajit
2019-04-30 11:32     ` Christian König
2019-04-30 12:03       ` Sahu, Satyajit
2019-04-30 12:32         ` Koenig, Christian

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.