Message ID | 20221206234908.2339645-1-andrzej.hajda@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/guc: ensure CSB FIFOs after GuC reset do not have odd entries | expand |
On 12/6/2022 3:49 PM, Andrzej Hajda wrote: > CSB FIFOs stores 64-bit Context Status Buffers used by GuC firmware. They > are accessed by 32-bit register. Reads must occur in pairs to obtain > a single 64-bit CSB entry. The second read pops the CSB entry off the FIFO. > In case GuC reset happens between the reads, FIFO must be read once, to > recover proper behaviour. From the description, this seems to be a bug in the GuC firmware. The firmware is supposed to make sure all stale CSB entries are discarded when it gets reloaded, so it looks like the issue here is that that code is not correctly handling the case where there are an odd number of stale dwords. All the registers you're reading in this patch are GuC registers, so it should be possible to implement this fix within the firmware. That said, since we do need to keep support for current/older GuC versions, we'll still need to merge this WA and then disable it when we detect that we're loading a GuC version that includes the fix. However, I'd prefer it if we could first get confirmation that there is indeed a bug in the stale CSB handling inside of GuC (I believe Antonio is already looking at that) and that this is the best way to WA the issue, because normally we try to avoid touching internal GuC regs from i915 unless there are no alternatives. > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7351 > Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> > --- > drivers/gpu/drm/i915/gt/intel_reset.c | 25 ++++++++++++++++++++++ > drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 13 +++++++++++ > 2 files changed, 38 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c > index 24736ebee17c28..8e64b9024e3258 100644 > --- a/drivers/gpu/drm/i915/gt/intel_reset.c > +++ b/drivers/gpu/drm/i915/gt/intel_reset.c > @@ -721,6 +721,30 @@ bool intel_has_reset_engine(const struct intel_gt *gt) > return INTEL_INFO(gt->i915)->has_reset_engine; > } > > +static void recover_csb_fifos(struct intel_gt *gt) > +{ > + const struct { > + u32 bit; > + i915_reg_t csb; > + } csb_map[] = { > + { .bit = GUC_CSB_READ_FLAG_RCS, .csb = GUC_CS_CSB }, > + { .bit = GUC_CSB_READ_FLAG_VCS, .csb = GUC_VCS_CSB }, > + { .bit = GUC_CSB_READ_FLAG_VECS, .csb = GUC_VECS_CSB }, > + { .bit = GUC_CSB_READ_FLAG_BCS, .csb = GUC_BCS_CSB }, > + { .bit = GUC_CSB_READ_FLAG_CCS, .csb = GUC_CCS_CSB }, For MTL we'd also need the GSC_CSB, but hopefully we can get the updated GuC before we remove the force_probe and therefore not have to support this WA on MTL. > + }; > + u32 dbg; > + > + if (!intel_uc_uses_guc_submission(>->uc)) > + return; The GuC still gets the CSB interrupts even if we're not using GuC submission, although in that case it just pops the CSB entries out of the FIFO without looking at them. Not sure if we still need the WA in that case (again need input from the GuC side). Daniele > + > + dbg = intel_uncore_read(gt->uncore, GUCINT_DEBUG2); > + for (int i = 0; i < ARRAY_SIZE(csb_map); ++i) { > + if (dbg & csb_map[i].bit) > + intel_uncore_read(gt->uncore, csb_map[i].csb); > + } > +} > + > int intel_reset_guc(struct intel_gt *gt) > { > u32 guc_domain = > @@ -731,6 +755,7 @@ int intel_reset_guc(struct intel_gt *gt) > > intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL); > ret = gen6_hw_domain_reset(gt, guc_domain); > + recover_csb_fifos(gt); > intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL); > > return ret; > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h > index 9915de32e894e1..beeb7fbff99453 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h > @@ -154,4 +154,17 @@ struct guc_doorbell_info { > #define GUC_INTR_SW_INT_1 BIT(1) > #define GUC_INTR_SW_INT_0 BIT(0) > > +#define GUCINT_DEBUG2 _MMIO(0xC5A4) > +#define GUC_CSB_READ_FLAG_CCS BIT(16) > +#define GUC_CSB_READ_FLAG_BCS BIT(3) > +#define GUC_CSB_READ_FLAG_VECS BIT(2) > +#define GUC_CSB_READ_FLAG_VCS BIT(1) > +#define GUC_CSB_READ_FLAG_RCS BIT(0) > + > +#define GUC_CS_CSB _MMIO(0xC5B0) > +#define GUC_BCS_CSB _MMIO(0xC5B4) > +#define GUC_VCS_CSB _MMIO(0xC5B8) > +#define GUC_VECS_CSB _MMIO(0xC5BC) > +#define GUC_CCS_CSB _MMIO(0xC5E0) > + > #endif
On 07.12.2022 01:43, Patchwork wrote: > *Patch Details* > *Series:* drm/i915/guc: ensure CSB FIFOs after GuC reset do not have odd > entries > *URL:* https://patchwork.freedesktop.org/series/111697/ > <https://patchwork.freedesktop.org/series/111697/> > *State:* failure > *Details:* > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/index.html > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/index.html> > > > CI Bug Log - changes from CI_DRM_12475 -> Patchwork_111697v1 > > > Summary > > *FAILURE* > > Serious unknown changes coming with Patchwork_111697v1 absolutely need to be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_111697v1, please notify your bug team to allow them > to document this new failure mode, which will reduce false positives in CI. > > External URL: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/index.html > > > Participating hosts (30 -> 44) > > Additional (15): fi-kbl-soraka bat-kbl-2 bat-adls-5 bat-dg1-6 bat-dg1-5 > fi-bsw-n3050 bat-dg2-8 bat-adlp-9 bat-dg2-9 bat-adlp-6 bat-adlp-4 > bat-atsm-1 bat-jsl-3 bat-dg2-11 fi-bsw-nick > Missing (1): fi-cfl-8700k > > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_111697v1: > > > IGT changes > > > Possible regressions > > * igt@i915_selftest@live@guc_multi_lrc: > o fi-kbl-soraka: NOTRUN -> INCOMPLETE > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@i915_selftest@live@guc_multi_lrc.html> Known issue: https://gitlab.freedesktop.org/drm/intel/-/issues/7174, I am not sure why it is not marked by cibuglog as "known issue". Regards Andrzej > > > Known issues > > Here are the changes found in Patchwork_111697v1 that come from known > issues: > > > IGT changes > > > Issues hit > > * > > igt@debugfs_test@basic-hwmon: > > o bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@debugfs_test@basic-hwmon.html> (i915#7456 <https://gitlab.freedesktop.org/drm/intel/issues/7456>) > * > > igt@gem_exec_gttfill@basic: > > o > > fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +7 similar issues > > o > > fi-pnv-d510: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12475/fi-pnv-d510/igt@gem_exec_gttfill@basic.html> -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-pnv-d510/igt@gem_exec_gttfill@basic.html> (i915#7229 <https://gitlab.freedesktop.org/drm/intel/issues/7229>) > > * > > igt@gem_huc_copy@huc-copy: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2190 <https://gitlab.freedesktop.org/drm/intel/issues/2190>) > * > > igt@gem_lmem_swapping@basic: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#4613 <https://gitlab.freedesktop.org/drm/intel/issues/4613>) +3 similar issues > * > > igt@gem_lmem_swapping@parallel-random-engines: > > o > > fi-bsw-nick: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-bsw-nick/igt@gem_lmem_swapping@parallel-random-engines.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +39 similar issues > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@gem_lmem_swapping@parallel-random-engines.html> (i915#4613 <https://gitlab.freedesktop.org/drm/intel/issues/4613>) +3 similar issues > > * > > igt@gem_mmap@basic: > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@gem_mmap@basic.html> (i915#4083 <https://gitlab.freedesktop.org/drm/intel/issues/4083>) > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@gem_mmap@basic.html> (i915#4083 <https://gitlab.freedesktop.org/drm/intel/issues/4083>) > > * > > igt@gem_render_tiled_blits@basic: > > o bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@gem_render_tiled_blits@basic.html> (i915#4079 <https://gitlab.freedesktop.org/drm/intel/issues/4079>) +1 similar issue > * > > igt@gem_tiled_blits@basic: > > o bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@gem_tiled_blits@basic.html> (i915#4077 <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +2 similar issues > * > > igt@gem_tiled_fence_blits@basic: > > o bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@gem_tiled_fence_blits@basic.html> (i915#4077 <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +2 similar issues > * > > igt@gem_tiled_pread_basic: > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@gem_tiled_pread_basic.html> (i915#4079 <https://gitlab.freedesktop.org/drm/intel/issues/4079>) +1 similar issue > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@gem_tiled_pread_basic.html> (i915#3282 <https://gitlab.freedesktop.org/drm/intel/issues/3282>) > > * > > igt@i915_module_load@load: > > o fi-bsw-n3050: NOTRUN -> DMESG-WARN > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-bsw-n3050/igt@i915_module_load@load.html> (i915#7430 <https://gitlab.freedesktop.org/drm/intel/issues/7430>) > * > > igt@i915_pm_backlight@basic-brightness: > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@i915_pm_backlight@basic-brightness.html> (i915#7561 <https://gitlab.freedesktop.org/drm/intel/issues/7561>) > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@i915_pm_backlight@basic-brightness.html> (i915#7561 <https://gitlab.freedesktop.org/drm/intel/issues/7561>) > > * > > igt@i915_pm_rps@basic-api: > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@i915_pm_rps@basic-api.html> (i915#6621 <https://gitlab.freedesktop.org/drm/intel/issues/6621>) > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@i915_pm_rps@basic-api.html> (i915#6621 <https://gitlab.freedesktop.org/drm/intel/issues/6621>) > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@i915_pm_rps@basic-api.html> (i915#6621 <https://gitlab.freedesktop.org/drm/intel/issues/6621>) > > * > > igt@i915_selftest@live@gt_heartbeat: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html> (i915#5334 <https://gitlab.freedesktop.org/drm/intel/issues/5334>) > * > > igt@i915_selftest@live@gt_pm: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html> (i915#1886 <https://gitlab.freedesktop.org/drm/intel/issues/1886>) > * > > igt@kms_addfb_basic@basic-x-tiled-legacy: > > o bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_addfb_basic@basic-x-tiled-legacy.html> (i915#4212 <https://gitlab.freedesktop.org/drm/intel/issues/4212>) +7 similar issues > * > > igt@kms_addfb_basic@basic-y-tiled-legacy: > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_addfb_basic@basic-y-tiled-legacy.html> (i915#4215 <https://gitlab.freedesktop.org/drm/intel/issues/4215>) > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_addfb_basic@basic-y-tiled-legacy.html> (i915#4215 <https://gitlab.freedesktop.org/drm/intel/issues/4215>) > > * > > igt@kms_addfb_basic@tile-pitch-mismatch: > > o bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_addfb_basic@tile-pitch-mismatch.html> (i915#4212 <https://gitlab.freedesktop.org/drm/intel/issues/4212>) +7 similar issues > * > > igt@kms_chamelium@dp-crc-fast: > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@kms_chamelium@dp-crc-fast.html> (fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8 similar issues > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_chamelium@dp-crc-fast.html> (fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8 similar issues > > * > > igt@kms_chamelium@hdmi-crc-fast: > > o bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_chamelium@hdmi-crc-fast.html> (fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8 similar issues > * > > igt@kms_chamelium@hdmi-hpd-fast: > > o > > fi-bsw-nick: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-bsw-nick/igt@kms_chamelium@hdmi-hpd-fast.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8 similar issues > > o > > fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-kbl-soraka/igt@kms_chamelium@hdmi-hpd-fast.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +7 similar issues > > * > > igt@kms_cursor_legacy@basic-busy-flip-before-cursor: > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html> (i915#4103 <https://gitlab.freedesktop.org/drm/intel/issues/4103>) > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html> (i915#4103 <https://gitlab.freedesktop.org/drm/intel/issues/4103> / i915#4213 <https://gitlab.freedesktop.org/drm/intel/issues/4213>) > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html> (i915#4103 <https://gitlab.freedesktop.org/drm/intel/issues/4103> / i915#4213 <https://gitlab.freedesktop.org/drm/intel/issues/4213>) > > * > > igt@kms_force_connector_basic@force-load-detect: > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@kms_force_connector_basic@force-load-detect.html> (i915#4093 <https://gitlab.freedesktop.org/drm/intel/issues/4093>) +3 similar issues > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_force_connector_basic@force-load-detect.html> (fdo#109285 <https://bugs.freedesktop.org/show_bug.cgi?id=109285>) > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_force_connector_basic@force-load-detect.html> (fdo#109285 <https://bugs.freedesktop.org/show_bug.cgi?id=109285>) > > * > > igt@kms_pipe_crc_basic@suspend-read-crc: > > o bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@kms_pipe_crc_basic@suspend-read-crc.html> (i915#3546 <https://gitlab.freedesktop.org/drm/intel/issues/3546>) > * > > igt@kms_psr@primary_page_flip: > > o bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_psr@primary_page_flip.html> (i915#1072 <https://gitlab.freedesktop.org/drm/intel/issues/1072> / i915#4078 <https://gitlab.freedesktop.org/drm/intel/issues/4078>) +3 similar issues > * > > igt@kms_psr@sprite_plane_onoff: > > o bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_psr@sprite_plane_onoff.html> (i915#1072 <https://gitlab.freedesktop.org/drm/intel/issues/1072> / i915#4078 <https://gitlab.freedesktop.org/drm/intel/issues/4078>) +3 similar issues > * > > igt@kms_setmode@basic-clone-single-crtc: > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>) > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>) > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555> / i915#4579 <https://gitlab.freedesktop.org/drm/intel/issues/4579>) > > * > > igt@prime_vgem@basic-fence-read: > > o bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@prime_vgem@basic-fence-read.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708>) +3 similar issues > * > > igt@prime_vgem@basic-gtt: > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@prime_vgem@basic-gtt.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708> / i915#4077 <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +1 similar issue > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@prime_vgem@basic-gtt.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708> / i915#4077 <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +1 similar issue > > * > > igt@prime_vgem@basic-userptr: > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@prime_vgem@basic-userptr.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708> / i915#4873 <https://gitlab.freedesktop.org/drm/intel/issues/4873>) > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@prime_vgem@basic-userptr.html> (fdo#109295 <https://bugs.freedesktop.org/show_bug.cgi?id=109295> / i915#3301 <https://gitlab.freedesktop.org/drm/intel/issues/3301> / i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708>) > > o > > bat-dg1-5: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-5/igt@prime_vgem@basic-userptr.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708> / i915#4873 <https://gitlab.freedesktop.org/drm/intel/issues/4873>) > > * > > igt@prime_vgem@basic-write: > > o > > bat-dg1-6: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-dg1-6/igt@prime_vgem@basic-write.html> (i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708>) +3 similar issues > > o > > bat-adlp-4: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-adlp-4/igt@prime_vgem@basic-write.html> (fdo#109295 <https://bugs.freedesktop.org/show_bug.cgi?id=109295> / i915#3291 <https://gitlab.freedesktop.org/drm/intel/issues/3291> / i915#3708 <https://gitlab.freedesktop.org/drm/intel/issues/3708>) +2 similar issues > > * > > igt@runner@aborted: > > o fi-bsw-n3050: NOTRUN -> FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/fi-bsw-n3050/igt@runner@aborted.html> (i915#4312 <https://gitlab.freedesktop.org/drm/intel/issues/4312>) > > > Possible fixes > > * > > igt@gem_exec_suspend@basic-s3@smem: > > o {bat-rplp-1}: DMESG-WARN > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12475/bat-rplp-1/igt@gem_exec_suspend@basic-s3@smem.html> (i915#2867 <https://gitlab.freedesktop.org/drm/intel/issues/2867>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-rplp-1/igt@gem_exec_suspend@basic-s3@smem.html> > * > > igt@i915_selftest@live@requests: > > o {bat-rpls-2}: INCOMPLETE > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12475/bat-rpls-2/igt@i915_selftest@live@requests.html> (i915#6257 <https://gitlab.freedesktop.org/drm/intel/issues/6257>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111697v1/bat-rpls-2/igt@i915_selftest@live@requests.html> > > {name}: This element is suppressed. This means it is ignored when computing > the status of the difference (SUCCESS, WARNING, or FAILURE). > > > Build changes > > * Linux: CI_DRM_12475 -> Patchwork_111697v1 > > CI-20190529: 20190529 > CI_DRM_12475: ebea1ef56080671403683f4c09e89c3e7b7e28da @ > git://anongit.freedesktop.org/gfx-ci/linux > IGT_7084: ec81855d36887dfe81d5ff513ed6d512773da37e @ > https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_111697v1: ebea1ef56080671403683f4c09e89c3e7b7e28da @ > git://anongit.freedesktop.org/gfx-ci/linux > > > Linux commits > > 03494642b502 drm/i915/guc: ensure CSB FIFOs after GuC reset do not have > odd entries >
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index 24736ebee17c28..8e64b9024e3258 100644 --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -721,6 +721,30 @@ bool intel_has_reset_engine(const struct intel_gt *gt) return INTEL_INFO(gt->i915)->has_reset_engine; } +static void recover_csb_fifos(struct intel_gt *gt) +{ + const struct { + u32 bit; + i915_reg_t csb; + } csb_map[] = { + { .bit = GUC_CSB_READ_FLAG_RCS, .csb = GUC_CS_CSB }, + { .bit = GUC_CSB_READ_FLAG_VCS, .csb = GUC_VCS_CSB }, + { .bit = GUC_CSB_READ_FLAG_VECS, .csb = GUC_VECS_CSB }, + { .bit = GUC_CSB_READ_FLAG_BCS, .csb = GUC_BCS_CSB }, + { .bit = GUC_CSB_READ_FLAG_CCS, .csb = GUC_CCS_CSB }, + }; + u32 dbg; + + if (!intel_uc_uses_guc_submission(>->uc)) + return; + + dbg = intel_uncore_read(gt->uncore, GUCINT_DEBUG2); + for (int i = 0; i < ARRAY_SIZE(csb_map); ++i) { + if (dbg & csb_map[i].bit) + intel_uncore_read(gt->uncore, csb_map[i].csb); + } +} + int intel_reset_guc(struct intel_gt *gt) { u32 guc_domain = @@ -731,6 +755,7 @@ int intel_reset_guc(struct intel_gt *gt) intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL); ret = gen6_hw_domain_reset(gt, guc_domain); + recover_csb_fifos(gt); intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL); return ret; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h index 9915de32e894e1..beeb7fbff99453 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h @@ -154,4 +154,17 @@ struct guc_doorbell_info { #define GUC_INTR_SW_INT_1 BIT(1) #define GUC_INTR_SW_INT_0 BIT(0) +#define GUCINT_DEBUG2 _MMIO(0xC5A4) +#define GUC_CSB_READ_FLAG_CCS BIT(16) +#define GUC_CSB_READ_FLAG_BCS BIT(3) +#define GUC_CSB_READ_FLAG_VECS BIT(2) +#define GUC_CSB_READ_FLAG_VCS BIT(1) +#define GUC_CSB_READ_FLAG_RCS BIT(0) + +#define GUC_CS_CSB _MMIO(0xC5B0) +#define GUC_BCS_CSB _MMIO(0xC5B4) +#define GUC_VCS_CSB _MMIO(0xC5B8) +#define GUC_VECS_CSB _MMIO(0xC5BC) +#define GUC_CCS_CSB _MMIO(0xC5E0) + #endif
CSB FIFOs stores 64-bit Context Status Buffers used by GuC firmware. They are accessed by 32-bit register. Reads must occur in pairs to obtain a single 64-bit CSB entry. The second read pops the CSB entry off the FIFO. In case GuC reset happens between the reads, FIFO must be read once, to recover proper behaviour. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7351 Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> --- drivers/gpu/drm/i915/gt/intel_reset.c | 25 ++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 13 +++++++++++ 2 files changed, 38 insertions(+)