On 1/22/2026 3:27 PM, Maarten Lankhorst wrote:
Hey,
Den 2026-01-21 kl. 14:51, skrev Jani Nikula:
On Tue, 13 Jan 2026, Chaitanya Kumar Borah <[email protected]>
wrote:
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.
I did not do detailed review, but
Acked-by: Jani Nikula <[email protected]>
for merging via drm-misc.
Please coordinate with drm and drm-misc maintainers on which branch
these should merged through. IIUC there are memory leak fixes for
changes heading to v6.19, which speaks for drm-misc-fixes. But is it too
much at this stage? Up to drm and drm-misc maintainers I think.
I pushed the first 4 patches from this series as they have to be
addressed most urgently. It's a leak affecting each system and
incorrect UAPI being presented for intel/display colorops.
We need to discuss on how to merge patches 5-13. Should we put
it in a topic branch or push it to drm-misc-next-fixes?
Thank you very much, Maarten, for merging the patches.
In case the "Fixes" tag is mandatory to push through
drm-misc-next-fixes/drm-misc-fixes, the best approach I see would be to
add the following tags on the drm core patches. (i.e the first patches
that added colorop for respective drivers)
Fixes: ef105316819d ("drm/i915/color: Create a transfer function color
pipeline")
Fixes: c1e578bd08da ("drm/vkms: Add enumerated 1D curve colorop")
Fixes: 9ba25915efba ("drm/amd/display: Add support for sRGB EOTF in
DEGAM block")
and then add the corresponding Fixes tag to the indivisual
driver-specific patches.
This won't be totally accurate for vkms as it was already cleaning up
the colorops but the patches are too intertwined to isolate it.
Please let me know if this sounds reasonable.
Thanks also to Jani for the ack.
==
Chaitanya
Kind regards,
~Maarten Lankhorst