mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 09:56:25 -04:00
drm/xe/xe_guc_ads: Add nonpriv registers to write list
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 nonpriv registers. Add them in. v2: - Add all NONPRIV registers to avoid undefined behavior (Harrison) - s/whitelist/nonpriv v3: - Rebase 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> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241122180826.7075-1-jonathan.cavitt@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
committed by
Lucas De Marchi
parent
0c45e76fcc
commit
20124c3e22
@@ -243,6 +243,8 @@ static size_t calculate_regset_size(struct xe_gt *gt)
|
||||
xa_for_each(&hwe->reg_sr.xa, sr_idx, sr_entry)
|
||||
count++;
|
||||
|
||||
count += RING_MAX_NONPRIV_SLOTS * XE_NUM_HW_ENGINES;
|
||||
|
||||
count += ADS_REGSET_EXTRA_MAX * XE_NUM_HW_ENGINES;
|
||||
|
||||
if (XE_WA(gt, 1607983814))
|
||||
@@ -727,6 +729,11 @@ 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++);
|
||||
|
||||
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++);
|
||||
|
||||
for (e = extra_regs; e < extra_regs + ARRAY_SIZE(extra_regs); e++) {
|
||||
if (e->skip)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user