<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Hi Andres,
<div>The explicit sync should not be used for DrI3 and DRI2 but for cross process memory sharing, right?</div>
<div>We still have to rely on implicit sync to guarantee the. Correct order of rendering and present.</div>
<div>Could you confirm?</div>
<div><br>
</div>
<div>Thanks.<br>
<br>
<div id="AppleMailSignature">Sent from my iPhone</div>
<div><br>
On 19 Sep 2017, at 9:57 PM, Andres Rodriguez <<a href="mailto:andresx7@gmail.com">andresx7@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div><span></span><br>
<span></span><br>
<span>On 2017-09-19 09:24 AM, Christian König wrote:</span><br>
<blockquote type="cite"><span>Am 19.09.2017 um 14:59 schrieb Andres Rodriguez:</span><br>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Introduce a flag to signal that access to a BO will be synchronized</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>through an external mechanism.</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Currently all buffers shared between contexts are subject to implicit</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>synchronization. However, this is only required for protocols that</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>currently don't support an explicit synchronization mechanism (DRI2/3).</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>This patch introduces the AMDGPU_GEM_CREATE_EXPLICIT_SYNC, so that</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>users can specify when it is safe to disable implicit sync.</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>v2: only disable explicit sync in amdgpu_cs_ioctl</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Signed-off-by: Andres Rodriguez <<a href="mailto:andresx7@gmail.com">andresx7@gmail.com</a>></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>---</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Hey Christian,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>I kept the amdgpu_bo_explicit_sync() function since it makes it easier</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>to maintain an 80 line wrap in amdgpu_cs_sync_rings()</span><br>
</blockquote>
</blockquote>
<blockquote type="cite"><span>Looks good to me, but I would like to see the matching user space code as well.</span><br>
</blockquote>
<blockquote type="cite"><span>Especially I have no idea how you want to have DRI3 compatibility with that?</span><br>
</blockquote>
<span></span><br>
<span>No problem. I'm fixing the radv patch atm and I'll re-send it for your reference.</span><br>
<span></span><br>
<span>Regards,</span><br>
<span>Andres</span><br>
<span></span><br>
<blockquote type="cite"><span>Regards,</span><br>
</blockquote>
<blockquote type="cite"><span>Christian.</span><br>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Regards,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>Andres</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +++-</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 8 ++++++++</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 +++++--</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 3 ++-</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++--</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> include/uapi/drm/amdgpu_drm.h | 2 ++</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> 8 files changed, 29 insertions(+), 11 deletions(-)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span></span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index db97e78..bc8a403 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -704,7 +704,8 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> list_for_each_entry(e, &p->validated, tv.head) {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct reservation_object *resv = e->robj->tbo.resv;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- r = amdgpu_sync_resv(p->adev, &p->job->sync, resv, p->filp);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ r = amdgpu_sync_resv(p->adev, &p->job->sync, resv, p->filp,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ amdgpu_bo_explicit_sync(e->robj));</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (r)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> return r;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index b0d45c8..21e9936 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -212,7 +212,9 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> AMDGPU_GEM_CREATE_NO_CPU_ACCESS |</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> AMDGPU_GEM_CREATE_CPU_GTT_USWC |</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> AMDGPU_GEM_CREATE_VRAM_CLEARED |</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- AMDGPU_GEM_CREATE_VM_ALWAYS_VALID))</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_GEM_CREATE_EXPLICIT_SYNC))</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> return -EINVAL;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> /* reject invalid gem domains */</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index c26ef53..428aae0 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -193,6 +193,14 @@ static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> }</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> }</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+/**</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ * amdgpu_bo_explicit_sync - return whether the bo is explicitly synced</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ */</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+{</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ return bo->flags & AMDGPU_GEM_CREATE_EXPLICIT_SYNC;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+}</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> int amdgpu_bo_create(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> unsigned long size, int byte_align,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> bool kernel, u32 domain, u64 flags,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index c586f44..a4bf21f 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -169,14 +169,14 @@ int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> *</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> * @sync: sync object to add fences from reservation object to</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> * @resv: reservation object with embedded fence</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- * @shared: true if we should only sync to the exclusive fence</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ * @explicit_sync: true if we should only sync to the exclusive fence</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> *</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> * Sync to the fence</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> */</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> int amdgpu_sync_resv(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct amdgpu_sync *sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct reservation_object *resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- void *owner)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ void *owner, bool explicit_sync)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct reservation_object_list *flist;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct dma_fence *f;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -191,6 +191,9 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> f = reservation_object_get_excl(resv);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_sync_fence(adev, sync, f);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ if (explicit_sync)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ return r;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> flist = reservation_object_get_list(resv);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (!flist || r)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> return r;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index dc76879..70d7e3a 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -45,7 +45,8 @@ int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> int amdgpu_sync_resv(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct amdgpu_sync *sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct reservation_object *resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- void *owner);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ void *owner,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ bool explicit_sync);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct amdgpu_ring *ring);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct dma_fence *amdgpu_sync_get_fence(struct amdgpu_sync *sync);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index c9c059d..bd0b03a 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -1510,7 +1510,8 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> job->vm_needs_flush = vm_needs_flush;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (resv) {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_sync_resv(adev, &job->sync, resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- AMDGPU_FENCE_OWNER_UNDEFINED);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_FENCE_OWNER_UNDEFINED,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (r) {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> DRM_ERROR("sync failed (%d).\n", r);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> goto error_free;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -1602,7 +1603,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (resv) {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_sync_resv(adev, &job->sync, resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- AMDGPU_FENCE_OWNER_UNDEFINED);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_FENCE_OWNER_UNDEFINED, false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (r) {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> DRM_ERROR("sync failed (%d).\n", r);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> goto error_free;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index 2df254c..9965d68 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -987,7 +987,7 @@ static int amdgpu_vm_wait_pd(struct amdgpu_device *adev, struct amdgpu_vm *vm,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> int r;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> amdgpu_sync_create(&sync);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- amdgpu_sync_resv(adev, &sync, vm-><a href="http://root.base.bo">root.base.bo</a>->tbo.resv, owner);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ amdgpu_sync_resv(adev, &sync, vm-><a href="http://root.base.bo">root.base.bo</a>->tbo.resv, owner, false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_sync_wait(&sync, true);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> amdgpu_sync_free(&sync);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -1128,11 +1128,11 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> amdgpu_ring_pad_ib(ring, params.ib);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> amdgpu_sync_resv(adev, &job->sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> parent-><a href="http://base.bo">base.bo</a>->tbo.resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- AMDGPU_FENCE_OWNER_VM);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_FENCE_OWNER_VM, false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (shadow)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> amdgpu_sync_resv(adev, &job->sync,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> shadow->tbo.resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- AMDGPU_FENCE_OWNER_VM);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ AMDGPU_FENCE_OWNER_VM, false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> WARN_ON(params.ib->length_dw > ndw);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_job_submit(job, ring, &vm->entity,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -1595,7 +1595,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> goto error_free;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> r = amdgpu_sync_resv(adev, &job->sync, vm-><a href="http://root.base.bo">root.base.bo</a>->tbo.resv,</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>- owner);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+ owner, false);</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> if (r)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> goto error_free;</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>index 69d64e5..96fcde8 100644</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>--- a/include/uapi/drm/amdgpu_drm.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+++ b/include/uapi/drm/amdgpu_drm.h</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>@@ -91,6 +91,8 @@ extern "C" {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> /* Flag that BO is always valid in this VM */</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> #define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+/* Flag that BO sharing will be explicitly synchronized */</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span>+#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7)</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> struct drm_amdgpu_gem_create_in {</span><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><span> /** the requested memory size */</span><br>
</blockquote>
</blockquote>
<span>_______________________________________________</span><br>
<span>amd-gfx mailing list</span><br>
<span><a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a></span><br>
<span><a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></span><br>
</div>
</blockquote>
</div>
</body>
</html>