diff mbox series

[libdrm] enable syncobj test depending on capability

Message ID 20190516104642.21450-1-david1.zhou@amd.com (mailing list archive)
State New, archived
Headers show
Series [libdrm] enable syncobj test depending on capability | expand

Commit Message

Chunming Zhou May 16, 2019, 10:46 a.m. UTC
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(+)

Comments

Christian König May 16, 2019, 10:51 a.m. UTC | #1
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;
>   }
>
Chunming Zhou May 16, 2019, 11:03 a.m. UTC | #2
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;
>   }
>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>could you help push this patch as well?<br>
<br>
Thanks,<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability<br>
From: &quot;Koenig, Christian&quot; <br>
To: &quot;Zhou, David(ChunMing)&quot; ,dri-devel@lists.freedesktop.org<br>
CC: <br>
<br>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 16.05.19 um 12:46 schrieb Chunming Zhou:<br>
&gt; Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm capability.<br>
&gt;<br>
&gt; Signed-off-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;<br>
<br>
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;<br>
<br>
&gt; ---<br>
&gt;&nbsp;&nbsp; include/drm/drm.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1 &#43;<br>
&gt;&nbsp;&nbsp; tests/amdgpu/syncobj_tests.c | 8 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&gt;&nbsp;&nbsp; 2 files changed, 9 insertions(&#43;)<br>
&gt;<br>
&gt; diff --git a/include/drm/drm.h b/include/drm/drm.h<br>
&gt; index c893f3b4..532787bf 100644<br>
&gt; --- a/include/drm/drm.h<br>
&gt; &#43;&#43;&#43; b/include/drm/drm.h<br>
&gt; @@ -643,6 &#43;643,7 @@ struct drm_gem_open {<br>
&gt;&nbsp;&nbsp; #define DRM_CAP_PAGE_FLIP_TARGET&nbsp;&nbsp;&nbsp; 0x11<br>
&gt;&nbsp;&nbsp; #define DRM_CAP_CRTC_IN_VBLANK_EVENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x12<br>
&gt;&nbsp;&nbsp; #define DRM_CAP_SYNCOBJ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x13<br>
&gt; &#43;#define DRM_CAP_SYNCOBJ_TIMELINE&nbsp;&nbsp;&nbsp;&nbsp; 0x14<br>
&gt;&nbsp;&nbsp; <br>
&gt;&nbsp;&nbsp; /** DRM_IOCTL_GET_CAP ioctl argument type */<br>
&gt;&nbsp;&nbsp; struct drm_get_cap {<br>
&gt; diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c<br>
&gt; index a0c627d7..869ed88e 100644<br>
&gt; --- a/tests/amdgpu/syncobj_tests.c<br>
&gt; &#43;&#43;&#43; b/tests/amdgpu/syncobj_tests.c<br>
&gt; @@ -22,6 &#43;22,7 @@<br>
&gt;&nbsp;&nbsp; */<br>
&gt;&nbsp;&nbsp; <br>
&gt;&nbsp;&nbsp; #include &quot;CUnit/Basic.h&quot;<br>
&gt; &#43;#include &quot;xf86drm.h&quot;<br>
&gt;&nbsp;&nbsp; <br>
&gt;&nbsp;&nbsp; #include &quot;amdgpu_test.h&quot;<br>
&gt;&nbsp;&nbsp; #include &quot;amdgpu_drm.h&quot;<br>
&gt; @@ -36,6 &#43;37,13 @@ static void amdgpu_syncobj_timeline_test(void);<br>
&gt;&nbsp;&nbsp; <br>
&gt;&nbsp;&nbsp; CU_BOOL suite_syncobj_timeline_tests_enable(void)<br>
&gt;&nbsp;&nbsp; {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; int r;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; uint64_t cap = 0;<br>
&gt; &#43;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; r = drmGetCap(drm_amdgpu[0], DRM_CAP_SYNCOBJ_TIMELINE, &amp;cap);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; if (r || cap == 0)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return CU_FALSE;<br>
&gt; &#43;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return CU_TRUE;<br>
&gt;&nbsp;&nbsp; }<br>
&gt;&nbsp;&nbsp; <br>
<br>
</div>
</span></font>
</body>
</html>
Chunming Zhou May 17, 2019, 9:47 a.m. UTC | #3
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;
> >   }
> >
>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>ping, Could you help check in patch to gitlab? My connection to
      gitlab still has problem.</p>
    <p><br>
    </p>
    <p>Thanks,<br>
    </p>
    <p>-David<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2019年05月16日 19:03, Zhou,
      David(ChunMing) wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:-yw2q6u7xkjpo-i83eg9msudz1wgjn7w-b101h0-sfv5ag1noxjz2wg54r-iuw7ml-f519uls55cqypexnfa-et96uc-nx96jg5fu1d3-wn1hxg-td9bpo5n1nbv-wmnwfr84y609mm8lnpxqaf92-n4k5l3.1558004611599@email.android.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <div>could you help push this patch as well?<br>
        <br>
        Thanks,<br>
        -David<br>
        <br>
        -------- Original Message --------<br>
        Subject: Re: [PATCH libdrm] enable syncobj test depending on
        capability<br>
        From: "Koenig, Christian" <br>
        To: "Zhou, David(ChunMing)" ,<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
        CC: <br>
        <br>
      </div>
      <font size="2"><span style="font-size:11pt;">
          <div class="PlainText">Am 16.05.19 um 12:46 schrieb Chunming
            Zhou:<br>
            &gt; Feature is controlled by DRM_CAP_SYNCOBJ_TIMELINE drm
            capability.<br>
            &gt;<br>
            &gt; Signed-off-by: Chunming Zhou
            <a class="moz-txt-link-rfc2396E" href="mailto:david1.zhou@amd.com">&lt;david1.zhou@amd.com&gt;</a><br>
            <br>
            Reviewed-by: Christian König
            <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com">&lt;christian.koenig@amd.com&gt;</a><br>
            <br>
            &gt; ---<br>
            &gt;   include/drm/drm.h            | 1 +<br>
            &gt;   tests/amdgpu/syncobj_tests.c | 8 ++++++++<br>
            &gt;   2 files changed, 9 insertions(+)<br>
            &gt;<br>
            &gt; diff --git a/include/drm/drm.h b/include/drm/drm.h<br>
            &gt; index c893f3b4..532787bf 100644<br>
            &gt; --- a/include/drm/drm.h<br>
            &gt; +++ b/include/drm/drm.h<br>
            &gt; @@ -643,6 +643,7 @@ struct drm_gem_open {<br>
            &gt;   #define DRM_CAP_PAGE_FLIP_TARGET    0x11<br>
            &gt;   #define DRM_CAP_CRTC_IN_VBLANK_EVENT        0x12<br>
            &gt;   #define DRM_CAP_SYNCOBJ             0x13<br>
            &gt; +#define DRM_CAP_SYNCOBJ_TIMELINE     0x14<br>
            &gt;   <br>
            &gt;   /** DRM_IOCTL_GET_CAP ioctl argument type */<br>
            &gt;   struct drm_get_cap {<br>
            &gt; diff --git a/tests/amdgpu/syncobj_tests.c
            b/tests/amdgpu/syncobj_tests.c<br>
            &gt; index a0c627d7..869ed88e 100644<br>
            &gt; --- a/tests/amdgpu/syncobj_tests.c<br>
            &gt; +++ b/tests/amdgpu/syncobj_tests.c<br>
            &gt; @@ -22,6 +22,7 @@<br>
            &gt;   */<br>
            &gt;   <br>
            &gt;   #include "CUnit/Basic.h"<br>
            &gt; +#include "xf86drm.h"<br>
            &gt;   <br>
            &gt;   #include "amdgpu_test.h"<br>
            &gt;   #include "amdgpu_drm.h"<br>
            &gt; @@ -36,6 +37,13 @@ static void
            amdgpu_syncobj_timeline_test(void);<br>
            &gt;   <br>
            &gt;   CU_BOOL suite_syncobj_timeline_tests_enable(void)<br>
            &gt;   {<br>
            &gt; +     int r;<br>
            &gt; +     uint64_t cap = 0;<br>
            &gt; +<br>
            &gt; +     r = drmGetCap(drm_amdgpu[0],
            DRM_CAP_SYNCOBJ_TIMELINE, &amp;cap);<br>
            &gt; +     if (r || cap == 0)<br>
            &gt; +             return CU_FALSE;<br>
            &gt; +<br>
            &gt;        return CU_TRUE;<br>
            &gt;   }<br>
            &gt;   <br>
            <br>
          </div>
        </span></font>
    </blockquote>
    <br>
  </body>
</html>
Michel Dänzer May 17, 2019, 9:55 a.m. UTC | #4
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 .
Christian König May 17, 2019, 12:13 p.m. UTC | #5
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
Chunming Zhou May 17, 2019, 12:28 p.m. UTC | #6
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>Can you guy do that? Otherwise if kernel driver doesn't set that cap, test could fail.<br>
<br>
Thanks,<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability<br>
From: &quot;Koenig, Christian&quot; <br>
To: Michel Dänzer ,&quot;Zhou, David(ChunMing)&quot; ,&quot;Zhou, David(ChunMing)&quot; <br>
CC: dri-devel@lists.freedesktop.org<br>
<br>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 17.05.19 um 11:55 schrieb Michel Dänzer:<br>
&gt; [CAUTION: External Email]<br>
&gt;<br>
&gt; On 2019-05-17 11:47 a.m., zhoucm1 wrote:<br>
&gt;&gt; ping, Could you help check in patch to gitlab? My connection to gitlab<br>
&gt;&gt; still has problem.<br>
&gt; Please follow the process documented in include/drm/README for<br>
&gt; include/drm/drm.h .<br>
<br>
Yeah, the header should be updated separately to what is currently in <br>
drm-next (or drm-misc-next).<br>
<br>
And then we can update the fix on top of that,<br>
Christian.<br>
<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Earthling Michel Dänzer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://www.amd.com">
https://www.amd.com</a><br>
&gt; Libre software enthusiast&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mesa and X developer<br>
<br>
</div>
</span></font>
</body>
</html>
Christian König May 17, 2019, 1:43 p.m. UTC | #7
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">No, first of all I'm really busy with those TTM problems.<br>
<br>
And second I'm actually not very familiar with this either.<br>
<br>
Please just split the patch up into two, one updating the headers and one fixing the test case.<br>
<br>
Maybe that's enough for Michel,<br>
Christian.<br>
<br>
Am 17.05.19 um 14:28 schrieb Zhou, David(ChunMing):<br>
</div>
<blockquote type="cite" cite="mid:iuca3rriuy61ilmprn7wjpxafclwjn-par0kv-n5se1uvs8pejoxgl1d1tv9e7-suc50po1nq5dp8g58yk4yiap-pn8vbp-u5q05h-bqtpqfswj30t-5msp9f-xh7906-cs7026x7ja36kggkcls4qiau.1558096119187@email.android.com">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<div>Can you guy do that? Otherwise if kernel driver doesn't set that cap, test could fail.<br>
<br>
Thanks,<br>
-David<br>
<br>
-------- Original Message --------<br>
Subject: Re: [PATCH libdrm] enable syncobj test depending on capability<br>
From: &quot;Koenig, Christian&quot; <br>
To: Michel Dänzer ,&quot;Zhou, David(ChunMing)&quot; ,&quot;Zhou, David(ChunMing)&quot; <br>
CC: <a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">
dri-devel@lists.freedesktop.org</a><br>
<br>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 17.05.19 um 11:55 schrieb Michel Dänzer:<br>
&gt; [CAUTION: External Email]<br>
&gt;<br>
&gt; On 2019-05-17 11:47 a.m., zhoucm1 wrote:<br>
&gt;&gt; ping, Could you help check in patch to gitlab? My connection to gitlab<br>
&gt;&gt; still has problem.<br>
&gt; Please follow the process documented in include/drm/README for<br>
&gt; include/drm/drm.h .<br>
<br>
Yeah, the header should be updated separately to what is currently in <br>
drm-next (or drm-misc-next).<br>
<br>
And then we can update the fix on top of that,<br>
Christian.<br>
<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Earthling Michel Dänzer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://www.amd.com" moz-do-not-send="true">
https://www.amd.com</a><br>
&gt; Libre software enthusiast&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mesa and X developer<br>
<br>
</div>
</span></font></blockquote>
<br>
</body>
</html>
Michel Dänzer May 17, 2019, 2:28 p.m. UTC | #8
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"
diff mbox series

Patch

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;
 }