> Subject: [PATCH 10/13] drm: Clean up colorop objects during mode_config
> cleanup
> 
> Tear down all registered drm_colorop objects during
> drm_mode_config_cleanup() by invoking their destroy callbacks.
> 
> This ensures proper cleanup of color pipeline objects during DRM device
> removal.
> 
> Signed-off-by: Chaitanya Kumar Borah <[email protected]>

LGTM,
Reviewed-by: Suraj Kandpal <[email protected]>

> ---
>  drivers/gpu/drm/drm_mode_config.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_mode_config.c
> b/drivers/gpu/drm/drm_mode_config.c
> index d12db9b0bab8..84ae8a23a367 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -524,6 +524,7 @@ void drm_mode_config_cleanup(struct drm_device
> *dev)
>       struct drm_property *property, *pt;
>       struct drm_property_blob *blob, *bt;
>       struct drm_plane *plane, *plt;
> +     struct drm_colorop *colorop, *copt;
> 
>       list_for_each_entry_safe(encoder, enct, &dev-
> >mode_config.encoder_list,
>                                head) {
> @@ -553,6 +554,11 @@ void drm_mode_config_cleanup(struct drm_device
> *dev)
>               drm_property_destroy(dev, property);
>       }
> 
> +     list_for_each_entry_safe(colorop, copt, &dev-
> >mode_config.colorop_list,
> +                              head) {
> +             colorop->funcs->destroy(colorop);
> +     }
> +
>       list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
>                                head) {
>               plane->funcs->destroy(plane);
> --
> 2.25.1

Reply via email to