> -----Original Message-----
> From: Borah, Chaitanya Kumar <[email protected]>
> Sent: Friday, December 19, 2025 12:26 PM
> To: [email protected]; [email protected]; intel-
> [email protected]; [email protected]
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Shankar, Uma
> <[email protected]>; Kandpal, Suraj <[email protected]>;
> [email protected]; [email protected]; Roper, Matthew D
> <[email protected]>
> Subject: [PATCH 07/13] drm/amd/display: Hook up colorop destroy helper for
> plane pipelines
> 
> Provide a drm_colorop_funcs instance for amdgpu_dm color pipeline objects and
> hook up the common drm_colorop_destroy() helper as the destroy callback.

Looks Good to me.
Reviewed-by: Uma Shankar <[email protected]>

> Signed-off-by: Chaitanya Kumar Borah <[email protected]>
> ---
>  .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 25 +++++++++++++------
>  1 file changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
> index dfdb4fb4219f..5130962193d9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
> @@ -55,6 +55,10 @@ const u64 amdgpu_dm_supported_blnd_tfs =
> 
>  #define LUT3D_SIZE           17
> 
> +static const struct drm_colorop_funcs dm_colorop_funcs = {
> +     .destroy = drm_colorop_destroy,
> +};
> +
>  int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct
> drm_prop_enum_list *list)  {
>       struct drm_colorop *ops[MAX_COLOR_PIPELINE_OPS]; @@ -72,7 +76,7
> @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct
> drm_pr
>               goto cleanup;
>       }
> 
> -     ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
> +     ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane,
> +&dm_colorop_funcs,
>                                             amdgpu_dm_supported_degam_tfs,
> 
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
>       if (ret)
> @@ -89,7 +93,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane
> *plane, struct drm_pr
>               goto cleanup;
>       }
> 
> -     ret = drm_plane_colorop_mult_init(dev, ops[i], plane, NULL,
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
> +     ret = drm_plane_colorop_mult_init(dev, ops[i], plane, &dm_colorop_funcs,
> +
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
>       if (ret)
>               goto cleanup;
> 
> @@ -104,7 +109,8 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>               goto cleanup;
>       }
> 
> -     ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane, NULL,
> +     ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane,
> +                                          &dm_colorop_funcs,
> 
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
>       if (ret)
>               goto cleanup;
> @@ -121,7 +127,7 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>                       goto cleanup;
>               }
> 
> -             ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
> +             ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane,
> +&dm_colorop_funcs,
> 
>       amdgpu_dm_supported_shaper_tfs,
> 
>       DRM_COLOROP_FLAG_ALLOW_BYPASS);
>               if (ret)
> @@ -138,7 +144,8 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>                       goto cleanup;
>               }
> 
> -             ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane,
> NULL,
> +             ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane,
> +                                                     &dm_colorop_funcs,
> 
>       MAX_COLOR_LUT_ENTRIES,
> 
>       DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
> 
>       DRM_COLOROP_FLAG_ALLOW_BYPASS);
> @@ -156,7 +163,8 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>                       goto cleanup;
>               }
> 
> -             ret = drm_plane_colorop_3dlut_init(dev, ops[i], plane, NULL,
> LUT3D_SIZE,
> +             ret = drm_plane_colorop_3dlut_init(dev, ops[i], plane,
> +                                     &dm_colorop_funcs, LUT3D_SIZE,
> 
>       DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
> 
>       DRM_COLOROP_FLAG_ALLOW_BYPASS);
>               if (ret)
> @@ -174,7 +182,7 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>               goto cleanup;
>       }
> 
> -     ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
> +     ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane,
> +&dm_colorop_funcs,
>                                             amdgpu_dm_supported_blnd_tfs,
> 
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
>       if (ret)
> @@ -191,7 +199,8 @@ int amdgpu_dm_initialize_default_pipeline(struct
> drm_plane *plane, struct drm_pr
>               goto cleanup;
>       }
> 
> -     ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane, NULL,
> MAX_COLOR_LUT_ENTRIES,
> +     ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane,
> &dm_colorop_funcs,
> +                                               MAX_COLOR_LUT_ENTRIES,
> 
> DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
> 
> DRM_COLOROP_FLAG_ALLOW_BYPASS);
>       if (ret)
> --
> 2.25.1

Reply via email to