Thank you for your contribution! Sashiko AI review found 2 potential issue(s) 
to consider:
- [Low] Removing `drm_atomic_helper_plane_reset()` breaks the build for the 
VeriSilicon DRM driver due to a missed caller.
- [Low] The kernel-doc for `drm_plane_funcs.reset` still instructs drivers to 
use the removed `drm_atomic_helper_plane_reset()` function.
--

--- Patch [38]: [PATCH 38/60] drm/atomic-state-helper: Remove 
drm_atomic_helper_plane_reset() ---
commit 28fd99488064ec3128455fb576e0e475cfe40a1f
Author: Maxime Ripard <[email protected]>

drm/atomic-state-helper: Remove drm_atomic_helper_plane_reset()

This commit removes drm_atomic_helper_plane_reset() from the atomic state
helper. The commit message states that all callers now go through
drm_atomic_helper_plane_create_state().

> diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c 
> b/drivers/gpu/drm/drm_atomic_state_helper.c
> index d90d1d7c9cf9f..f184ce76e090d 100644
> --- a/drivers/gpu/drm/drm_atomic_state_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_state_helper.c
> @@ -346,25 +346,6 @@ void __drm_atomic_helper_plane_reset(struct drm_plane 
> *plane,
>  }
>  EXPORT_SYMBOL(__drm_atomic_helper_plane_reset);
>  
> -/**
> - * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for 
> planes
> - * @plane: drm plane
> - *
> - * Resets the atomic state for @plane by freeing the state pointer (which 
> might
> - * be NULL, e.g. at driver load time) and allocating a new empty state 
> object.
> - */
> -void drm_atomic_helper_plane_reset(struct drm_plane *plane)

[Severity: Low]
Are there still remaining callers of this function? It appears
vs_cursor_plane_funcs in drivers/gpu/drm/verisilicon/vs_cursor_plane.c
still references it for the .reset hook, which could break the build
when the VeriSilicon DRM driver is enabled:

drivers/gpu/drm/verisilicon/vs_cursor_plane.c:vs_cursor_plane_funcs:
        .reset          = drm_atomic_helper_plane_reset,

[Severity: Low]
Should the documentation in include/drm/drm_plane.h be updated as well?
The kernel-doc for struct drm_plane_funcs still instructs drivers to use
this removed function:

include/drm/drm_plane.h:
         * Atomic drivers can use drm_atomic_helper_plane_reset() to reset
         * atomic state using this hook.

> -{
> -     if (plane->state)
> -             __drm_atomic_helper_plane_destroy_state(plane->state);
> -
> -     kfree(plane->state);
> -     plane->state = kzalloc_obj(*plane->state);
> -     if (plane->state)
> -             __drm_atomic_helper_plane_reset(plane, plane->state);
> -}
> -EXPORT_SYMBOL(drm_atomic_helper_plane_reset);
> -

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=38

Reply via email to