Skip to content

Cleaning up code related to VRAM regions and its initialization - part 1

Piórkowski, Piotr intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- fix "'ttm' not described in 'xe_vram_region'"

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Rename struct xe_mem_region to struct xe_vram_regiondrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_device_types.h drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +1 more+13 -130 replies
2/2drm/xe: Move VRAM manager to struct xe_vram_regiondrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_device_types.h drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +3 more+13 -160 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchRodrigo Vivi
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] Cleaning up code related to VRAM regions and its initialization - part 1

From: Piotr Piórkowski <[email protected]>

I would like to reorganize the code in the Xe driver regarding VRAM regions, in order to allow in the future easier extension with more VRAM regions and other than per tile ways to manage allocations in VRAM.
I would like to start with such simple changes as renaming the structure xe_mem_region to xe_vram_region, to stop pretending that we use it for something other than VRAM regions, and in the next patch move to this structure, the field responsible for the TTM manager - this will allow us to keep the things needed to manage allocations in VRAM in one place.

In future patches, I would like to make some changes in the initialization of VRAM regions, and allow for dynamic allocation of these regions depending on whether or not we need them in a particular case. Finally, I would like to introduce the possibility of a separate VRAM region which would be dedicated only for kernel structures, which may be necessary in the case of SRIOV for future platforms.

Cc Thomas Hellström <[email protected]>
Cc Matthew Brost <[email protected]>
Cc Matthew Auld <[email protected]>
Cc Farah Kassabri <[email protected]>
Cc Rodrigo Vivi <[email protected]>

v2:
- remove xe_vram_region pointer from xe_ttm_vram_mgr
- stop use dynamic alloaction for xe_ttm_vram_mgr in xe_vram_region
- rename struct xe_ttm_vram_mgr vram_mgr to ttm
v3:
- fix "'ttm' not described in 'xe_vram_region'"

Piotr Piórkowski (2):
drm/xe: Rename struct xe_mem_region to struct xe_vram_region drm/xe: Move VRAM manager to struct xe_vram_region

 drivers/gpu/drm/xe/xe_bo.c                 | 22 ++++++++++++++--------
 drivers/gpu/drm/xe/xe_device_types.h       | 14 +++++++-------
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c |  2 +-
 drivers/gpu/drm/xe/xe_tile.c               |  6 +-----
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c       |  3 +--
 drivers/gpu/drm/xe/xe_ttm_vram_mgr_types.h |  4 ----
 6 files changed, 24 insertions(+), 27 deletions(-)
Signature · 1 line
2.34.1