drm/msm/a8xx: GPU state capture support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest15 patches 0 repliesNew
- v715 patches 0 repliesSuperseded
- v615 patches 9 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 15 patches | 1 reply | Superseded | |
| v4 | 19 patches | 2 replies | Superseded | |
| v3 | 16 patches | 10 replies | Superseded | |
| v2 | 14 patches | 10 replies | Superseded | |
| v1 | 12 patches | 7 replies | Superseded |
Changes in v8 from the cover letter
- Also fix PING_BLK_SEL size in cx_dbgc path
- Also make cx_dbgc capture conditional on modparam
- Link to v7: https://lore.kernel.org/all/[email protected]/
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | drm/msm: Import adreno_snapshot.hdrivers/ | +321 | 0 replies | |
| 2/15 | drm/msm/a8xx: Export aperture helpersdrivers/ drivers/ | +6 | 0 replies | |
| 3/15 | drm/msm/a8xx: Add a8xx_aperture_acquire_raw()drivers/ drivers/ | +14 | 0 replies | |
| 4/15 | drm/msm/a8xx: Export slice helperdrivers/ drivers/ | +2 | 0 replies | |
| 5/15 | drm/msm/a8xx: Add missing a850 ifpc reglist entriesdrivers/ | +7 | 0 replies | |
| 6/15 | drm/msm/a8xx: Allow nonctx reglist to include GMU regsdrivers/ | +6 | 0 replies | |
| 7/15 | drm/msm/a8xx: Stop getting GMEM_PROTECT from nonctx listdrivers/ drivers/ | +4 | 0 replies | |
| 8/15 | drm/msm/adreno: Fix PROTECT span lengthdrivers/ | +2 | 0 replies | |
| 9/15 | drm/msm/adreno: add temporary __maybe_unuseddrivers/ | +1 | 0 replies | |
| 10/15 | drm/msm/a8xx: Import generated headersdrivers/ drivers/ drivers/ +6 more | +13624 | 0 replies | |
| 11/15 | drm/msm/a8xx: devcoredump state capture supportdrivers/ drivers/ drivers/ +3 more | +1652 | 0 replies | |
| 12/15 | drm/msm/a8xx: Add all CP_PROTECT_PIPE to pwrup reglistdrivers/ | +75 | 0 replies | |
| 13/15 | drm/msm/a8xx: Use CP_PROTECT_PIPE regsdrivers/ | +14 | 0 replies | |
| 14/15 | drm/msm/a8xx: Switch to generated protect regsdrivers/ | +13 | 0 replies | |
| 15/15 | drm/msm/adreno: Remove temporary __maybe_unuseddrivers/ | +1 | 0 replies |
Reviews trailers per patch
9 of 15 patches have a Reviewed-by or Acked-by.
| Patch | Alexander Koskovich | Akhil P Oommen | Konrad Dybcio |
|---|---|---|---|
| 1/15 | T-b | ||
| 2/15 | T-b | R-b | |
| 3/15 | T-b | R-b | |
| 4/15 | T-b | R-b | |
| 5/15 | T-b | R-b | R-b |
| 6/15 | T-b | R-b | A-b |
| 7/15 | T-b | R-b | R-b |
| 8/15 | T-b | R-b | R-b |
| 9/15 | T-b | ||
| 10/15 | T-b | ||
| 11/15 | T-b | ||
| 12/15 | T-b | R-b | |
| 13/15 | T-b | R-b | |
| 14/15 | T-b | ||
| 15/15 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v8 00/15] drm/msm/a8xx: GPU state capture support
This series introduces gen8 devcoredump support. Compared to previous gens, it:
1. Switches to generated tables. Compared to hand modifying headers from kgsl (which were originally generated, then adjusted a bit by hand before adding to kgsl tree. And then copied to drm/msm and lightly modified some more in the process).
In the process, we also switch to generated cp_protect tables.
2. Aligns to the "snapshot" format that kgsl/etc use for hw state capture. The non-generation specific bits (SMMU fault info, capturing relevant BOs, etc) still works as before. Everything gen8 specific gets encoded as "snapshot" sections, ascii85 encoded in the resulting devcoredump file (similar to captured BOs).
3. Try to make it easier to at least compare kgsl snapshot code with upstream, for porting fixes/etc. State capture is tedious and mind- numbing, and the last thing you want to do when debugging a GPU hang is going down the rabbit hole of having to first debug gpu state capture.
However, I don't love kgsl_snapshot_add_section(). It does avoid duplicating snapshot header stuff everywhere. But the ergonomics are not great. So instead I went with "align with what I wish kgsl looked like..
The mesa/crashdec side of this is at:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/45304
I'd appreciate tested-by's on Hawi, Maili, Milos, and Pakala, since I don't have these devices at-hand to test myself. To test devcoredump, you can use the msm_recovery test in igt.. or just:
cat /sys/kernel/debug/dri/*/gpu > /dev/null
NOTE: I'm still tracking down some descrepancies compared to kgsl. I
think at least we should be matching on the excluded access- protected regs, so hopefully collecting a devcoredump doesn't make things go boom. Tested on glymur (windows fw) and on kaanapali MTP (android fw).
NOTE: Uses $codename for generated file/table names, rather than continue
to perpetuate the equally meaningless gen8_x_y naming from kgsl into upstream. At least the codenames are familiar upstream and this removes an extra level of name translation.
v8:
- Also fix PING_BLK_SEL size in cx_dbgc path
- Also make cx_dbgc capture conditional on modparam
- Link to v7: https://lore.kernel.org/all/[email protected]/
v7:
- Fix PING_BLK_SEL size.. this bitfield got larger on gen8 to accommodate
a larger # of debugbus blocks
- Make debugbus snapshot conditional on modparam, as with earlier gens
- Clear aperture at end of state snapshot, for good measure
- Add missing bitfield.h #include
- Link to v6: https://lore.kernel.org/all/[email protected]/
v6:
- Fix gx_is_on() check
- Only capture preemption records if preemption is enabled
- Link to v5: https://lore.kernel.org/all/[email protected]/
v5:
- Fix inverted IS_ERR_OR_NULL() check
- Drop IFPC fixes (moved to their own series)
- Link to v4: https://lore.kernel.org/all/[email protected]/
v4:
- Drop RB_GC_GMEM_PROTECT from nonctx list, now that we are computing
the value directly
- Add missing 'break' in switch
- Move RBBM_MISC_STATUS read to after we check GX is on
- Rename sysprof_setup
- Add cleanup.h support for disabling IFPC, and use it in debugfs
snapshot path
- Collect tags
- Link to v3: https://lore.kernel.org/all/[email protected]/
v3:
- Drop generated nonctx list for now
- Exclude access protected registers
- Shuffle around some debugbus blocks to match kgsl
- Use CP_PROTECT_PIPE regs to pickup the extra spans if we exceed the
64 CP_PROTECT_GLOBAL regs
- Inhibit IFPC for gpu debugfs dump
- Fix cx_dbgc capture
- Misc other small fixes
- Link to v2: https://lore.kernel.org/all/[email protected]/
v2:
- Fix incorrect protect list for Kaanapali
- Use __free() for snapshot_sect finalization
- Fix missing early return error path in gen8_snapshot_mempool()
- Fix aperture setting in gen8_legacy_snapshot_mvc()
- Fix first_slice in gen8_snapshot_mempool()
- Remove GBIF regs in generated nonctx list
- Link to v1: https://lore.kernel.org/all/[email protected]/
Rob Clark (15):
drm/msm: Import adreno_snapshot.h
drm/msm/a8xx: Export aperture helpers drm/msm/a8xx: Add a8xx_aperture_acquire_raw() drm/msm/a8xx: Export slice helper
drm/msm/a8xx: Add missing a850 ifpc reglist entries drm/msm/a8xx: Allow nonctx reglist to include GMU regs drm/msm/a8xx: Stop getting GMEM_PROTECT from nonctx list drm/msm/adreno: Fix PROTECT span length drm/msm/adreno: add temporary __maybe_unused drm/msm/a8xx: Import generated headers drm/msm/a8xx: devcoredump state capture support drm/msm/a8xx: Add all CP_PROTECT_PIPE to pwrup reglist drm/msm/a8xx: Use CP_PROTECT_PIPE regs drm/msm/a8xx: Switch to generated protect regs drm/msm/adreno: Remove temporary __maybe_unused
drivers/gpu/drm/msm/Makefile | 4 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 + drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 14 +- drivers/gpu/drm/msm/adreno/a8xx_catalog.c | 404 +-- drivers/gpu/drm/msm/adreno/a8xx_gpu.c | 65 +- drivers/gpu/drm/msm/adreno/a8xx_gpu_state.c | 1409 ++++++++++ .../gpu/drm/msm/adreno/adreno_gen8_snapshot.h | 576 ++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 + drivers/gpu/drm/msm/adreno/adreno_snapshot.h | 531 ++++ .../drm/msm/adreno/catalog/adreno_glymur.h | 2307 ++++++++++++++++ .../gpu/drm/msm/adreno/catalog/adreno_hawi.h | 2387 +++++++++++++++++ .../drm/msm/adreno/catalog/adreno_kaanapali.h | 2317 ++++++++++++++++ .../gpu/drm/msm/adreno/catalog/adreno_maili.h | 1882 +++++++++++++ .../gpu/drm/msm/adreno/catalog/adreno_milos.h | 1977 ++++++++++++++ .../drm/msm/adreno/catalog/adreno_pakala.h | 2161 +++++++++++++++ drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 20 +- 16 files changed, 15739 insertions(+), 324 deletions(-) create mode 100644 drivers/gpu/drm/msm/adreno/a8xx_gpu_state.c create mode 100644 drivers/gpu/drm/msm/adreno/adreno_gen8_snapshot.h create mode 100644 drivers/gpu/drm/msm/adreno/adreno_snapshot.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_glymur.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_hawi.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_kaanapali.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_maili.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_milos.h create mode 100644 drivers/gpu/drm/msm/adreno/catalog/adreno_pakala.h
Signature · 1 line
2.56.0