[Intel-xe] [PATCH v2 00/17] Cleanup registers and introduce xe_reg_*
Lucas De Marchi
lucas.demarchi at intel.com
Fri Apr 21 22:32:41 UTC 2023
Continuation of https://patchwork.freedesktop.org/series/116411/. Now
not only the trivial cleanup/renames are done, but also the harder
migration to xe's own type for registers. This is meant to replace our
uses of i915_reg_t and i915_mcr_reg_t.
Due to popular demand in this v2 the type safety between mcr/non-mcr
registers remain. Actually it's a bit more useful now since calling
xe_mmio_*() on a register defined in the header will fail since there's
no such `.reg` field in it.
Also reordered the patches a little bit to make the more mechanical
changes first so to allow easier review and let them be merged
regardless of the more controversial part.
When building with display, build breaks between these 2 patches:
drm/xe: Introduce xe_reg/xe_reg_mcr
drm/xe: Use XE_REG/XE_REG_MCR
I believe it's easier to review with those separates since the second is
a mechanical change. And also, we are bringing display to the top on
rebases, so in theory once the branch is rebased there won't be a build
break. I can squash them if preferred when applying though. I found a
way to remove the additional display CFLAGS in the Makefile, but
unfortunately there is more work needed on header deps to allow us to do
that.
Tested on a DG2 with/without display and didn't notice any regressions.
Lucas De Marchi (17):
drm/xe: Cleanup page-related defines
fixup! drm/i915/display: Remaining changes to make xe compile
fixup! drm/i915/display: Allow fbdev to allocate stolen memory
drm/xe: Rename RC0/RC6 macros
drm/xe: Rename instruction field to avoid confusion
drm/xe/guc: Rename GEN11_SOFT_SCRATCH for clarity
drm/xe/guc: Move GuC registers to regs/
drm/xe/guc: Convert GuC registers to REG_FIELD/REG_BIT
drm/xe: Drop gen prefixes and suffixes from registers
drm/xe: Use REG_FIELD/REG_BIT for all regs/*.h
drm/xe: Clarify register types on PAT programming
drm/xe/rtp: Improve magic macros for RTP tables
drm/xe: Introduce xe_reg/xe_reg_mcr
drm/xe: Use XE_REG/XE_REG_MCR
drm/xe: Annotate masked registers used by RTP
drm/xe: Plumb xe_reg_t into WAs, rtp, etc
drm/xe: Move helper macros to separate header
drivers/gpu/drm/i915/display/intel_fbdev.c | 4 +-
drivers/gpu/drm/xe/Makefile | 2 +-
drivers/gpu/drm/xe/display/xe_fb_pin.c | 23 +-
drivers/gpu/drm/xe/display/xe_plane_initial.c | 4 +-
drivers/gpu/drm/xe/regs/xe_engine_regs.h | 100 ++---
drivers/gpu/drm/xe/regs/xe_gpu_commands.h | 6 +-
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 358 +++++++++---------
drivers/gpu/drm/xe/regs/xe_guc_regs.h | 146 +++++++
drivers/gpu/drm/xe/regs/xe_reg_defs.h | 84 ++++
drivers/gpu/drm/xe/regs/xe_regs.h | 65 ++--
drivers/gpu/drm/xe/tests/xe_migrate.c | 15 +-
drivers/gpu/drm/xe/tests/xe_rtp_test.c | 51 ++-
drivers/gpu/drm/xe/xe_bo.h | 52 +--
drivers/gpu/drm/xe/xe_execlist.c | 8 +-
drivers/gpu/drm/xe/xe_force_wake.c | 18 +-
drivers/gpu/drm/xe/xe_ggtt.c | 42 +-
drivers/gpu/drm/xe/xe_gt.c | 4 +-
drivers/gpu/drm/xe/xe_gt_clock.c | 27 +-
drivers/gpu/drm/xe/xe_gt_mcr.c | 66 ++--
drivers/gpu/drm/xe/xe_gt_mcr.h | 11 +-
drivers/gpu/drm/xe/xe_guc.c | 52 ++-
drivers/gpu/drm/xe/xe_guc_ads.c | 16 +-
drivers/gpu/drm/xe/xe_guc_pc.c | 30 +-
drivers/gpu/drm/xe/xe_guc_reg.h | 151 --------
drivers/gpu/drm/xe/xe_huc.c | 6 +-
drivers/gpu/drm/xe/xe_hw_engine.c | 42 +-
drivers/gpu/drm/xe/xe_irq.c | 8 +-
drivers/gpu/drm/xe/xe_migrate.c | 73 ++--
drivers/gpu/drm/xe/xe_mmio.c | 7 +-
drivers/gpu/drm/xe/xe_mocs.c | 11 +-
drivers/gpu/drm/xe/xe_pat.c | 35 +-
drivers/gpu/drm/xe/xe_pcode_api.h | 6 +-
drivers/gpu/drm/xe/xe_pt.c | 40 +-
drivers/gpu/drm/xe/xe_reg_sr.c | 51 ++-
drivers/gpu/drm/xe/xe_reg_sr.h | 3 +-
drivers/gpu/drm/xe/xe_reg_sr_types.h | 10 +-
drivers/gpu/drm/xe/xe_reg_whitelist.c | 12 +-
drivers/gpu/drm/xe/xe_ring_ops.c | 8 +-
drivers/gpu/drm/xe/xe_rtp.c | 7 +-
drivers/gpu/drm/xe/xe_rtp.h | 106 ++----
drivers/gpu/drm/xe/xe_rtp_helpers.h | 49 +++
drivers/gpu/drm/xe/xe_rtp_types.h | 22 +-
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 2 +-
drivers/gpu/drm/xe/xe_tuning.c | 11 +-
drivers/gpu/drm/xe/xe_uc_fw.c | 2 +-
drivers/gpu/drm/xe/xe_vm.c | 20 +-
drivers/gpu/drm/xe/xe_wa.c | 178 ++++-----
drivers/gpu/drm/xe/xe_wopcm.c | 2 +-
48 files changed, 1044 insertions(+), 1002 deletions(-)
create mode 100644 drivers/gpu/drm/xe/regs/xe_guc_regs.h
delete mode 100644 drivers/gpu/drm/xe/xe_guc_reg.h
create mode 100644 drivers/gpu/drm/xe/xe_rtp_helpers.h
--
2.39.0
More information about the Intel-xe
mailing list