Re: [PATCH v2 04/61] drm/gem-atomic-helper: Switch DRM_GEM_SHADOW_PLANE_FUNCS to atomic_create_state

[email protected]
Newsgroups org.freedesktop.lists.dri-devel
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The function `drm_gem_reset_shadow_plane` is now dead code and should be removed.
--

--- Patch [4]: [PATCH v2 04/61] drm/gem-atomic-helper: Switch DRM_GEM_SHADOW_PLANE_FUNCS to atomic_create_state ---
commit e875af062658268c58ae3dc27d813b18fda75580
Author: Maxime Ripard <[email protected]>

drm/gem-atomic-helper: Switch DRM_GEM_SHADOW_PLANE_FUNCS to atomic_create_state

This commit updates the DRM_GEM_SHADOW_PLANE_FUNCS macro to use
atomic_create_state instead of reset. It maps the atomic_create_state
callback to drm_gem_create_shadow_plane_state.

> diff --git a/include/drm/drm_gem_atomic_helper.h b/include/drm/drm_gem_atomic_helper.h
> index 8a3bb27233db0..da8a4fb442b46 100644
> --- a/include/drm/drm_gem_atomic_helper.h
> +++ b/include/drm/drm_gem_atomic_helper.h

[ ... ]

> @@ -110,7 +110,7 @@ void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane,
>   * macro initializes struct drm_plane_funcs to use the rsp helper functions.
>   */
>  #define DRM_GEM_SHADOW_PLANE_FUNCS \
> -	.reset = drm_gem_reset_shadow_plane, \
> +	.atomic_create_state = drm_gem_create_shadow_plane_state, \

[Severity: Low]
Does this leave drm_gem_reset_shadow_plane() as unused dead code?

Since it is no longer referenced by this macro, it appears its prototype
in include/drm/drm_gem_atomic_helper.h and its definition (along with
the EXPORT_SYMBOL) in drivers/gpu/drm/drm_gem_atomic_helper.c could also
be removed.

>  	.atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
>  	.atomic_destroy_state = drm_gem_destroy_shadow_plane_state

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.