Skip to content

drm/i915: Add drm_panic support

Jocelyn Falempe dri-devel intel-gfx intel-xe lkml 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest11 patches 1 replyIn review
  2. v1010 patches 9 repliesSuperseded
  3. v99 patches 0 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v89 patches5 repliesSuperseded
v78 patches0 repliesSuperseded
v68 patches8 repliesSuperseded
v58 patches0 repliesSuperseded
v4 RFC8 patches0 repliesSuperseded
v3 RFC6 patches0 repliesSuperseded
v2 RFC5 patches2 repliesSuperseded
v1 RFC5 patches2 repliesSuperseded

Changes in v11 from the cover letter

* Encapsulate the struct intel_framebuffer into a xe_framebuffer or i915_framebuffer, to make it easier to add a struct xe_res_cursor to support discrete GPU later.

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11drm/panic: Add a private field to struct drm_scanout_bufferinclude/drm/drm_panic.h+6 -00 replies
2/11drm/i915/fbdev: Add intel_fbdev_get_map()drivers/gpu/drm/i915/display/intel_fb_pin.c drivers/gpu/drm/i915/display/intel_fb_pin.h drivers/gpu/drm/i915/display/intel_fbdev.c +3 more+27 -10 replies
3/11drm/i915/display/i9xx: Add a disable_tiling() for i9xx planesdrivers/gpu/drm/i915/display/i9xx_plane.c drivers/gpu/drm/i915/display/intel_display_types.h+25 -00 replies
4/11drm/i915/display: Add a disable_tiling() for skl planesdrivers/gpu/drm/i915/display/skl_universal_plane.c+20 -00 replies
5/11drm/ttm: Add ttm_bo_kmap_try_from_panic()drivers/gpu/drm/ttm/ttm_bo_util.c include/drm/ttm/ttm_bo.h+28 -00 replies
6/11drm/i915: Add intel_bo_alloc_framebuffer()drivers/gpu/drm/i915/display/i9xx_plane.c drivers/gpu/drm/i915/display/intel_bo.c drivers/gpu/drm/i915/display/intel_bo.h +5 more+60 -31 reply
7/11drm/i915: Add intel_bo_panic_setup() and intel_bo_panic_finish()drivers/gpu/drm/i915/display/intel_bo.c drivers/gpu/drm/i915/display/intel_bo.h drivers/gpu/drm/i915/gem/i915_gem_object.h +2 more+188 -00 replies
8/11drm/i915/display: Add drm_panic supportdrivers/gpu/drm/i915/display/intel_plane.c+82 -10 replies
9/11drm/i915/display: Add drm_panic support for Y-tiling with DPTdrivers/gpu/drm/i915/display/intel_display_types.h drivers/gpu/drm/i915/display/intel_plane.c drivers/gpu/drm/i915/display/skl_universal_plane.c +2 more+94 -80 replies
10/11drm/i915/display: Add drm_panic support for 4-tiling with DPTdrivers/gpu/drm/i915/display/intel_plane.c+20 -00 replies
11/11drm/i915/psr: Add intel_psr2_panic_force_full_updatedrivers/gpu/drm/i915/display/intel_plane.c drivers/gpu/drm/i915/display/intel_psr.c drivers/gpu/drm/i915/display/intel_psr.h+29 -00 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by.

PatchChristian König
1/11
2/11
3/11
4/11
5/11R-b
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v11 thread

Cover letter [PATCH v11 00/11] drm/i915: Add drm_panic support

This adds drm_panic support for i915 and xe driver.

