]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/color: Add failure handling in plane color pipeline init
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Mon, 2 Feb 2026 09:42:02 +0000 (15:12 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Tue, 10 Feb 2026 05:33:13 +0000 (11:03 +0530)
commit55c19e27c56d7843afd08634114d510f67f75370
tree9005fa579065300524649350b257585ea734655f
parent3c2d28f4a67af7ada8f3332270b0d349967e6aa1
drm/i915/color: Add failure handling in plane color pipeline init

The plane color pipeline initialization built up multiple colorop blocks
inline, but did not reliably clean up partially constructed pipelines
when an intermediate step failed. This could lead to leaked colorop
objects and fragile error handling as the pipeline grows.

Refactor the pipeline construction to use a common helper for adding
colorop blocks. This centralizes allocation, initialization, and
teardown logic, allowing the caller to reliably unwind all previously
created colorops on failure.

v2:
 - Refactor code to avoid repetition (Suraj)

v3:
 - s/nvl/xe3plpd (Suraj)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260202094202.2871478-10-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/i915/display/intel_color_pipeline.c