All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe/xe_guc_ads: save/restore OA registers
@ 2024-10-22 14:10 Jonathan Cavitt
  2024-10-22 14:16 ` ✓ CI.Patch_applied: success for drm/xe/xe_guc_ads: save/restore OA registers (rev2) Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jonathan Cavitt @ 2024-10-22 14:10 UTC (permalink / raw)
  To: intel-xe
  Cc: jonathan.cavitt, saurabhg.gupta, alex.zuo, umesh.nerlige.ramappa,
	john.c.harrison

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)

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2249
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>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ads.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
index 4e746ae98888..a196c4fb90fc 100644
--- a/drivers/gpu/drm/xe/xe_guc_ads.c
+++ b/drivers/gpu/drm/xe/xe_guc_ads.c
@@ -15,6 +15,7 @@
 #include "regs/xe_engine_regs.h"
 #include "regs/xe_gt_regs.h"
 #include "regs/xe_guc_regs.h"
+#include "regs/xe_oa_regs.h"
 #include "xe_bo.h"
 #include "xe_gt.h"
 #include "xe_gt_ccs_mode.h"
@@ -740,6 +741,11 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
 		guc_mmio_regset_write_one(ads, regset_map, e->reg, count++);
 	}
 
+	for (i = 0; i < RING_MAX_NONPRIV_SLOTS; i++)
+		guc_mmio_regset_write_one(ads, regset_map,
+					  RING_FORCE_TO_NONPRIV(hwe->mmio_base, i),
+					  count++);
+
 	/* Wa_1607983814 */
 	if (needs_wa_1607983814(xe) && hwe->class == XE_ENGINE_CLASS_RENDER) {
 		for (i = 0; i < LNCFCMOCS_REG_COUNT; i++) {
@@ -748,6 +754,14 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
 		}
 	}
 
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL0, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL1, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL2, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL3, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL4, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL5, count++);
+	guc_mmio_regset_write_one(ads, regset_map, EU_PERF_CNTL6, count++);
+
 	return count;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-23 19:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 14:10 [PATCH v2] drm/xe/xe_guc_ads: save/restore OA registers Jonathan Cavitt
2024-10-22 14:16 ` ✓ CI.Patch_applied: success for drm/xe/xe_guc_ads: save/restore OA registers (rev2) Patchwork
2024-10-22 14:16 ` ✓ CI.checkpatch: " Patchwork
2024-10-22 14:17 ` ✓ CI.KUnit: " Patchwork
2024-10-22 14:29 ` ✓ CI.Build: " Patchwork
2024-10-22 14:31 ` ✓ CI.Hooks: " Patchwork
2024-10-22 14:32 ` ✓ CI.checksparse: " Patchwork
2024-10-22 14:55 ` ✗ CI.BAT: failure " Patchwork
2024-10-22 16:15 ` ✗ CI.FULL: " Patchwork
2024-10-23 19:31 ` [PATCH v2] drm/xe/xe_guc_ads: save/restore OA registers Dixit, Ashutosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.