Skip to content

drm/{i915, xe}: clean up and deduplicate initial plane handling

Jani Nikula intel-gfx intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15drm/i915: move display/intel_plane_initial.c to i915_initial_plane.cdrivers/gpu/drm/i915/Makefile drivers/gpu/drm/i915/i915_initial_plane.c+10 -90 replies
2/15drm/xe/display: rename xe_plane_initial.c to xe_initial_plane.cdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/display/xe_initial_plane.c+1 -10 replies
3/15drm/i915: rename intel_plane_initial.h to intel_initial_plane.hdrivers/gpu/drm/i915/display/intel_display.c drivers/gpu/drm/i915/display/intel_display_driver.c drivers/gpu/drm/i915/display/intel_initial_plane.h +2 more+14 -140 replies
4/15drm/{i915, xe}: move initial plane calls to parent interfacedrivers/gpu/drm/i915/Makefile drivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_driver.c +7 more+78 -80 replies
5/15drm/{i915, xe}: deduplicate intel_initial_plane_config() between i915 and xedrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c +1 more+62 -840 replies
6/15drm/{i915, xe}: deduplicate plane_config_fini() between i915 and xedrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c+10 -190 replies
7/15drm/{i915, xe}: start deduplicating intel_find_initial_plane_obj() between i915 and xedrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c +1 more+38 -540 replies
8/15drm/i915: return plane_state from intel_reuse_initial_plane_obj()drivers/gpu/drm/i915/i915_initial_plane.c+14 -120 replies
9/15drm/xe: return plane_state from intel_reuse_initial_plane_obj()drivers/gpu/drm/xe/display/xe_initial_plane.c+15 -110 replies
10/15drm/i915: further deduplicate intel_find_initial_plane_obj()drivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c +1 more+88 -1110 replies
11/15drm/{i915, xe}: deduplicate intel_alloc_initial_plane_obj() FB modifier checksdrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c+14 -260 replies
12/15drm/{i915,xe}: deduplicate initial plane setupdrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c+26 -500 replies
13/15drm/{i915, xe}: pass struct drm_plane_state instead of struct drm_crtc to ->setupdrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c +1 more+8 -150 replies
14/15drm/{i915, xe}: pass struct drm_device instead of drm_device to ->alloc_objdrivers/gpu/drm/i915/display/intel_initial_plane.c drivers/gpu/drm/i915/i915_initial_plane.c drivers/gpu/drm/xe/display/xe_initial_plane.c +1 more+8 -130 replies
15/15drm/i915: drop dependency on struct intel_display from i915 initial planedrivers/gpu/drm/i915/i915_initial_plane.c+17 -260 replies

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVille Syrjälä
SeriesR-b
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

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/15] drm/{i915, xe}: clean up and deduplicate initial plane handling

The i915 and xe initial plane handling deviate at a too high level, leading to lots of duplication between the two. This series starts to clean it up by moving it to display parent interface, and deduplicating piecemeal.

This is intentionally done in small chunks to ease review and catch regressions (hopefully none).

There's still more to be done, e.g. it's pointless to have both i915 and xe call intel_framebuffer_init(), but there's some error path stuff to figure out before doing this. And I ran out of steam a bit, and the series got pretty long already.

Anyway, by reducing duplication, the series highlights the differences between i915 and xe.

BR,
Jani.

Jani Nikula (15):
drm/i915: move display/intel_plane_initial.c to i915_initial_plane.c drm/xe/display: rename xe_plane_initial.c to xe_initial_plane.c drm/i915: rename intel_plane_initial.h to intel_initial_plane.h drm/{i915,xe}: move initial plane calls to parent interface drm/{i915,xe}: deduplicate intel_initial_plane_config() between i915
and xe
drm/{i915,xe}: deduplicate plane_config_fini() between i915 and xe drm/{i915,xe}: start deduplicating intel_find_initial_plane_obj()
between i915 and xe
drm/i915: return plane_state from intel_reuse_initial_plane_obj() drm/xe: return plane_state from intel_reuse_initial_plane_obj() drm/i915: further deduplicate intel_find_initial_plane_obj() drm/{i915,xe}: deduplicate intel_alloc_initial_plane_obj() FB modifier
checks
drm/{i915,xe}: deduplicate initial plane setup drm/{i915,xe}: pass struct drm_plane_state instead of struct drm_crtc

    to ->setup
  drm/{i915,xe}: pass struct drm_device instead of drm_device to
    ->alloc_obj

drm/i915: drop dependency on struct intel_display from i915 initial
plane

 drivers/gpu/drm/i915/Makefile                 |   3 +-
 drivers/gpu/drm/i915/display/intel_display.c  |   8 +-
 .../drm/i915/display/intel_display_driver.c   |   2 +-
 .../drm/i915/display/intel_initial_plane.c    | 193 ++++++++
 ..._plane_initial.h => intel_initial_plane.h} |   6 +-
 .../drm/i915/display/intel_plane_initial.c    | 442 ------------------
 drivers/gpu/drm/i915/i915_driver.c            |   2 +
 drivers/gpu/drm/i915/i915_initial_plane.c     | 290 ++++++++++++
 drivers/gpu/drm/i915/i915_initial_plane.h     |   9 +
 drivers/gpu/drm/xe/Makefile                   |   3 +-
 drivers/gpu/drm/xe/display/xe_display.c       |   2 +
 drivers/gpu/drm/xe/display/xe_initial_plane.c | 189 ++++++++
 drivers/gpu/drm/xe/display/xe_initial_plane.h |   9 +
 drivers/gpu/drm/xe/display/xe_plane_initial.c | 321 -------------
 include/drm/intel/display_parent_interface.h  |  17 +
 15 files changed, 723 insertions(+), 773 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_initial_plane.c
 rename drivers/gpu/drm/i915/display/{intel_plane_initial.h => intel_initial_plane.h} (60%)
 delete mode 100644 drivers/gpu/drm/i915/display/intel_plane_initial.c
 create mode 100644 drivers/gpu/drm/i915/i915_initial_plane.c
 create mode 100644 drivers/gpu/drm/i915/i915_initial_plane.h
 create mode 100644 drivers/gpu/drm/xe/display/xe_initial_plane.c
 create mode 100644 drivers/gpu/drm/xe/display/xe_initial_plane.h
 delete mode 100644 drivers/gpu/drm/xe/display/xe_plane_initial.c
Signature · 1 line
2.47.3