<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I can't judge if that UAPI is actually
      sufficient, but the rest still looks good to me.<br>
      <br>
      Acked-by: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a><br>
      <br>
      Christian.<br>
      <br>
      Am 16.04.19 um 15:15 schrieb Zhou, David(ChunMing):<br>
    </div>
    <blockquote type="cite"
cite="mid:g473ssb6g9in1c36xw9ju8l5wdtvp-gvzol4w0y5mw-vlv3bo-vpqqv0-zerdqu2r22c19rx4b444q5wxby0nnbgied56objhf-84ko14jpv2kg-7irzs22147wm852jmw-8a0k7hka8nozq4k7d5.1555420499452@email.android.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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>Reviewed-by: Chunming Zhou <a class="moz-txt-link-rfc2396E" href="mailto:david1.zhou@amd.com"><david1.zhou@amd.com></a> for
        series.<br>
        <br>
        -------- Original Message --------<br>
        Subject: [PATCH v2] drm: introduce a capability flag for syncobj
        timeline support<br>
        From: Lionel Landwerlin <br>
        To: <a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
        CC: Lionel Landwerlin ,"Koenig, Christian" ,Dave Airlie ,Daniel
        Vetter ,"Zhou, David(ChunMing)"
        <br>
        <br>
      </div>
      <font size="2"><span style="font-size:11pt;">
          <div class="PlainText">Unfortunately userspace users of this
            API cannot be publicly disclosed<br>
            yet.<br>
            <br>
            This commit effectively disables timeline syncobj ioctls for
            all<br>
            drivers. Each driver wishing to support this feature will
            need to<br>
            expose DRIVER_SYNCOBJ_TIMELINE.<br>
            <br>
            v2: Add uAPI capability check (Christian)<br>
            <br>
            Signed-off-by: Lionel Landwerlin
            <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a><br>
            Reviewed-by: Christian König
            <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a> (v1)<br>
            Cc: Dave Airlie <a class="moz-txt-link-rfc2396E" href="mailto:airlied@redhat.com"><airlied@redhat.com></a><br>
            Cc: Daniel Vetter <a class="moz-txt-link-rfc2396E" href="mailto:daniel.vetter@ffwll.ch"><daniel.vetter@ffwll.ch></a><br>
            Cc: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a><br>
            Cc: Chunming Zhou <a class="moz-txt-link-rfc2396E" href="mailto:david1.zhou@amd.com"><david1.zhou@amd.com></a><br>
            ---<br>
             drivers/gpu/drm/drm_ioctl.c   |  3 +++<br>
             drivers/gpu/drm/drm_syncobj.c | 10 +++++-----<br>
             include/drm/drm_drv.h         |  7 +++++++<br>
             include/uapi/drm/drm.h        |  1 +<br>
             4 files changed, 16 insertions(+), 5 deletions(-)<br>
            <br>
            diff --git a/drivers/gpu/drm/drm_ioctl.c
            b/drivers/gpu/drm/drm_ioctl.c<br>
            index d337f161909c..15ca94338d55 100644<br>
            --- a/drivers/gpu/drm/drm_ioctl.c<br>
            +++ b/drivers/gpu/drm/drm_ioctl.c<br>
            @@ -245,6 +245,9 @@ static int drm_getcap(struct drm_device
            *dev, void *data, struct drm_file *file_<br>
                     case DRM_CAP_SYNCOBJ:<br>
                             req->value = drm_core_check_feature(dev,
            DRIVER_SYNCOBJ);<br>
                             return 0;<br>
            +       case DRM_CAP_SYNCOBJ_TIMELINE:<br>
            +               req->value = drm_core_check_feature(dev,
            DRIVER_SYNCOBJ_TIMELINE);<br>
            +               return 0;<br>
                     }<br>
             <br>
                     /* Other caps only work with KMS drivers */<br>
            diff --git a/drivers/gpu/drm/drm_syncobj.c
            b/drivers/gpu/drm/drm_syncobj.c<br>
            index fb65f13d25cf..72a38ff6e3e4 100644<br>
            --- a/drivers/gpu/drm/drm_syncobj.c<br>
            +++ b/drivers/gpu/drm/drm_syncobj.c<br>
            @@ -755,7 +755,7 @@ drm_syncobj_transfer_ioctl(struct
            drm_device *dev, void *data,<br>
                     struct drm_syncobj_transfer *args = data;<br>
                     int ret;<br>
             <br>
            -       if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))<br>
            +       if (!drm_core_check_feature(dev,
            DRIVER_SYNCOBJ_TIMELINE))<br>
                             return -EOPNOTSUPP;<br>
             <br>
                     if (args->pad)<br>
            @@ -1106,7 +1106,7 @@ drm_syncobj_timeline_wait_ioctl(struct
            drm_device *dev, void *data,<br>
                     struct drm_syncobj **syncobjs;<br>
                     int ret = 0;<br>
             <br>
            -       if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))<br>
            +       if (!drm_core_check_feature(dev,
            DRIVER_SYNCOBJ_TIMELINE))<br>
                             return -EOPNOTSUPP;<br>
             <br>
                     if (args->flags &
            ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |<br>
            @@ -1210,7 +1210,7 @@
            drm_syncobj_timeline_signal_ioctl(struct drm_device *dev,
            void *data,<br>
                     uint32_t i, j;<br>
                     int ret;<br>
             <br>
            -       if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))<br>
            +       if (!drm_core_check_feature(dev,
            DRIVER_SYNCOBJ_TIMELINE))<br>
                             return -EOPNOTSUPP;<br>
             <br>
                     if (args->pad != 0)<br>
            @@ -1281,8 +1281,8 @@ int drm_syncobj_query_ioctl(struct
            drm_device *dev, void *data,<br>
                     uint32_t i;<br>
                     int ret;<br>
             <br>
            -       if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))<br>
            -               return -ENODEV;<br>
            +       if (!drm_core_check_feature(dev,
            DRIVER_SYNCOBJ_TIMELINE))<br>
            +               return -EOPNOTSUPP;<br>
             <br>
                     if (args->pad != 0)<br>
                             return -EINVAL;<br>
            diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h<br>
            index 5cc7f728ec73..68ca736c548d 100644<br>
            --- a/include/drm/drm_drv.h<br>
            +++ b/include/drm/drm_drv.h<br>
            @@ -91,6 +91,13 @@ enum drm_driver_feature {<br>
                      * submission.<br>
                      */<br>
                     DRIVER_SYNCOBJ                  = BIT(5),<br>
            +       /**<br>
            +        * @DRIVER_SYNCOBJ_TIMELINE:<br>
            +        *<br>
            +        * Driver supports the timeline flavor of
            &drm_syncobj for explicit<br>
            +        * synchronization of command submission.<br>
            +        */<br>
            +       DRIVER_SYNCOBJ_TIMELINE         = BIT(6),<br>
             <br>
                     /* IMPORTANT: Below are all the legacy flags, add
            new ones above. */<br>
             <br>
            diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h<br>
            index 236b01a1fabf..661d73f9a919 100644<br>
            --- a/include/uapi/drm/drm.h<br>
            +++ b/include/uapi/drm/drm.h<br>
            @@ -649,6 +649,7 @@ struct drm_gem_open {<br>
             #define DRM_CAP_PAGE_FLIP_TARGET        0x11<br>
             #define DRM_CAP_CRTC_IN_VBLANK_EVENT    0x12<br>
             #define DRM_CAP_SYNCOBJ         0x13<br>
            +#define DRM_CAP_SYNCOBJ_TIMELINE       0x14<br>
             <br>
             /** DRM_IOCTL_GET_CAP ioctl argument type */<br>
             struct drm_get_cap {<br>
            -- <br>
            2.21.0.392.gf8f6787159e<br>
            <br>
          </div>
        </span></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
dri-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/dri-devel">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a></pre>
    </blockquote>
    <br>
  </body>
</html>