Store pat index from xe_vma to xe_bo

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com>
---
 drivers/gpu/drm/xe/xe_pt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index de1030a47588..4b76db698878 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -1252,6 +1252,10 @@ __xe_pt_bind_vma(struct xe_tile *tile, struct xe_vma 
*vma, struct xe_exec_queue
                return ERR_PTR(-ENOMEM);
        }
 
+       if (xe_vma_bo(vma)) {
+               xe_vma_bo(vma)->pat_index = vma->pat_index;
+       }
+
        fence = xe_migrate_update_pgtables(tile->migrate,
                                           vm, xe_vma_bo(vma), q,
                                           entries, num_entries,
-- 
2.25.1

Reply via email to