|
|
Log in / Subscribe / Register

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

From:  Chaitanya Kumar Borah <chaitanya.kumar.borah-AT-intel.com>
To:  dri-devel-AT-lists.freedesktop.org, intel-gfx-AT-lists.freedesktop.org, intel-xe-AT-lists.freedesktop.org, amd-gfx-AT-lists.freedesktop.org
Subject:  [PATCH v2 00/13] drm: Color pipeline teardown and follow-up fixes/improvements
Date:  Fri, 09 Jan 2026 13:47:15 +0530
Message-ID:  <20260109081728.478844-1-chaitanya.kumar.borah@intel.com>
Cc:  harry.wentland-AT-amd.com, jani.nikula-AT-linux.intel.com, louis.chauvet-AT-bootlin.com, mwen-AT-igalia.com, contact-AT-emersion.fr, alex.hung-AT-amd.com, daniels-AT-collabora.com, uma.shankar-AT-intel.com, suraj.kandpal-AT-intel.com, nfraprado-AT-collabora.com, ville.syrjala-AT-linux.intel.com, matthew.d.roper-AT-intel.com
Archive-link:  Article

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/cbe00ac4-a535-47d3-813a...
[2] https://lore.kernel.org/intel-gfx/20251203085211.3663374-...

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

==
Chaitanya

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>
Cc: Melissa Wen <mwen@igalia.com>
Cc: Simon Ser <contact@emersion.fr>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Nícolas F. R. A. Prado <nfraprado@collabora.com>

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                 |  46 +++--
 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                     |  40 +++-
 10 files changed, 264 insertions(+), 90 deletions(-)

-- 
2.25.1



Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds