Skip to contentSkip to conversation

drm/amdgpu: fix amdgpu_sync_resv v2

PATCH In review Christian König 2 participants 3 messages Nov 24, 2017 – Nov 29, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix amdgpu_sync_resv v2

Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need to wait for pipelined moves in the shared fences list.

v2: fix typo

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +2 -5
index a4bf21f8f1c1..bbbc40d630a0 100644
@@ -191,9 +191,6 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
 	f = reservation_object_get_excl(resv);
 	r = amdgpu_sync_fence(adev, sync, f);
 
-	if (explicit_sync)
-		return r;
-
 	flist = reservation_object_get_list(resv);
 	if (!flist || r)
 		return r;
@@ -212,11 +209,11 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
 			     (fence_owner == AMDGPU_FENCE_OWNER_VM)))
 				continue;
 
-			/* Ignore fence from the same owner as
+			/* Ignore fence from the same owner and explicit one as
 			 * long as it isn't undefined.
 			 */
 			if (owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
-			    fence_owner == owner)
+			    (fence_owner == owner || explicit_sync))
 				continue;
 		}
 
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171124124935.24638-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Hi Andres,

just a gentle ping to see if you have noticed this.

Thanks,
Christian.

Am 24.11.2017 um 13:49 schrieb Christian König:

Quoted 28 lines

Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need to wait for pipelined moves in the shared fences list.

v2: fix typo

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +0 -3
index a4bf21f8f1c1..bbbc40d630a0 100644
@@ -191,9 +191,6 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
  	f = reservation_object_get_excl(resv);
  	r = amdgpu_sync_fence(adev, sync, f);
 
-	if (explicit_sync)
-		return r;
-
  	flist = reservation_object_get_list(resv);
  	if (!flist || r)
  		return r;
@@ -212,11 +209,11 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
  			     (fence_owner == AMDGPU_FENCE_OWNER_VM)))
  				continue;
 

drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c int amdgpu_sync_resv(struct amdgpu_device *adev, · line 219

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +2 -2
-			/* Ignore fence from the same owner as
+			/* Ignore fence from the same owner and explicit one as
  			 * long as it isn't undefined.
  			 */
  			if (owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
-			    fence_owner == owner)
+			    (fence_owner == owner || explicit_sync))
  				continue;
  		}
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): b4f12864-9073-47bb-6ba1-cd1fae3b29c9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#4 lore raw
Quoted 14 lines · Christian König

Hi Andres,

just a gentle ping to see if you have noticed this.

Thanks,
Christian.

Am 24.11.2017 um 13:49 schrieb Christian König:

Quoted 6 lines

Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need to wait for pipelined moves in the shared fences list.

v2: fix typo

Hi Christian,

Sorry, last few weeks have been a little hectic.

This patch looks good to me. You can add:

The steamvr explicit sync use cases are untouched by this patch, so we should be good on that front as well.

Kind Regards,
Andres

Quoted 21 lines
Quoted 21 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 ++-----

  1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +0 -4
index a4bf21f8f1c1..bbbc40d630a0 100644
@@ -191,9 +191,6 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
       f = reservation_object_get_excl(resv);
       r = amdgpu_sync_fence(adev, sync, f);
-    if (explicit_sync)
-        return r;
-
       flist = reservation_object_get_list(resv);
       if (!flist || r)
           return r;
@@ -212,11 +209,11 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
                    (fence_owner == AMDGPU_FENCE_OWNER_VM)))
                   continue;
-            /* Ignore fence from the same owner as
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +1 -0
+            /* Ignore fence from the same owner and explicit one as
                * long as it isn't undefined.
                */

              if (owner != AMDGPU_FENCE_OWNER_UNDEFINED && -                fence_owner == owner)
+                (fence_owner == owner || explicit_sync)) continue;
          }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx