drm/i915: Eliminate IS_MTL_MEDIA_STEP
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 21 Aug 2023 18:06:25 +0000 (11:06 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 21 Aug 2023 23:55:42 +0000 (16:55 -0700)
commit81af8abe65134f1b1872e6dfc4ba520c06ac363a
tree7c811f8f56a3002d4872ef8e6fcf87297d68a322
parent5a213086a025349361b5cf75c8fd4591d96a7a99
drm/i915: Eliminate IS_MTL_MEDIA_STEP

Stepping-specific media behavior shouldn't be tied to MTL as a platform,
but rather specifically to the Xe_LPM+ IP.  Future non-MTL platforms may
re-use this IP and will need to follow the exact same logic and apply
the same workarounds.  IS_MTL_MEDIA_STEP() is dropped in favor of
IS_MEDIA_GT_IP_STEP, which checks the media IP version associated with a
specific IP and also ensures that we're operating on the media GT, not
the primary GT.

v2:
 - Switch to the IS_GT_IP_STEP macro.
v3:
 - Switch back to long-form IS_MEDIA_GT_IP_STEP.  (Jani)
v4:
 - Build IS_MEDIA_GT_IP_STEP on top of IS_MEDIA_GT_IP_RANGE and
   IS_MEDIA_STEP building blocks and name the parameters from/until
   rather than begin/fixed..  (Jani)
v5:
 - Tweak macro comment wording.  (Gustavo)
 - Add a check to catch NULL gt in IS_MEDIA_GT_IP_RANGE; this allows it
   to be used safely on i915->media_gt, which may be NULL on some
   platforms.  (Gustavo)

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821180619.650007-16-matthew.d.roper@intel.com
drivers/gpu/drm/i915/gt/intel_gt.h
drivers/gpu/drm/i915/gt/intel_rc6.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_perf.c