Skip to contentSkip to conversation

drm/amdgpu: allocate shared fence slot in VA IOCTL

PATCH In review Christian König 3 participants 3 messages Jun 11, 2018 – Jun 12, 2018 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: allocate shared fence slot in VA IOCTL

Per VM BOs share the reservation object with the PD and so need to reserve a shared fence slot for the update.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
index 5fb156a01774..7f27cdb7afe2 100644
@@ -612,7 +612,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
 			return -ENOENT;
 		abo = gem_to_amdgpu_bo(gobj);
 		tv.bo = &abo->tbo;
-		tv.shared = false;
+		tv.shared = !!(abo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID);
 		list_add(&tv.head, &list);
 	} else {
 		gobj = NULL;
Signature · 6 lines
2.14.1

_______________________________________________
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): 20180611132353.37947-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by Chunming Zhou
#2 lore raw
Quoted 4 lines · Christian König

Per VM BOs share the reservation object with the PD and so need to reserve a shared fence slot for the update.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -0
index 5fb156a01774..7f27cdb7afe2 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · line 618

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
@@ -612,7 +612,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
  			return -ENOENT;
  		abo = gem_to_amdgpu_bo(gobj);
  		tv.bo = &abo->tbo;
-		tv.shared = false;
+		tv.shared = !!(abo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID);
  		list_add(&tv.head, &list);
  	} else {
  		gobj = NULL;

_______________________________________________
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): 98b185a3-21a6-6c19-c6fc-3e31c2544179-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#4 lore raw
Quoted 8 lines · On 06/12/2018 10:25 AM, zhoucm1 wrote:
Quoted 4 lines · Christian König

Per VM BOs share the reservation object with the PD and so need to reserve a shared fence slot for the update.

Quoted 16 lines
Quoted 16 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
index 5fb156a01774..7f27cdb7afe2 100644
@@ -612,7 +612,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
              return -ENOENT;
          abo = gem_to_amdgpu_bo(gobj);
          tv.bo = &abo->tbo;
-        tv.shared = false;
+        tv.shared = !!(abo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID);
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · line 618

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -0
          list_add(&tv.head, &list);
      } else {
          gobj = NULL;

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

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