Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: jonathan.cavitt@intel.com, saurabhg.gupta@intel.com,
	alex.zuo@intel.com, umesh.nerlige.ramappa@intel.com,
	john.c.harrison@intel.com, matthew.d.roper@intel.com,
	lucas.demarchi@intel.com, ashutosh.dixit@intel.com
Subject: [PATCH] drm/xe/xe_guc_ads: Add whitelist registers to write list
Date: Fri,  1 Nov 2024 18:04:03 +0000	[thread overview]
Message-ID: <20241101180403.97272-1-jonathan.cavitt@intel.com> (raw)

When performing a guc_mmio_regset_write, we add all the registers in the
reg_sr list to the save/restore list, but do not do the same for the
whitelist registers.  Add them in.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2249
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: Lucas de Marchi <lucas.demarchi@intel.com>
CC: Matt Roper <matthew.d.roper@intel.com>
CC: John Harrison <john.c.harrison@intel.com>
CC: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
CC: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ads.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
index 943146e5b460..2fc6b1ccc8fc 100644
--- a/drivers/gpu/drm/xe/xe_guc_ads.c
+++ b/drivers/gpu/drm/xe/xe_guc_ads.c
@@ -239,9 +239,12 @@ static size_t calculate_regset_size(struct xe_gt *gt)
 	enum xe_hw_engine_id id;
 	unsigned int count = 0;
 
-	for_each_hw_engine(hwe, gt, id)
+	for_each_hw_engine(hwe, gt, id) {
 		xa_for_each(&hwe->reg_sr.xa, sr_idx, sr_entry)
 			count++;
+		xa_for_each(&hwe->reg_whitelist.xa, sr_idx, sr_entry)
+			count++;
+	}
 
 	count += ADS_REGSET_EXTRA_MAX * XE_NUM_HW_ENGINES;
 
@@ -727,6 +730,12 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
 	xa_for_each(&hwe->reg_sr.xa, idx, entry)
 		guc_mmio_regset_write_one(ads, regset_map, entry->reg, count++);
 
+	i = 0;
+	xa_for_each(&hwe->reg_whitelist.xa, idx, entry)
+		guc_mmio_regset_write_one(ads, regset_map,
+					  RING_FORCE_TO_NONPRIV(hwe->mmio_base, i++),
+					  count++);
+
 	for (e = extra_regs; e < extra_regs + ARRAY_SIZE(extra_regs); e++) {
 		if (e->skip)
 			continue;
-- 
2.43.0


             reply	other threads:[~2024-11-01 18:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 18:04 Jonathan Cavitt [this message]
2024-11-01 18:09 ` ✓ CI.Patch_applied: success for drm/xe/xe_guc_ads: Add whitelist registers to write list Patchwork
2024-11-01 18:09 ` ✓ CI.checkpatch: " Patchwork
2024-11-01 18:11 ` ✓ CI.KUnit: " Patchwork
2024-11-01 18:22 ` ✓ CI.Build: " Patchwork
2024-11-01 18:24 ` ✓ CI.Hooks: " Patchwork
2024-11-01 18:26 ` ✓ CI.checksparse: " Patchwork
2024-11-01 18:45 ` [PATCH] " John Harrison
2024-11-01 19:40   ` Cavitt, Jonathan
2024-11-01 20:13     ` John Harrison
2024-11-01 20:47       ` Cavitt, Jonathan
2024-11-01 21:52         ` John Harrison
2024-11-01 22:00           ` Cavitt, Jonathan
2024-11-01 22:15             ` John Harrison
2024-11-01 22:22               ` Cavitt, Jonathan
2024-11-01 18:50 ` ✓ CI.BAT: success for " Patchwork
2024-11-01 19:57 ` ✗ CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241101180403.97272-1-jonathan.cavitt@intel.com \
    --to=jonathan.cavitt@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=john.c.harrison@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=saurabhg.gupta@intel.com \
    --cc=umesh.nerlige.ramappa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox