From 5164f7e7ff8ec7d41065d3862630c2ba09854328 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 27 Apr 2026 09:02:57 +0200 Subject: drm: Rename struct drm_atomic_state to drm_atomic_commit The KMS framework uses two slightly different definitions for the state concept. For a given object (plane, CRTC, encoder, etc., so drm_$OBJECT_state), the state is the entire state of that object. However, at the device level, drm_atomic_state refers to a state update for a limited number of objects. Thus, drm_atomic_state isn't the entire device state, but only the full state of some objects in that device. This has been an endless source of confusion and thus bugs. We can rename the drm_atomic_state structure to drm_atomic_commit to make it less confusing. This patch was created using: rg -l drm_atomic_state | \ xargs sed -i 's/drm_atomic_state/drm_atomic_commit/g; s/drm_atomic_commit_helper/drm_atomic_state_helper/g' mv drivers/gpu/drm/tests/drm_atomic_state_test.c drivers/gpu/drm/tests/drm_atomic_commit_test.c Acked-by: Simona Vetter Acked-by: Thomas Zimmermann Acked-by: Jani Nikula Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli Signed-off-by: Maxime Ripard Signed-off-by: Dave Airlie Link: https://patch.msgid.link/20260427-drm-drm-atomic-update-v4-1-c0e713bfdf25@kernel.org --- drivers/gpu/drm/sprd/sprd_dpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/drm/sprd') diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c index a3447622a33c..66990398b903 100644 --- a/drivers/gpu/drm/sprd/sprd_dpu.c +++ b/drivers/gpu/drm/sprd/sprd_dpu.c @@ -501,7 +501,7 @@ void sprd_dpu_stop(struct sprd_dpu *dpu) } static int sprd_plane_atomic_check(struct drm_plane *plane, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); @@ -526,7 +526,7 @@ static int sprd_plane_atomic_check(struct drm_plane *plane, } static void sprd_plane_atomic_update(struct drm_plane *drm_plane, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, drm_plane); @@ -537,7 +537,7 @@ static void sprd_plane_atomic_update(struct drm_plane *drm_plane, } static void sprd_plane_atomic_disable(struct drm_plane *drm_plane, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, drm_plane); @@ -636,7 +636,7 @@ static void sprd_crtc_mode_set_nofb(struct drm_crtc *crtc) } static void sprd_crtc_atomic_enable(struct drm_crtc *crtc, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct sprd_dpu *dpu = to_sprd_crtc(crtc); @@ -646,7 +646,7 @@ static void sprd_crtc_atomic_enable(struct drm_crtc *crtc, } static void sprd_crtc_atomic_disable(struct drm_crtc *crtc, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct sprd_dpu *dpu = to_sprd_crtc(crtc); struct drm_device *drm = dpu->base.dev; @@ -664,7 +664,7 @@ static void sprd_crtc_atomic_disable(struct drm_crtc *crtc, } static void sprd_crtc_atomic_flush(struct drm_crtc *crtc, - struct drm_atomic_state *state) + struct drm_atomic_commit *state) { struct sprd_dpu *dpu = to_sprd_crtc(crtc); -- cgit v1.2.3