Skip to content

Commit 20124c3

Browse files
Jonathan-Cavittlucasdemarchi
authored andcommitted
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 <[email protected]> CC: Lucas de Marchi <[email protected]> CC: Matt Roper <[email protected]> CC: John Harrison <[email protected]> CC: Umesh Nerlige Ramappa <[email protected]> CC: Ashutosh Dixit <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 0c45e76 commit 20124c3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/xe/xe_guc_ads.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ static size_t calculate_regset_size(struct xe_gt *gt)
243243
xa_for_each(&hwe->reg_sr.xa, sr_idx, sr_entry)
244244
count++;
245245

246+
count += RING_MAX_NONPRIV_SLOTS * XE_NUM_HW_ENGINES;
247+
246248
count += ADS_REGSET_EXTRA_MAX * XE_NUM_HW_ENGINES;
247249

248250
if (XE_WA(gt, 1607983814))
@@ -727,6 +729,11 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
727729
xa_for_each(&hwe->reg_sr.xa, idx, entry)
728730
guc_mmio_regset_write_one(ads, regset_map, entry->reg, count++);
729731

732+
for (i = 0; i < RING_MAX_NONPRIV_SLOTS; i++)
733+
guc_mmio_regset_write_one(ads, regset_map,
734+
RING_FORCE_TO_NONPRIV(hwe->mmio_base, i),
735+
count++);
736+
730737
for (e = extra_regs; e < extra_regs + ARRAY_SIZE(extra_regs); e++) {
731738
if (e->skip)
732739
continue;

0 commit comments

Comments
 (0)