summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gud
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2026-04-27 09:02:57 +0200
committerDave Airlie <airlied@redhat.com>2026-05-04 14:05:04 +1000
commit5164f7e7ff8ec7d41065d3862630c2ba09854328 (patch)
tree91fed44944775fb14b53ffc13e51e66c95d20016 /drivers/gpu/drm/gud
parent7fd2df204f342fc17d1a0bfcd474b24232fb0f32 (diff)
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 <simona.vetter@ffwll.ch> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260427-drm-drm-atomic-update-v4-1-c0e713bfdf25@kernel.org
Diffstat (limited to 'drivers/gpu/drm/gud')
-rw-r--r--drivers/gpu/drm/gud/gud_connector.c10
-rw-r--r--drivers/gpu/drm/gud/gud_internal.h8
-rw-r--r--drivers/gpu/drm/gud/gud_pipe.c8
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/gud/gud_connector.c b/drivers/gpu/drm/gud/gud_connector.c
index a91a7e96cb88..ea0cca58b7c8 100644
--- a/drivers/gpu/drm/gud/gud_connector.c
+++ b/drivers/gpu/drm/gud/gud_connector.c
@@ -62,13 +62,13 @@ static void gud_connector_backlight_update_status_work(struct work_struct *work)
struct drm_connector_state *connector_state;
struct drm_device *drm = connector->dev;
struct drm_modeset_acquire_ctx ctx;
- struct drm_atomic_state *state;
+ struct drm_atomic_commit *state;
int idx, ret;
if (!drm_dev_enter(drm, &idx))
return;
- state = drm_atomic_state_alloc(drm);
+ state = drm_atomic_commit_alloc(drm);
if (!state) {
ret = -ENOMEM;
goto exit;
@@ -89,12 +89,12 @@ retry:
ret = drm_atomic_commit(state);
out:
if (ret == -EDEADLK) {
- drm_atomic_state_clear(state);
+ drm_atomic_commit_clear(state);
drm_modeset_backoff(&ctx);
goto retry;
}
- drm_atomic_state_put(state);
+ drm_atomic_commit_put(state);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
@@ -285,7 +285,7 @@ out:
}
static int gud_connector_atomic_check(struct drm_connector *connector,
- struct drm_atomic_state *state)
+ struct drm_atomic_commit *state)
{
struct drm_connector_state *new_state;
struct drm_crtc_state *new_crtc_state;
diff --git a/drivers/gpu/drm/gud/gud_internal.h b/drivers/gpu/drm/gud/gud_internal.h
index 8eec8335f5f9..95744b0b6c72 100644
--- a/drivers/gpu/drm/gud/gud_internal.h
+++ b/drivers/gpu/drm/gud/gud_internal.h
@@ -63,13 +63,13 @@ int gud_usb_set_u8(struct gud_device *gdrm, u8 request, u8 val);
void gud_clear_damage(struct gud_device *gdrm);
void gud_flush_work(struct work_struct *work);
void gud_crtc_atomic_enable(struct drm_crtc *crtc,
- struct drm_atomic_state *state);
+ struct drm_atomic_commit *state);
void gud_crtc_atomic_disable(struct drm_crtc *crtc,
- struct drm_atomic_state *state);
+ struct drm_atomic_commit *state);
int gud_plane_atomic_check(struct drm_plane *plane,
- struct drm_atomic_state *state);
+ struct drm_atomic_commit *state);
void gud_plane_atomic_update(struct drm_plane *plane,
- struct drm_atomic_state *atomic_state);
+ struct drm_atomic_commit *atomic_state);
int gud_connector_fill_properties(struct drm_connector_state *connector_state,
struct gud_property_req *properties);
int gud_get_connectors(struct gud_device *gdrm);
diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c
index 495804e1d200..5ef887d8485a 100644
--- a/drivers/gpu/drm/gud/gud_pipe.c
+++ b/drivers/gpu/drm/gud/gud_pipe.c
@@ -451,7 +451,7 @@ static void gud_fb_handle_damage(struct gud_device *gdrm, struct drm_framebuffer
}
int gud_plane_atomic_check(struct drm_plane *plane,
- struct drm_atomic_state *state)
+ struct drm_atomic_commit *state)
{
struct gud_device *gdrm = to_gud_device(plane->dev);
struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
@@ -581,7 +581,7 @@ out:
}
void gud_crtc_atomic_enable(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
+ struct drm_atomic_commit *state)
{
struct drm_device *drm = crtc->dev;
struct gud_device *gdrm = to_gud_device(drm);
@@ -598,7 +598,7 @@ void gud_crtc_atomic_enable(struct drm_crtc *crtc,
}
void gud_crtc_atomic_disable(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
+ struct drm_atomic_commit *state)
{
struct drm_device *drm = crtc->dev;
struct gud_device *gdrm = to_gud_device(drm);
@@ -614,7 +614,7 @@ void gud_crtc_atomic_disable(struct drm_crtc *crtc,
}
void gud_plane_atomic_update(struct drm_plane *plane,
- struct drm_atomic_state *atomic_state)
+ struct drm_atomic_commit *atomic_state)
{
struct drm_device *drm = plane->dev;
struct gud_device *gdrm = to_gud_device(drm);