OSDN Git Service

drm/i915: Parameterize MI_PREDICATE registers
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 27 Jan 2022 23:43:32 +0000 (15:43 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 2 Feb 2022 15:52:23 +0000 (07:52 -0800)
commite71a74122863fd8acd23ab772ab4f7c3a378aa66
treee93a0a249996e002fc53cea12746c254b6ae93fa
parent7d296f369d38e12b1f9c552d8635eb0caef71095
drm/i915: Parameterize MI_PREDICATE registers

The various MI_PREDICATE registers have per-engine instances.  Today we
only utilize the RCS0 instance of each, but that will likely change in
the future; switch to parameterized register definitions to make these
easier to work with going forward.

Of special note is MI_PREDICATE_RESULT_2; we only use it in one place in
the driver today in HSW-specific code.  It turns out that the bspec
(page 94) lists two different offsets for this register on HSW; one is
in the standard location shared by all other platforms (base + 0x3bc)
and the other is an unusual location (0x2214).  We're using the second,
non-standard offset in i915 today; that offset doesn't exist on any
other platforms (and it's not even 100% clear that it's correct for HSW)
so I've renamed the current non-standard definition to
HSW_MI_PREDICATE_RESULT_2; the new cross-platform parameterized macro
(which is still unused at the moment) uses the standard offset.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-5-matthew.d.roper@intel.com
drivers/gpu/drm/i915/gt/intel_engine_regs.h
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/i915_cmd_parser.c
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_reg.h