I've tested it on the 4 intel laptops I have at my disposal.
* Haswell with 128MB of eDRAM.
* Comet Lake i7-10850H
* Raptor Lake i7-1370P (with DPT, and Y-tiling).
* Lunar Lake Ultra 5 228V (with DPT, and 4-tiling, and using the Xe driver.

I tested panic in both fbdev console and gnome desktop.
I think it won't work yet on discrete GPU, but that can be added later.

Best regards,

v2:
* Add the proper abstractions to build also for Xe.
* Fix dim checkpatch issues.

v3:
* Add support for Y-tiled framebuffer when DPT is enabled.

v4:
* Add support for Xe driver, which shares most of the code.
* Add support for 4-tiled framebuffer found in newest GPU.

v5:
* Rebase on top of [email protected]:drm/i915/kernel.git drm-intel-next
* Use struct intel_display instead of drm_i915_private.
* Use iosys_map for intel_bo_panic_map().

v6:
* Rebase on top of [email protected]:drm/i915/kernel.git drm-intel-next
* Use struct intel_display instead of drm_i915_private for intel_atomic_plane.c

v7:
* Fix mismatch {} in intel_panic_flush() (Jani Nikula)
* Return int for i915_gem_object_panic_map() (Ville Syrjälä)
* Reword commit message about alignment/size when disabling tiling (Ville Syrjälä)

v8:
* Use kmap_try_from_panic() instead of vmap, to access the framebuffer.
* Add ttm_bo_kmap_try_from_panic() for the xe driver, that uses ttm.
* Replace intel_bo_panic_map() with a setup() and finish() function, to allow mapping only one page of teh framebuffer at a time.
* Configure psr to send the full framebuffer update.

v9:
* Fix comment in ttm_bo_kmap_try_from_panic(), this can *only* be called from the panic handler (Christian König)
* Fix missing kfree() for i915_panic_pages in i915_gem_object_panic_finish() Also change i915_panic_pages allocation to kmalloc, as kvmalloc is not safe to call from the panic handler.
* Fix dim checkpatch warnings.

v10:
* Add a private field to struct drm_scanout_buffer
* Replace static variables with new fields in struct intel_framebuffer (Maarten Lankhorst)
* Add error handling if i915_gem_object_panic_pages() returns NULL
* Declare struct drm_scanout_buffer instead of including <drm/drm_panic.h> in intel_bo.h

v11:
* Encapsulate the struct intel_framebuffer into a xe_framebuffer or i915_framebuffer, to make it easier to add a struct xe_res_cursor to support discrete GPU later.

Jocelyn Falempe (11):
drm/panic: Add a private field to struct drm_scanout_buffer drm/i915/fbdev: Add intel_fbdev_get_map() drm/i915/display/i9xx: Add a disable_tiling() for i9xx planes drm/i915/display: Add a disable_tiling() for skl planes drm/ttm: Add ttm_bo_kmap_try_from_panic()
drm/i915: Add intel_bo_alloc_framebuffer()
drm/i915: Add intel_bo_panic_setup() and intel_bo_panic_finish() drm/i915/display: Add drm_panic support drm/i915/display: Add drm_panic support for Y-tiling with DPT drm/i915/display: Add drm_panic support for 4-tiling with DPT drm/i915/psr: Add intel_psr2_panic_force_full_update

 drivers/gpu/drm/i915/display/i9xx_plane.c     |  26 ++-
 drivers/gpu/drm/i915/display/intel_bo.c       |  17 ++
 drivers/gpu/drm/i915/display/intel_bo.h       |   5 +
 .../drm/i915/display/intel_display_types.h    |   4 +
 drivers/gpu/drm/i915/display/intel_fb.c       |   2 +-
 drivers/gpu/drm/i915/display/intel_fb_pin.c   |   5 +
 drivers/gpu/drm/i915/display/intel_fb_pin.h   |   2 +
 drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +
 drivers/gpu/drm/i915/display/intel_fbdev.h    |   6 +-
 drivers/gpu/drm/i915/display/intel_plane.c    | 170 +++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_psr.c      |  20 +++
 drivers/gpu/drm/i915/display/intel_psr.h      |   2 +
 .../drm/i915/display/skl_universal_plane.c    |  29 ++-
 drivers/gpu/drm/i915/gem/i915_gem_object.h    |   6 +
 drivers/gpu/drm/i915/gem/i915_gem_pages.c     | 142 +++++++++++++++
 drivers/gpu/drm/i915/i915_vma.h               |   5 +
 drivers/gpu/drm/ttm/ttm_bo_util.c             |  27 +++
 drivers/gpu/drm/xe/display/intel_bo.c         |  91 ++++++++++
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |   5 +
 include/drm/drm_panic.h                       |   6 +
 include/drm/ttm/ttm_bo.h                      |   1 +
 21 files changed, 571 insertions(+), 5 deletions(-)

base-commit: 266907bb491f2bdd731139792b5a5056b6d0a482

Signature · 1 line
2.49.0