]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/colorop: Use destroy callback for color pipeline teardown
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Mon, 2 Feb 2026 09:42:01 +0000 (15:12 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Tue, 10 Feb 2026 05:33:11 +0000 (11:03 +0530)
Switch drm_colorop_pipeline_destroy() to use the driver-provided
destroy callback instead of directly calling drm_colorop_cleanup()
and freeing the object.

This allows drivers that embed struct drm_colorop in driver-specific
objects to perform correct teardown.

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Alex Hung <alex.hung@amd.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-9-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/drm_colorop.c

index 2bce29176ab3195d4bfa85b05289e1fecce7bce3..aa19de769eb2e9443f57509a9c924ce839f9bbf1 100644 (file)
@@ -208,8 +208,7 @@ void drm_colorop_pipeline_destroy(struct drm_device *dev)
        struct drm_colorop *colorop, *next;
 
        list_for_each_entry_safe(colorop, next, &config->colorop_list, head) {
-               drm_colorop_cleanup(colorop);
-               kfree(colorop);
+               colorop->funcs->destroy(colorop);
        }
 }
 EXPORT_SYMBOL(drm_colorop_pipeline_destroy);