Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/xe_guc_ads: save/restore OA registers and allowlist regs

Several OA registers and allowlist registers were missing from the
save/restore list for GuC and could be lost during an engine reset. Add
them to the list.

v2:
- Fix commit message (Umesh)
- Add missing closes (Ashutosh)

v3:
- Add missing fixes (Ashutosh)

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2249
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Suggested-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Suggested-by: John Harrison <john.c.harrison@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: stable@vger.kernel.org # v6.11+
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241023200716.82624-1-jonathan.cavitt@intel.com

authored by

Jonathan Cavitt and committed by
Ashutosh Dixit
55858fa7 85d3f9e8

+14
+14
drivers/gpu/drm/xe/xe_guc_ads.c
··· 15 15 #include "regs/xe_engine_regs.h" 16 16 #include "regs/xe_gt_regs.h" 17 17 #include "regs/xe_guc_regs.h" 18 + #include "regs/xe_oa_regs.h" 18 19 #include "xe_bo.h" 19 20 #include "xe_gt.h" 20 21 #include "xe_gt_ccs_mode.h" ··· 741 740 guc_mmio_regset_write_one(ads, regset_map, e->reg, count++); 742 741 } 743 742 743 + for (i = 0; i < RING_MAX_NONPRIV_SLOTS; i++) 744 + guc_mmio_regset_write_one(ads, regset_map, 745 + RING_FORCE_TO_NONPRIV(hwe->mmio_base, i), 746 + count++); 747 + 744 748 /* Wa_1607983814 */ 745 749 if (needs_wa_1607983814(xe) && hwe->class == XE_ENGINE_CLASS_RENDER) { 746 750 for (i = 0; i < LNCFCMOCS_REG_COUNT; i++) { ··· 753 747 XELP_LNCFCMOCS(i), count++); 754 748 } 755 749 } 750 + 751 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL0, count++); 752 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL1, count++); 753 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL2, count++); 754 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL3, count++); 755 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL4, count++); 756 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL5, count++); 757 + guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL6, count++); 756 758 757 759 return count; 758 760 }