[Intel-xe] [PATCH 0/9] Refactor kernel setting of PAT

Lucas De Marchi lucas.demarchi at intel.com
Mon Sep 25 22:10:40 UTC 2023


This reworks how we set PAT bits in both PPGTT and GGTT with the kernel
users in mind only. Allowing to set PAT by userspace is being added by
https://lore.kernel.org/all/20230829162840.73444-7-matthew.auld@intel.com/T/.
This can be seen as a follow up to the WIP patch that series depends on,
https://patchwork.freedesktop.org/series/122708/

I'm using that patch as a starting point, but as noted in my review
comments there, I think the overall abstraction we had and the ones we
were adding were not optimal. This is my attempt to translate my review
comments into the abstraction I was thinking of.

Lightly tested on DG2.

Lucas De Marchi (9):
  drm/xe: Normalize pte/pde encoding
  drm/xe: Remove check for vma == NULL
  drm/xe: Use vfunc for pte/pde ppgtt encoding
  drm/xe/migrate: Do not hand-encode pte
  drm/xe: Use vfunc to initialize PAT
  drm/xe/pat: Keep track of relevant indexes
  drm/xe: Use pat_index to encode pte
  drm/xe: Use vfunc for ggtt pte encoding
  fixup! drm/xe/display: Implement display support

 drivers/gpu/drm/xe/display/xe_fb_pin.c |  32 +++++--
 drivers/gpu/drm/xe/tests/xe_migrate.c  |   2 +-
 drivers/gpu/drm/xe/xe_bo.h             |  11 ++-
 drivers/gpu/drm/xe/xe_device.c         |   3 +
 drivers/gpu/drm/xe/xe_device_types.h   |  15 +++
 drivers/gpu/drm/xe/xe_ggtt.c           |  53 ++++++++---
 drivers/gpu/drm/xe/xe_ggtt.h           |   1 -
 drivers/gpu/drm/xe/xe_ggtt_types.h     |   9 ++
 drivers/gpu/drm/xe/xe_migrate.c        |  34 ++++---
 drivers/gpu/drm/xe/xe_pat.c            |  68 +++++++++++---
 drivers/gpu/drm/xe/xe_pat.h            |  11 +++
 drivers/gpu/drm/xe/xe_pt.c             | 109 ++--------------------
 drivers/gpu/drm/xe/xe_pt.h             |   6 --
 drivers/gpu/drm/xe/xe_pt_types.h       |  19 ++++
 drivers/gpu/drm/xe/xe_vm.c             | 124 ++++++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_vm_types.h       |   2 +
 16 files changed, 337 insertions(+), 162 deletions(-)

-- 
2.40.1



More information about the Intel-xe mailing list