[PATCH 0/2] drm/xe: Refactor BO flags

Lucas De Marchi lucas.demarchi at intel.com
Thu Mar 14 05:26:17 UTC 2024


Change the flag names to follow a specific pattern. There shouldn't be
any change in behavior here. The removal of CREATE name is up for
debate; it seemed appropriate to remove, but let's hear what others
think.

Next step that I'm thinkig about doing is to remove
XE_BO_FLAG_VRAM_IF_DGFX(). For that, during the tile initialization we
set a default_bo_placement like:

	if (IS_DGFX(xe))
		tile->default_bo_placement = XE_BO_FLAG_VRAM0 << (tile)->id;
	else
		tile->default_bo_placement = XE_BO_FLAG_SYSTEM;

Still need to check all callers because some are passing tile to the
create function, but root tile to the placement. I'm not sure yet if
that was intended or just an accident.  If the latter, then we could
very well leave the placement to the xe_bo_create*() when no placement
is set by the caller.  Thoughts?

Lucas De Marchi (2):
  drm/xe: Stop passing user flag to xe_bo_create_user()
  drm/xe: Normalize bo flags macros

 .../xe/compat-i915-headers/i915_gem_stolen.h  |   2 +-
 drivers/gpu/drm/xe/display/intel_fb_bo.c      |   8 +-
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c   |  16 +--
 drivers/gpu/drm/xe/display/xe_dsb_buffer.c    |   4 +-
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |  16 +--
 drivers/gpu/drm/xe/display/xe_hdcp_gsc.c      |   4 +-
 drivers/gpu/drm/xe/display/xe_plane_initial.c |   6 +-
 drivers/gpu/drm/xe/tests/xe_bo.c              |   4 +-
 drivers/gpu/drm/xe/tests/xe_dma_buf.c         |  54 +++++-----
 drivers/gpu/drm/xe/tests/xe_migrate.c         |  20 ++--
 drivers/gpu/drm/xe/xe_bo.c                    | 102 +++++++++---------
 drivers/gpu/drm/xe/xe_bo.h                    |  41 ++++---
 drivers/gpu/drm/xe/xe_bo_evict.c              |   2 +-
 drivers/gpu/drm/xe/xe_dma_buf.c               |   2 +-
 drivers/gpu/drm/xe/xe_ggtt.c                  |   8 +-
 drivers/gpu/drm/xe/xe_gsc.c                   |   8 +-
 drivers/gpu/drm/xe/xe_gsc_proxy.c             |   4 +-
 drivers/gpu/drm/xe/xe_guc_ads.c               |   4 +-
 drivers/gpu/drm/xe/xe_guc_ct.c                |   4 +-
 drivers/gpu/drm/xe/xe_guc_hwconfig.c          |   4 +-
 drivers/gpu/drm/xe/xe_guc_log.c               |   4 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                |   4 +-
 drivers/gpu/drm/xe/xe_huc.c                   |   4 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   4 +-
 drivers/gpu/drm/xe/xe_lmtt.c                  |   4 +-
 drivers/gpu/drm/xe/xe_lrc.c                   |   4 +-
 drivers/gpu/drm/xe/xe_memirq.c                |   8 +-
 drivers/gpu/drm/xe/xe_migrate.c               |   4 +-
 drivers/gpu/drm/xe/xe_pt.c                    |  10 +-
 drivers/gpu/drm/xe/xe_sa.c                    |   4 +-
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c        |   2 +-
 drivers/gpu/drm/xe/xe_uc_fw.c                 |   2 +-
 32 files changed, 183 insertions(+), 184 deletions(-)

-- 
2.43.0



More information about the Intel-xe mailing list