mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 14:16:39 -04:00
drm/atomic-state-helper: Rename __drm_atomic_helper_plane_state_reset()
__drm_atomic_helper_plane_state_reset() is used to initialize a newly allocated drm_plane_state, and is being typically called by the drm_plane_funcs.reset implementation. Since we want to consolidate DRM objects state allocation around the atomic_create_state callback that will only allocate and initialize a new drm_plane_state instance, we will need to call __drm_atomic_helper_plane_state_reset() from both the reset and atomic_create hooks. To avoid any confusion, we can thus rename __drm_atomic_helper_plane_state_reset() to __drm_atomic_helper_plane_state_init(). Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Link: https://patch.msgid.link/20260526-drm-mode-config-init-v6-9-852346394200@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
@@ -237,15 +237,15 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
|
||||
EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);
|
||||
|
||||
/**
|
||||
* __drm_atomic_helper_plane_state_reset - resets plane state to default values
|
||||
* __drm_atomic_helper_plane_state_init - Initialize the plane state
|
||||
* @plane_state: atomic plane state, must not be NULL
|
||||
* @plane: plane object, must not be NULL
|
||||
*
|
||||
* Initializes the newly allocated @plane_state with default
|
||||
* values. This is useful for drivers that subclass the CRTC state.
|
||||
* values. This is useful for drivers that subclass the plane state.
|
||||
*/
|
||||
void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state,
|
||||
struct drm_plane *plane)
|
||||
void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state,
|
||||
struct drm_plane *plane)
|
||||
{
|
||||
u64 val;
|
||||
|
||||
@@ -297,7 +297,7 @@ void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state,
|
||||
plane_state->hotspot_y = val;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(__drm_atomic_helper_plane_state_reset);
|
||||
EXPORT_SYMBOL(__drm_atomic_helper_plane_state_init);
|
||||
|
||||
/**
|
||||
* __drm_atomic_helper_plane_reset - reset state on plane
|
||||
@@ -315,7 +315,7 @@ void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
|
||||
struct drm_plane_state *plane_state)
|
||||
{
|
||||
if (plane_state)
|
||||
__drm_atomic_helper_plane_state_reset(plane_state, plane);
|
||||
__drm_atomic_helper_plane_state_init(plane_state, plane);
|
||||
|
||||
plane->state = plane_state;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ static void intel_plane_state_reset(struct intel_plane_state *plane_state,
|
||||
{
|
||||
memset(plane_state, 0, sizeof(*plane_state));
|
||||
|
||||
__drm_atomic_helper_plane_state_reset(&plane_state->uapi, &plane->base);
|
||||
__drm_atomic_helper_plane_state_init(&plane_state->uapi, &plane->base);
|
||||
|
||||
plane_state->scaler_id = -1;
|
||||
plane_state->fence_id = -1;
|
||||
|
||||
@@ -53,7 +53,7 @@ void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state);
|
||||
void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *state);
|
||||
|
||||
void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *state,
|
||||
void __drm_atomic_helper_plane_state_init(struct drm_plane_state *state,
|
||||
struct drm_plane *plane);
|
||||
void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
|
||||
struct drm_plane_state *state);
|
||||
|
||||
Reference in New Issue
Block a user