Skip to content

drm: Color pipeline teardown and follow-up fixes/improvements

Chaitanya Kumar Borah amd-gfx dri-devel intel-gfx intel-xe 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 posting 2/29 patches 0 repliesNew
  2. v3 Latest13 patches 5 repliesIn review
  3. v213 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 posting 1/213 patches32 repliesSuperseded

Changes in v3 from the cover letter

- Add documentation only to function definition (Jani)
- s/nvl/xe3plpd (Suraj)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/i915/color: Place 3D LUT after CSC in plane color pipelinedrivers/gpu/drm/i915/display/intel_color_pipeline.c+9 -90 replies
2/13drm/amd/display: Fix color pipeline enum name leakdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c+12 -50 replies
3/13drm/vkms: Fix color pipeline enum name leakdrivers/gpu/drm/vkms/vkms_colorop.c+8 -70 replies
4/13drm/i915/display: Fix color pipeline enum name leakdrivers/gpu/drm/i915/display/intel_color_pipeline.c+13 -50 replies
5/13drm/colorop: Add destroy helper for colorop objectsdrivers/gpu/drm/drm_colorop.c include/drm/drm_colorop.h+17 -00 replies
6/13drm: Allow driver-managed destruction of colorop objectsdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c drivers/gpu/drm/drm_colorop.c drivers/gpu/drm/i915/display/intel_color_pipeline.c +2 more+66 -312 replies
7/13drm/amd/display: Hook up colorop destroy helper for plane pipelinesdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c+17 -80 replies
8/13drm/vkms: Hook up colorop destroy helper for plane pipelinesdrivers/gpu/drm/vkms/vkms_colorop.c+10 -40 replies
9/13drm/i915/display: Hook up intel_colorop_destroydrivers/gpu/drm/i915/display/intel_color_pipeline.c drivers/gpu/drm/i915/display/intel_colorop.c drivers/gpu/drm/i915/display/intel_colorop.h+16 -40 replies
10/13drm: Clean up colorop objects during mode_config cleanupdrivers/gpu/drm/drm_mode_config.c+6 -00 replies
11/13drm/vkms: Remove drm_colorop_pipeline_destroy() from vkms_destroy()drivers/gpu/drm/vkms/vkms_drv.c+0 -10 replies
12/13drm/colorop: Use destroy callback for color pipeline teardowndrivers/gpu/drm/drm_colorop.c+1 -20 replies
13/13drm/i915/color: Add failure handling in plane color pipeline initdrivers/gpu/drm/i915/display/intel_color_pipeline.c+117 -470 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSuraj KandpalUma ShankarAlex HungLouis ChauvetJani Nikula
SeriesA-b
1/13R-b R-b
2/13R-b R-b
3/13R-b R-b R-b
4/13R-b R-b
5/13R-b R-b R-b
6/13R-b R-b R-b
7/13R-b R-b
8/13R-b R-b R-b
9/13R-b R-b
10/13R-b R-b R-b
11/13R-b R-b
12/13R-b R-b R-b
13/13R-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 5 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/13] drm: Color pipeline teardown and follow-up fixes/improvements

This series contains follow-up fixes and improvements for the DRM color pipeline infrastructure that was introduced in v6.19.[1][2]

The central handling of clean up of colorop from the mode_config list is missing. While vkms calls drm_colorop_pipeline_destroy() in vkms_destroy(), amd driver calls it only during failure of the init path and i915/xe driver does not call it at all. This means amd and intel leaks these objects on driver removal.

This series adds the teardown of mode_config.colorop_list in drm_mode_config_cleanup(). Since, i915/xe sub-classes the drm_colorop within intel_colorop it was not enough to just use drm_colorop_pipeline_destroy(). Therefore, this series

- Introduces driver-managed destruction for drm_colorop objects and updates core helpers to use driver-provided destroy callbacks.
- Ensures all colorop objects are correctly torn down during mode_config cleanup and driver removal.

In addition to that following changes are made in the series
- Fixes enum name lifetime leaks in color pipeline init in i915, amdgpu_dm, and vkms
- Corrects the ordering of the 3D LUT block in the i915 plane color pipeline
- Refactors i915 plane color pipeline initialization to reliably clean up partially constructed pipelines on failure.

Thanks for taking a look. Feedback is welcome.

[1] https://lore.kernel.org/dri-devel/[email protected]/
[2] https://lore.kernel.org/intel-gfx/[email protected]/

v2:
- Re-arrange patches (Alex)
- Re-factor code to avoid repitition in pipeline creation (Suraj)

v3:
- Add documentation only to function definition (Jani)
- s/nvl/xe3plpd (Suraj)

Chaitanya Kumar Borah (13):
drm/i915/color: Place 3D LUT after CSC in plane color pipeline drm/amd/display: Fix color pipeline enum name leak drm/vkms: Fix color pipeline enum name leak drm/i915/display: Fix color pipeline enum name leak drm/colorop: Add destroy helper for colorop objects
drm: Allow driver-managed destruction of colorop objects drm/amd/display: Hook up colorop destroy helper for plane pipelines drm/vkms: Hook up colorop destroy helper for plane pipelines drm/i915/display: Hook up intel_colorop_destroy
drm: Clean up colorop objects during mode_config cleanup drm/vkms: Remove drm_colorop_pipeline_destroy() from vkms_destroy() drm/colorop: Use destroy callback for color pipeline teardown drm/i915/color: Add failure handling in plane color pipeline init

 .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c |  31 ++-
 .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   |  13 +-
 drivers/gpu/drm/drm_colorop.c                 |  49 +++--
 drivers/gpu/drm/drm_mode_config.c             |   6 +
 .../drm/i915/display/intel_color_pipeline.c   | 179 +++++++++++++-----
 drivers/gpu/drm/i915/display/intel_colorop.c  |   6 +
 drivers/gpu/drm/i915/display/intel_colorop.h  |   1 +
 drivers/gpu/drm/vkms/vkms_colorop.c           |  31 +--
 drivers/gpu/drm/vkms/vkms_drv.c               |   1 -
 include/drm/drm_colorop.h                     |  32 +++-
 10 files changed, 259 insertions(+), 90 deletions(-)
Signature · 1 line
2.25.1