All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] enable syncobj test depending on capability
@ 2019-05-16 10:46 Chunming Zhou
  2019-05-16 10:51 ` Koenig, Christian
  0 siblings, 1 reply; 9+ messages in thread
From: Chunming Zhou @ 2019-05-16 10:46 UTC (permalink / raw)
  To: Christian.Koenig, dri-devel

Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
---
 include/drm/drm.h            | 1 +
 tests/amdgpu/syncobj_tests.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/include/drm/drm.h b/include/drm/drm.h
index c893f3b4..532787bf 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -643,6 +643,7 @@ struct drm_gem_open {
 #define DRM_CAP_PAGE_FLIP_TARGET	0x11
 #define DRM_CAP_CRTC_IN_VBLANK_EVENT	0x12
 #define DRM_CAP_SYNCOBJ		0x13
+#define DRM_CAP_SYNCOBJ_TIMELINE	0x14
 
 /** DRM_IOCTL_GET_CAP ioctl argument type */
 struct drm_get_cap {
diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c
index a0c627d7..869ed88e 100644
--- a/tests/amdgpu/syncobj_tests.c
+++ b/tests/amdgpu/syncobj_tests.c
@@ -22,6 +22,7 @@
 */
 
 #include "CUnit/Basic.h"
+#include "xf86drm.h"
 
 #include "amdgpu_test.h"
 #include "amdgpu_drm.h"
@@ -36,6 +37,13 @@ static void amdgpu_syncobj_timeline_test(void);
 
 CU_BOOL suite_syncobj_timeline_tests_enable(void)
 {
+	int r;
+	uint64_t cap = 0;
+
+	r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &cap);
+	if (r || cap == 0)
+		return CU_FALSE;
+
 	return CU_TRUE;
 }
 
-- 
2.17.1

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

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-16 10:46 [PATCH libdrm] enable syncobj test depending on capability Chunming Zhou
@ 2019-05-16 10:51 ` Koenig, Christian
  2019-05-16 11:03   ` Zhou, David(ChunMing)
  0 siblings, 1 reply; 9+ messages in thread
From: Koenig, Christian @ 2019-05-16 10:51 UTC (permalink / raw)
  To: Zhou, David(ChunMing), dri-devel

Am 16.05.19 um 12:46 schrieb Chunming Zhou:
> Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.
>
> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   include/drm/drm.h            | 1 +
>   tests/amdgpu/syncobj_tests.c | 8 ++++++++
>   2 files changed, 9 insertions(+)
>
> diff --git a/include/drm/drm.h b/include/drm/drm.h
> index c893f3b4..532787bf 100644
> --- a/include/drm/drm.h
> +++ b/include/drm/drm.h
> @@ -643,6 +643,7 @@ struct drm_gem_open {
>   #define DRM_CAP_PAGE_FLIP_TARGET	0x11
>   #define DRM_CAP_CRTC_IN_VBLANK_EVENT	0x12
>   #define DRM_CAP_SYNCOBJ		0x13
> +#define DRM_CAP_SYNCOBJ_TIMELINE	0x14
>   
>   /** DRM_IOCTL_GET_CAP ioctl argument type */
>   struct drm_get_cap {
> diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c
> index a0c627d7..869ed88e 100644
> --- a/tests/amdgpu/syncobj_tests.c
> +++ b/tests/amdgpu/syncobj_tests.c
> @@ -22,6 +22,7 @@
>   */
>   
>   #include "CUnit/Basic.h"
> +#include "xf86drm.h"
>   
>   #include "amdgpu_test.h"
>   #include "amdgpu_drm.h"
> @@ -36,6 +37,13 @@ static void amdgpu_syncobj_timeline_test(void);
>   
>   CU_BOOL suite_syncobj_timeline_tests_enable(void)
>   {
> +	int r;
> +	uint64_t cap = 0;
> +
> +	r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &cap);
> +	if (r || cap == 0)
> +		return CU_FALSE;
> +
>   	return CU_TRUE;
>   }
>   

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

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

* Re:[PATCH libdrm] enable syncobj test depending on capability
  2019-05-16 10:51 ` Koenig, Christian
