Skip to contentSkip to conversation

drm/amdgpu: use amdgpu_vm_get_pd_bo in the GEM code

PATCH In review Christian König 2 participants 2 messages Sep 29, 2016 1 message not in the archive

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

PATCH 1/1 drm/amdgpu: use amdgpu_vm_get_pd_bo in the GEM code

From: Christian König <[email protected]>

Instead of messing with the PD directly.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 -4
index 8ff90fe..fd0c13b 100644
@@ -555,7 +555,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_fpriv *fpriv = filp->driver_priv;
 	struct amdgpu_bo *abo;
 	struct amdgpu_bo_va *bo_va;
-	struct ttm_validate_buffer tv, tv_pd;
+	struct amdgpu_bo_list_entry vm_pd;
+	struct ttm_validate_buffer tv;
 	struct ww_acquire_ctx ticket;
 	struct list_head list, duplicates;
 	uint32_t invalid_flags, va_flags = 0;
@@ -600,9 +601,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
 	tv.shared = true;
 	list_add(&tv.head, &list);
 
-	tv_pd.bo = &fpriv->vm.page_directory->tbo;
-	tv_pd.shared = true;
-	list_add(&tv_pd.head, &list);
+	amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd);
 
 	r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates);
 	if (r) {
Signature · 6 lines
2.5.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): 1475151264-31470-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 5 lines · Christian König

From: Christian König <[email protected]>

Instead of messing with the PD directly.

Quoted 32 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 -5
index 8ff90fe..fd0c13b 100644
@@ -555,7 +555,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        struct amdgpu_fpriv *fpriv = filp->driver_priv;
        struct amdgpu_bo *abo;
        struct amdgpu_bo_va *bo_va;
-       struct ttm_validate_buffer tv, tv_pd;
+       struct amdgpu_bo_list_entry vm_pd;
+       struct ttm_validate_buffer tv;
        struct ww_acquire_ctx ticket;
        struct list_head list, duplicates;
        uint32_t invalid_flags, va_flags = 0;
@@ -600,9 +601,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        tv.shared = true;
        list_add(&tv.head, &list);
 
-       tv_pd.bo = &fpriv->vm.page_directory->tbo;
-       tv_pd.shared = true;
-       list_add(&tv_pd.head, &list);
+       amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd);
 
        r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates);
        if (r) {
--

2.5.0

Quoted 4 lines

_______________________________________________
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