On Thu, 17 Sep 2026, Thomas Huth <[email protected]> wrote: > On 27/04/2026 09.02, Maxime Ripard wrote: >> 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 <[email protected]> >> Acked-by: Thomas Zimmermann <[email protected]> >> Acked-by: Jani Nikula <[email protected]> >> Reviewed-by: Luca Ceresoli <[email protected]> >> Tested-by: Luca Ceresoli <[email protected]> >> Signed-off-by: Maxime Ripard <[email protected]> >> --- > ... >> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c >> index 41c57063f3b4..4ffa057e2784 100644 >> --- a/drivers/gpu/drm/drm_atomic.c >> +++ b/drivers/gpu/drm/drm_atomic.c > ... >> @@ -1764,16 +1764,16 @@ EXPORT_SYMBOL(drm_atomic_check_only); >> * Note that this function can return -EDEADLK if the driver needed to >> acquire >> * more locks but encountered a deadlock. The caller must then do the >> usual w/w >> * backoff dance and restart. All other errors are fatal. >> * >> * This function will take its own reference on @state. >> - * Callers should always release their reference with >> drm_atomic_state_put(). >> + * Callers should always release their reference with >> drm_atomic_commit_put(). >> * >> * Returns: >> * 0 on success, negative error code on failure. >> */ >> -int drm_atomic_commit(struct drm_atomic_state *state) >> +int drm_atomic_commit(struct drm_atomic_commit *state) > This causes now warnings when running "make htmldocs" : > > .../Documentation/gpu/drm-kms:308: .../drivers/gpu/drm/drm_atomic.c:1841: > WARNING: Duplicate C declaration, also defined at gpu/drm-kms:408. > Declaration is '.. c:function:: int drm_atomic_commit (struct > drm_atomic_commit *state)'. [duplicate_declaration.c] > > Should the function maybe be renamed now?
No. It's a long-standing limitation in Sphinx that it doesn't support the namespaces C has for functions and types. The workaround is to wrap one or the other in an explicit Sphinx namespace in the .rst file. BR, Jani. -- Jani Nikula, Intel
