mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/i915/xehp: Check for faults on primary GAM
On Xe_HP the fault registers are now in a multicast register range. However as part of the GAM these registers follow special rules and we need only read from the "primary" GAM's instance to get the information we need. So a single intel_gt_mcr_read_any() (which will automatically steer to the primary GAM) is sufficient; we don't need to loop over each instance of the MCR register. v2: - Update more instances of fault registers. (Bala) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-7-matthew.d.roper@intel.com
This commit is contained in:
@@ -1221,7 +1221,10 @@ static void engine_record_registers(struct intel_engine_coredump *ee)
|
||||
if (GRAPHICS_VER(i915) >= 6) {
|
||||
ee->rc_psmi = ENGINE_READ(engine, RING_PSMI_CTL);
|
||||
|
||||
if (GRAPHICS_VER(i915) >= 12)
|
||||
if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50))
|
||||
ee->fault_reg = intel_gt_mcr_read_any(engine->gt,
|
||||
XEHP_RING_FAULT_REG);
|
||||
else if (GRAPHICS_VER(i915) >= 12)
|
||||
ee->fault_reg = intel_uncore_read(engine->uncore,
|
||||
GEN12_RING_FAULT_REG);
|
||||
else if (GRAPHICS_VER(i915) >= 8)
|
||||
@@ -1820,7 +1823,12 @@ static void gt_record_global_regs(struct intel_gt_coredump *gt)
|
||||
if (GRAPHICS_VER(i915) == 7)
|
||||
gt->err_int = intel_uncore_read(uncore, GEN7_ERR_INT);
|
||||
|
||||
if (GRAPHICS_VER(i915) >= 12) {
|
||||
if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
|
||||
gt->fault_data0 = intel_gt_mcr_read_any((struct intel_gt *)gt->_gt,
|
||||
XEHP_FAULT_TLB_DATA0);
|
||||
gt->fault_data1 = intel_gt_mcr_read_any((struct intel_gt *)gt->_gt,
|
||||
XEHP_FAULT_TLB_DATA1);
|
||||
} else if (GRAPHICS_VER(i915) >= 12) {
|
||||
gt->fault_data0 = intel_uncore_read(uncore,
|
||||
GEN12_FAULT_TLB_DATA0);
|
||||
gt->fault_data1 = intel_uncore_read(uncore,
|
||||
|
||||
Reference in New Issue
Block a user