drm/i915/xe2lpd: Move registers to PICA
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 26 Jan 2024 22:46:37 +0000 (14:46 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 30 Jan 2024 15:20:25 +0000 (07:20 -0800)
commitfe4c6ff50c68aa467f04c376fa3cf2a60e62c07d
tree3898dcc55097875aad22d9cd395ccab9d55810a4
parentd5c7854b50e634097da5dd6d221997ecf31ec8c1
drm/i915/xe2lpd: Move registers to PICA

Some registers for DDI A/B moved to PICA and now follow the same format
as the ones for the PORT_TC ports. The wrapper here deals with 2 issues:

- Share the implementation between xe2lpd and previous
  platforms: there are minor layout changes, it's mostly the
  register location that changed
- Handle offsets after TC ports

v2:
  - Explain better the trick to use just the second range (Matt Roper)
  - Add missing conversions after rebase (Matt Roper)
  - Use macro instead of inline function, avoiding includes in the
    header (Jani)
  - Prefix old macros with underscore so they don't get used by mistake,
    and name the new ones using the previous names
v3: Use the same logic for the recently-introduced XELPDP_PORT_MSGBUS_TIMER
    (Gustavo)

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240126224638.4132016-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_cx0_phy.c
drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_tc.c