[PATCH v4 0/6] drm/xe: Make struct xe_ggtt private.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Oct 9 12:51:08 UTC 2024


Sent as a separate series.

I have merged the patches to make pt_ops and ggtt private, and reworked xe_fb_pin.c

xe_fb_pin.c had the problem that some parts belong there, while others belong to xe_ggtt,
I'm hoping that with the callback function to populate the GGTT node, I've fixed the layering
violation that would have to happen otherwise.

I've solved it by creating a xe_ggtt_node_insert_transform() function that calls back into xe_fb_pin.c
to populate a given xe_ggtt_node. This way xe_fb_pin can still write a rotated GGTT, while outside
the scope of this function the details are hidden.

Writing DPT requires the same encoding as GGTT, but since it's a normal bo it only needs access to the
GGTT encoding function. With the insert transformation function being the only way to write to GGTT,
it should be safe to export the encoding only.

The display quirks stay in xe_fb_pin.c, while the details of GGTT stay in xe_ggtt.c now!

Maarten Lankhorst (6):
  drm/xe: Use xe_ggtt_map_bo_unlocked for resume
  drm/xe: Add xe_ggtt_might_lock
  drm/xe: Add xe_ggtt_alloc
  drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT
  drm/xe/display: Dont poke into GGTT internals to fill a DPT
  drm/xe: Move struct xe_ggtt to xe_ggtt.c

 drivers/gpu/drm/xe/display/xe_fb_pin.c        | 146 +++++++--------
 drivers/gpu/drm/xe/display/xe_plane_initial.c |   6 +-
 drivers/gpu/drm/xe/xe_bo.c                    |   2 +-
 drivers/gpu/drm/xe/xe_bo_evict.c              |   9 +-
 drivers/gpu/drm/xe/xe_ggtt.c                  | 171 ++++++++++++++++--
 drivers/gpu/drm/xe/xe_ggtt.h                  |  17 +-
 drivers/gpu/drm/xe/xe_ggtt_types.h            |  53 +-----
 drivers/gpu/drm/xe/xe_tile.c                  |   4 +-
 8 files changed, 245 insertions(+), 163 deletions(-)

-- 
2.45.2



More information about the Intel-xe mailing list