drm/i915: Consolidate TLB invalidation flow
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 16 Feb 2023 09:21:23 +0000 (09:21 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 17 Feb 2023 10:31:58 +0000 (10:31 +0000)
commit1008266e31a0cb86cf8ac18eb77047283ae2b800
tree95c4fd075129b84aa1eadf865d3177c865e74710
parent01361096a33a81cc224e12e8cf06240f12737365
drm/i915: Consolidate TLB invalidation flow

As the logic for selecting the register and corresponsing values grew, the
code become a bit unsightly. Consolidate by storing the required values at
engine init time in the engine itself, and by doing so minimise the amount
of invariant platform and engine checks during each and every TLB
invalidation.

v2:
 * Fail engine probe if TLB invlidations registers are unknown.

v3:
 * Rebase.

v4:
 * Fix handling of GEN8_M2TCR. (Andrzej)

v5:
 * Tidy checkpatch warnings.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> # v1
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216092123.159085-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/gt/intel_engine_types.h
drivers/gpu/drm/i915/gt/intel_gt.c