Skip to content

drm/i915/dpt: Optimize i915 DPT

Ville Syrjala intel-gfx intel-xe sashiko-reviews stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/i915: Bump surface alignment to 32k on MTL for async flipsdrivers/gpu/drm/i915/display/skl_universal_plane.c+9 -00 replies
2/13drm/i915/fb: Fix error handling onion in intel_framebuffer_init()drivers/gpu/drm/i915/display/intel_fb.c+1 -10 replies
3/13drm/i915/dpt: Stop allocation DPTs from stolendrivers/gpu/drm/i915/i915_dpt.c+3 -60 replies
4/13drm/i915/fb_pin: Remove overzealous vma NULL checksdrivers/gpu/drm/i915/i915_fb_pin.c+3 -90 replies
5/13drm/i915: intel_{remapped, rotation}_info_size() into intel/gtt_view_types.hdrivers/gpu/drm/i915/display/intel_fb.c drivers/gpu/drm/i915/display/intel_fb.h drivers/gpu/drm/i915/i915_vma.c +3 more+44 -440 replies
6/13drm/i915/dpt: Compute DPT size in the DPT codedrivers/gpu/drm/i915/display/intel_fb.c drivers/gpu/drm/i915/display/intel_parent.c drivers/gpu/drm/i915/display/intel_parent.h +2 more+20 -91 reply
7/13drm/i915/vma: Extract intel_gtt_view_compare()drivers/gpu/drm/i915/i915_vma.h+27 -170 replies
8/13drm/i915/vma: Introduce i915_vma_lookup()drivers/gpu/drm/i915/i915_vma.c drivers/gpu/drm/i915/i915_vma.h+36 -80 replies
9/13drm/i915/dpt: Make i915_dpt_{suspend, resume}() internal to i915drivers/gpu/drm/i915/display/intel_display_driver.c drivers/gpu/drm/i915/display/intel_dpt.c drivers/gpu/drm/i915/display/intel_dpt.h +8 more+95 -910 replies
10/13drm/i915/dpt: Cache DPTs in the gem objectdrivers/gpu/drm/i915/display/intel_display_types.h drivers/gpu/drm/i915/display/intel_fb.c drivers/gpu/drm/i915/display/intel_parent.c +9 more+180 -962 replies
11/13drm/i915/dpt: Hide the DPT even more from the display codedrivers/gpu/drm/i915/display/intel_fb.c drivers/gpu/drm/i915/display/intel_parent.c drivers/gpu/drm/i915/display/intel_parent.h +5 more+15 -660 replies
12/13drm/i915/dpt: Remove dpt->vmadrivers/gpu/drm/i915/i915_dpt.c drivers/gpu/drm/i915/i915_dpt.h drivers/gpu/drm/i915/i915_fb_pin.c+6 -80 replies
13/13drm/i915/dpt: s/struct intel_dpt/struct i915_dpt/drivers/gpu/drm/i915/i915_dpt.c drivers/gpu/drm/i915/i915_dpt.h drivers/gpu/drm/i915/i915_fb_pin.c+41 -410 replies

Reviews trailers per patch

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

PatchJuha-Pekka Heikkila
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13R-b
11/13
12/13
13/13

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

Read the v1 thread

Cover letter [PATCH 00/13] drm/i915/dpt: Optimize i915 DPT

From: Ville Syrjälä <[email protected]>

My original i915 DPT implementation has one annoying performance flaw. It creates a new DPT for every new framebuffers, which given your typical dumb userspace implementation happens every single frame. The intel ddx might be the only userspace implementation with a userspace side cache of framebuffers, but the intel ddx does not even support any platform with DPT, so not relevant here.

Take a page out of the i915 vma book and cache the DPTs in the gem object instead. This way the same DPT will get reused as long as userspace keeps rotating through the same set of gem objects (which is the case).

As a bonus the whole DPT parent interface disappears from the display side.

Ville Syrjälä (13):
drm/i915: Bump surface alignment to 32k on MTL for async flips drm/i915/fb: Fix error handling onion in intel_framebuffer_init() drm/i915/dpt: Stop allocation DPTs from stolen drm/i915/fb_pin: Remove overzealous vma NULL checks drm/i915: intel_{remapped,rotation}_info_size() into
intel/gtt_view_types.h
drm/i915/dpt: Compute DPT size in the DPT code drm/i915/vma: Extract intel_gtt_view_compare() drm/i915/vma: Introduce i915_vma_lookup() drm/i915/dpt: Make i915_dpt_{suspend,resume}() internal to i915 drm/i915/dpt: Cache DPTs in the gem object drm/i915/dpt: Hide the DPT even more from the display code drm/i915/dpt: Remove dpt->vma
drm/i915/dpt: s/struct intel_dpt/struct i915_dpt/

 .../drm/i915/display/intel_display_driver.c   |   2 +-
 .../drm/i915/display/intel_display_types.h    |   3 -
 drivers/gpu/drm/i915/display/intel_dpt.c      |  58 -----
 drivers/gpu/drm/i915/display/intel_dpt.h      |   2 -
 drivers/gpu/drm/i915/display/intel_fb.c       |  64 +----
 drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
 drivers/gpu/drm/i915/display/intel_parent.c   |  40 +--
 drivers/gpu/drm/i915/display/intel_parent.h   |  14 +-
 drivers/gpu/drm/i915/display/intel_plane.c    |  13 +-
 .../drm/i915/display/skl_universal_plane.c    |   9 +
 drivers/gpu/drm/i915/gem/i915_gem_object.c    |   6 +
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |   6 +
 drivers/gpu/drm/i915/gt/intel_ggtt.c          |  10 +
 drivers/gpu/drm/i915/gt/intel_gtt.h           |   4 +
 drivers/gpu/drm/i915/i915_dpt.c               | 233 ++++++++++++++----
 drivers/gpu/drm/i915/i915_dpt.h               |  21 +-
 drivers/gpu/drm/i915/i915_driver.c            |   8 -
 drivers/gpu/drm/i915/i915_fb_pin.c            |  56 +++--
 drivers/gpu/drm/i915/i915_vma.c               |  42 +++-
 drivers/gpu/drm/i915/i915_vma.h               |  49 ++--
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |  15 +-
 drivers/gpu/drm/xe/display/xe_initial_plane.c |   3 +-
 include/drm/intel/display_parent_interface.h  |  17 +-
 include/drm/intel/gtt_view_types.h            |  38 +++
 24 files changed, 400 insertions(+), 316 deletions(-)
Signature · 1 line
2.56.0