[Intel-xe] [PATCH v2 00/11] Refactor kernel setting of PAT

Lucas De Marchi lucas.demarchi at intel.com
Tue Sep 26 22:36:20 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.

v2:
  - Fix kunit
  - Fix using wrong PAT table for DG2
  - Handle other review comments from v1

Lightly tested on DG2.

Lucas De Marchi (11):
  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/dg2: Fix using wrong PAT table
  drm/xe/pat: Prefer the arch/IP names
  drm/xe/pat: Keep track of relevant indexes
  drm/xe: Use pat_index to encode pde/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             |   8 +-
 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            | 160 ++++++++++++++++---------
 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             | 130 +++++++++++++++++++-
 drivers/gpu/drm/xe/xe_vm_types.h       |   2 +
 16 files changed, 390 insertions(+), 204 deletions(-)

-- 
2.40.1



More information about the Intel-xe mailing list