Skip to content

Commit

Permalink
drm/xe/xe_guc_ads: save/restore OA registers and allowlist regs
Browse files Browse the repository at this point in the history
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: dd08ebf ("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
  • Loading branch information
Jonathan Cavitt authored and Ashutosh Dixit committed Oct 28, 2024
1 parent 85d3f9e commit 55858fa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/xe/xe_guc_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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++) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 55858fa

Please sign in to comment.