@ 2019-05-16 11:03   ` Zhou, David(ChunMing)
  2019-05-17  9:47     ` [PATCH " zhoucm1
  0 siblings, 1 reply; 9+ messages in thread
From: Zhou, David(ChunMing) @ 2019-05-16 11:03 UTC (permalink / raw)
  To: Koenig, Christian, Zhou, David(ChunMing), dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1788 bytes --]

could you help push this patch as well?

Thanks,
-David

-------- Original Message --------
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability
From: "Koenig, Christian"
To: "Zhou, David(ChunMing)" ,dri-devel@lists.freedesktop.org
CC:

Am 16.05.19 um 12:46 schrieb Chunming Zhou:
> Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.
>
> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   include/drm/drm.h            | 1 +
>   tests/amdgpu/syncobj_tests.c | 8 ++++++++
>   2 files changed, 9 insertions(+)
>
> diff --git a/include/drm/drm.h b/include/drm/drm.h
> index c893f3b4..532787bf 100644
> --- a/include/drm/drm.h
> +++ b/include/drm/drm.h
> @@ -643,6 +643,7 @@ struct drm_gem_open {
>   #define DRM_CAP_PAGE_FLIP_TARGET    0x11
>   #define DRM_CAP_CRTC_IN_VBLANK_EVENT        0x12
>   #define DRM_CAP_SYNCOBJ             0x13
> +#define DRM_CAP_SYNCOBJ_TIMELINE     0x14
>
>   /** DRM_IOCTL_GET_CAP ioctl argument type */
>   struct drm_get_cap {
> diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c
> index a0c627d7..869ed88e 100644
> --- a/tests/amdgpu/syncobj_tests.c
> +++ b/tests/amdgpu/syncobj_tests.c
> @@ -22,6 +22,7 @@
>   */
>
>   #include "CUnit/Basic.h"
> +#include "xf86drm.h"
>
>   #include "amdgpu_test.h"
>   #include "amdgpu_drm.h"
> @@ -36,6 +37,13 @@ static void amdgpu_syncobj_timeline_test(void);
>
>   CU_BOOL suite_syncobj_timeline_tests_enable(void)
>   {
> +     int r;
> +     uint64_t cap = 0;
> +
> +     r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &cap);
> +     if (r || cap == 0)
> +             return CU_FALSE;
> +
>        return CU_TRUE;
>   }
>


[-- Attachment #1.2: Type: text/html, Size: 3370 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-16 11:03   ` Zhou, David(ChunMing)
@ 2019-05-17  9:47     ` zhoucm1
  2019-05-17  9:55       ` Michel Dänzer
  0 siblings, 1 reply; 9+ messages in thread
From: zhoucm1 @ 2019-05-17  9:47 UTC (permalink / raw)
  To: Zhou, David(ChunMing), Koenig, Christian, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2116 bytes --]

ping, Could you help check in patch to gitlab? My connection to gitlab 
still has problem.


Thanks,

-David


On 2019年05月16日 19:03, Zhou, David(ChunMing) wrote:
> could you help push this patch as well?
>
> Thanks,
> -David
>
> -------- Original Message --------
> Subject: Re: [PATCH libdrm] enable syncobj test depending on capability
> From: "Koenig, Christian"
> To: "Zhou, David(ChunMing)" ,dri-devel@lists.freedesktop.org
> CC:
>
> Am 16.05.19 um 12:46 schrieb Chunming Zhou:
> > Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.
> >
> > Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   include/drm/drm.h            | 1 +
> >   tests/amdgpu/syncobj_tests.c | 8 ++++++++
> >   2 files changed, 9 insertions(+)
> >
> > diff --git a/include/drm/drm.h b/include/drm/drm.h
> > index c893f3b4..532787bf 100644
> > --- a/include/drm/drm.h
> > +++ b/include/drm/drm.h
> > @@ -643,6 +643,7 @@ struct drm_gem_open {
> >   #define DRM_CAP_PAGE_FLIP_TARGET    0x11
> >   #define DRM_CAP_CRTC_IN_VBLANK_EVENT        0x12
> >   #define DRM_CAP_SYNCOBJ             0x13
> > +#define DRM_CAP_SYNCOBJ_TIMELINE     0x14
> >
> >   /** DRM_IOCTL_GET_CAP ioctl argument type */
> >   struct drm_get_cap {
> > diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c
> > index a0c627d7..869ed88e 100644
> > --- a/tests/amdgpu/syncobj_tests.c
> > +++ b/tests/amdgpu/syncobj_tests.c
> > @@ -22,6 +22,7 @@
> >   */
> >
> >   #include "CUnit/Basic.h"
> > +#include "xf86drm.h"
> >
> >   #include "amdgpu_test.h"
> >   #include "amdgpu_drm.h"
> > @@ -36,6 +37,13 @@ static void amdgpu_syncobj_timeline_test(void);
> >
> >   CU_BOOL suite_syncobj_timeline_tests_enable(void)
> >   {
> > +     int r;
> > +     uint64_t cap = 0;
> > +
> > +     r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &cap);
> > +     if (r || cap == 0)
> > +             return CU_FALSE;
> > +
> >        return CU_TRUE;
> >   }
> >
>


[-- Attachment #1.2: Type: text/html, Size: 4419 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-17  9:47     ` [PATCH " zhoucm1
@ 2019-05-17  9:55       ` Michel Dänzer
  2019-05-17 12:13         ` Koenig, Christian
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2019-05-17  9:55 UTC (permalink / raw)
  To: zhoucm1, Zhou, David(ChunMing), Koenig, Christian; +Cc: dri-devel

On 2019-05-17 11:47 a.m., zhoucm1 wrote:
> ping, Could you help check in patch to gitlab? My connection to gitlab
> still has problem.

Please follow the process documented in include/drm/README for
include/drm/drm.h .


-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-17  9:55       ` Michel Dänzer
@ 2019-05-17 12:13         ` Koenig, Christian
  2019-05-17 12:28           ` Zhou, David(ChunMing)
  0 siblings, 1 reply; 9+ messages in thread
From: Koenig, Christian @ 2019-05-17 12:13 UTC (permalink / raw)
  To: Michel Dänzer, Zhou, David(ChunMing); +Cc: dri-devel

Am 17.05.19 um 11:55 schrieb Michel Dänzer:
> [CAUTION: External Email]
>
> On 2019-05-17 11:47 a.m., zhoucm1 wrote:
>> ping, Could you help check in patch to gitlab? My connection to gitlab
>> still has problem.
> Please follow the process documented in include/drm/README for
> include/drm/drm.h .

Yeah, the header should be updated separately to what is currently in 
drm-next (or drm-misc-next).

And then we can update the fix on top of that,
Christian.

>
>
> --
> Earthling Michel Dänzer               |              https://www.amd.com
> Libre software enthusiast             |             Mesa and X developer

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

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

* Re:[PATCH libdrm] enable syncobj test depending on capability
  2019-05-17 12:13         ` Koenig, Christian
@ 2019-05-17 12:28           ` Zhou, David(ChunMing)
  2019-05-17 13:43             ` [PATCH " Koenig, Christian
  0 siblings, 1 reply; 9+ messages in thread
From: Zhou, David(ChunMing) @ 2019-05-17 12:28 UTC (permalink / raw)
  To: Koenig, Christian, Michel Dänzer, Zhou, David(ChunMing); +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 994 bytes --]

Can you guy do that? Otherwise if kernel driver doesn't set that cap, test could fail.

Thanks,
-David

-------- Original Message --------
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability
From: "Koenig, Christian"
To: Michel Dänzer ,"Zhou, David(ChunMing)" ,"Zhou, David(ChunMing)"
CC: dri-devel@lists.freedesktop.org

Am 17.05.19 um 11:55 schrieb Michel Dänzer:
> [CAUTION: External Email]
>
> On 2019-05-17 11:47 a.m., zhoucm1 wrote:
>> ping, Could you help check in patch to gitlab? My connection to gitlab
>> still has problem.
> Please follow the process documented in include/drm/README for
> include/drm/drm.h .

Yeah, the header should be updated separately to what is currently in
drm-next (or drm-misc-next).

And then we can update the fix on top of that,
Christian.

>
>
> --
> Earthling Michel Dänzer               |              https://www.amd.com
> Libre software enthusiast             |             Mesa and X developer


[-- Attachment #1.2: Type: text/html, Size: 1919 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-17 12:28           ` Zhou, David(ChunMing)
@ 2019-05-17 13:43             ` Koenig, Christian
  2019-05-17 14:28               ` Michel Dänzer
  0 siblings, 1 reply; 9+ messages in thread
From: Koenig, Christian @ 2019-05-17 13:43 UTC (permalink / raw)
  To: Zhou, David(ChunMing), Michel Dänzer; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1362 bytes --]

No, first of all I'm really busy with those TTM problems.

And second I'm actually not very familiar with this either.

Please just split the patch up into two, one updating the headers and one fixing the test case.

Maybe that's enough for Michel,
Christian.

Am 17.05.19 um 14:28 schrieb Zhou, David(ChunMing):
Can you guy do that? Otherwise if kernel driver doesn't set that cap, test could fail.

Thanks,
-David

-------- Original Message --------
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability
From: "Koenig, Christian"
To: Michel Dänzer ,"Zhou, David(ChunMing)" ,"Zhou, David(ChunMing)"
CC: dri-devel@lists.freedesktop.org<mailto:dri-devel@lists.freedesktop.org>

Am 17.05.19 um 11:55 schrieb Michel Dänzer:
> [CAUTION: External Email]
>
> On 2019-05-17 11:47 a.m., zhoucm1 wrote:
>> ping, Could you help check in patch to gitlab? My connection to gitlab
>> still has problem.
> Please follow the process documented in include/drm/README for
> include/drm/drm.h .

Yeah, the header should be updated separately to what is currently in
drm-next (or drm-misc-next).

And then we can update the fix on top of that,
Christian.

>
>
> --
> Earthling Michel Dänzer               |              https://www.amd.com
> Libre software enthusiast             |             Mesa and X developer



[-- Attachment #1.2: Type: text/html, Size: 2703 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH libdrm] enable syncobj test depending on capability
  2019-05-17 13:43             ` [PATCH " Koenig, Christian
@ 2019-05-17 14:28               ` Michel Dänzer
  0 siblings, 0 replies; 9+ messages in thread
From: Michel Dänzer @ 2019-05-17 14:28 UTC (permalink / raw)
  To: Koenig, Christian, Zhou, David(ChunMing); +Cc: dri-devel

On 2019-05-17 3:43 p.m., Koenig, Christian wrote:
> No, first of all I'm really busy with those TTM problems.
> 
> And second I'm actually not very familiar with this either.
> 
> Please just split the patch up into two, one updating the headers and one fixing the test case.
> 
> Maybe that's enough for Michel,

This is the most important part of include/drm/README:


When and how to update these files
----------------------------------
Note: One should not do _any_ changes to the files apart from the steps
below.

In order to update the files do the following:
 - Switch to a Linux kernel tree/branch which is not rebased.
   For example: drm-next (https://cgit.freedesktop.org/drm/drm)
 - Install the headers via `make headers_install' to a separate location.
 - Copy the drm header[s] + git add + git commit.
 - Note: Your commit message must include:
   a) Brief summary on the delta. If there's any change that looks like an
API/ABI break one _must_ explicitly state why it's safe to do so.
   b) "Generated using make headers_install."
   c) "Generated from $tree/branch commit $sha"


-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-05-17 14:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 10:46 [PATCH libdrm] enable syncobj test depending on capability Chunming Zhou
2019-05-16 10:51 ` Koenig, Christian
2019-05-16 11:03   ` Zhou, David(ChunMing)
2019-05-17  9:47     ` [PATCH " zhoucm1
2019-05-17  9:55       ` Michel Dänzer
2019-05-17 12:13         ` Koenig, Christian
2019-05-17 12:28           ` Zhou, David(ChunMing)
2019-05-17 13:43             ` [PATCH " Koenig, Christian
2019-05-17 14:28               ` Michel Dänzer

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.