drm: Branch 'master'

[email protected] (Alex Deucher) Thu, 30 Nov 2017 03:15:48 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 amdgpu/amdgpu.h    |   15 +++++++++++++++
 amdgpu/amdgpu_cs.c |   10 ++++++++++
 2 files changed, 25 insertions(+)

New commits:
commit 1749d56ea00f350a74f662bdad82bcafa19889da
Author: David Mao <[email protected]>
Date:   Tue Nov 28 11:22:26 2017 +0800

    amdgpu: Adding amdgpu_cs_create_syncobj2 to create syncobj as signaled initially
    
    Signed-off-by: David Mao <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>

diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index df85a24c..c95cb03c 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1344,6 +1344,21 @@ const char *amdgpu_get_marketing_name(amdgpu_device_handle dev);
 /**
  *  Create kernel sync object
  *
+ * \param   dev         - \c [in]  device handle
+ * \param   flags       - \c [in]  flags that affect creation
+ * \param   syncobj     - \c [out] sync object handle
+ *
+ * \return   0 on success\n
+ *          <0 - Negative POSIX Error code
+ *
+*/
+int amdgpu_cs_create_syncobj2(amdgpu_device_handle dev,
+			      uint32_t  flags,
+			      uint32_t *syncobj);
+
+/**
+ *  Create kernel sync object
+ *
  * \param   dev	      - \c [in]  device handle
  * \param   syncobj   - \c [out] sync object handle
  *
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index b9fc01e7..9e157a84 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -606,6 +606,16 @@ int amdgpu_cs_destroy_semaphore(amdgpu_semaphore_handle sem)
 	return amdgpu_cs_unreference_sem(sem);
 }
 
+int amdgpu_cs_create_syncobj2(amdgpu_device_handle dev,
+			      uint32_t  flags,
+			      uint32_t *handle)
+{
+	if (NULL == dev)
+		return -EINVAL;
+
+	return drmSyncobjCreate(dev->fd, flags, handle);
+}
+
 int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
 			     uint32_t *handle)
 {

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

--
_______________________________________________
Dri-patches mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-patches