summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_bo.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-07-20 06:44:25 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:37:53 +0300
commit1655c893af08997175e3404039e79f384c925ee3 (patch)
tree3bcbc64dc66e15f07b143b03444bb54463d75107 /drivers/gpu/drm/xe/xe_bo.c
parent8f33b4f054fc29a4774d8d10116ef460faeb84a8 (diff)
downloadlinux-1655c893af08997175e3404039e79f384c925ee3.tar.xz
drm/xe: Reduce the number list links in xe_vma
Combine the userptr, rebind, and destroy links into a union as the lists these links belong to are mutually exclusive. v2: Adjust which lists are combined (Thomas H) v3: Add kernel doc why this is safe (Thomas H), remove related change of list_del_init -> list_del (Rodrigo) Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.c')
-rw-r--r--drivers/gpu/drm/xe/xe_bo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 49c80e95222b..a78ac158e967 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -476,8 +476,10 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,
}
xe_vm_assert_held(vm);
- if (list_empty(&vma->rebind_link) && vma->tile_present)
- list_add_tail(&vma->rebind_link, &vm->rebind_list);
+ if (list_empty(&vma->combined_links.rebind) &&
+ vma->tile_present)
+ list_add_tail(&vma->combined_links.rebind,
+ &vm->rebind_list);
if (vm_resv_locked)
dma_resv_unlock(xe_vm_resv(vm));