diff mbox series

[v2,4/5] drm/atomic: Make the drm_atomic_state documentation less ambiguous

Message ID 20231214100917.277842-4-mripard@kernel.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/5] drm/atomic: Move the drm_atomic_state field doc inline | expand

Commit Message

Maxime Ripard Dec. 14, 2023, 10:09 a.m. UTC
The current documentation of drm_atomic_state says that it's the "global
state object". This is confusing since, while it does contain all the
objects affected by an update and their respective states, if an object
isn't affected by this update it won't be part of it.

Thus, it's not truly a "global state", unlike object state structures
that do contain the entire state of a given object.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
 include/drm/drm_atomic.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Hamza Mahfooz Dec. 14, 2023, 6:26 p.m. UTC | #1
On 12/14/23 05:09, Maxime Ripard wrote:
> The current documentation of drm_atomic_state says that it's the "global
> state object". This is confusing since, while it does contain all the
> objects affected by an update and their respective states, if an object
> isn't affected by this update it won't be part of it.
> 
> Thus, it's not truly a "global state", unlike object state structures
> that do contain the entire state of a given object.
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>

> ---
>   include/drm/drm_atomic.h | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 914574b58ae7..5df67e587816 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -346,7 +346,13 @@ struct __drm_private_objs_state {
>   };
>   
>   /**
> - * struct drm_atomic_state - the global state object for atomic updates
> + * struct drm_atomic_state - Atomic commit structure
> + *
> + * This structure is the kernel counterpart of @drm_mode_atomic and represents
> + * an atomic commit that transitions from an old to a new display state. It
> + * contains all the objects affected by an atomic commits and both the new
> + * state structures and pointers to the old state structures for
> + * these.
>    *
>    * States are added to an atomic update by calling drm_atomic_get_crtc_state(),
>    * drm_atomic_get_plane_state(), drm_atomic_get_connector_state(), or for
Pekka Paalanen Dec. 15, 2023, 2:54 p.m. UTC | #2
On Thu, 14 Dec 2023 11:09:15 +0100
Maxime Ripard <mripard@kernel.org> wrote:

> The current documentation of drm_atomic_state says that it's the "global
> state object". This is confusing since, while it does contain all the
> objects affected by an update and their respective states, if an object
> isn't affected by this update it won't be part of it.
> 
> Thus, it's not truly a "global state", unlike object state structures
> that do contain the entire state of a given object.
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
>  include/drm/drm_atomic.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 914574b58ae7..5df67e587816 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -346,7 +346,13 @@ struct __drm_private_objs_state {
>  };
>  
>  /**
> - * struct drm_atomic_state - the global state object for atomic updates
> + * struct drm_atomic_state - Atomic commit structure
> + *
> + * This structure is the kernel counterpart of @drm_mode_atomic and represents
> + * an atomic commit that transitions from an old to a new display state. It
> + * contains all the objects affected by an atomic commits and both the new

*by the atomic commit and

> + * state structures and pointers to the old state structures for
> + * these.
>   *
>   * States are added to an atomic update by calling drm_atomic_get_crtc_state(),
>   * drm_atomic_get_plane_state(), drm_atomic_get_connector_state(), or for

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>


Thanks,
pq
Maxime Ripard Dec. 18, 2023, 2:47 p.m. UTC | #3
Hi,

On Fri, Dec 15, 2023 at 04:54:28PM +0200, Pekka Paalanen wrote:
> On Thu, 14 Dec 2023 11:09:15 +0100
> Maxime Ripard <mripard@kernel.org> wrote:
> 
> > The current documentation of drm_atomic_state says that it's the "global
> > state object". This is confusing since, while it does contain all the
> > objects affected by an update and their respective states, if an object
> > isn't affected by this update it won't be part of it.
> > 
> > Thus, it's not truly a "global state", unlike object state structures
> > that do contain the entire state of a given object.
> > 
> > Signed-off-by: Maxime Ripard <mripard@kernel.org>
> > ---
> >  include/drm/drm_atomic.h | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> > index 914574b58ae7..5df67e587816 100644
> > --- a/include/drm/drm_atomic.h
> > +++ b/include/drm/drm_atomic.h
> > @@ -346,7 +346,13 @@ struct __drm_private_objs_state {
> >  };
> >  
> >  /**
> > - * struct drm_atomic_state - the global state object for atomic updates
> > + * struct drm_atomic_state - Atomic commit structure
> > + *
> > + * This structure is the kernel counterpart of @drm_mode_atomic and represents
> > + * an atomic commit that transitions from an old to a new display state. It
> > + * contains all the objects affected by an atomic commits and both the new
> 
> *by the atomic commit and
> 
> > + * state structures and pointers to the old state structures for
> > + * these.
> >   *
> >   * States are added to an atomic update by calling drm_atomic_get_crtc_state(),
> >   * drm_atomic_get_plane_state(), drm_atomic_get_connector_state(), or for
> 
> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>

I've applied the series with the typos changes you asked for

Maxime
diff mbox series

Patch

diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 914574b58ae7..5df67e587816 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -346,7 +346,13 @@  struct __drm_private_objs_state {
 };
 
 /**
- * struct drm_atomic_state - the global state object for atomic updates
+ * struct drm_atomic_state - Atomic commit structure
+ *
+ * This structure is the kernel counterpart of @drm_mode_atomic and represents
+ * an atomic commit that transitions from an old to a new display state. It
+ * contains all the objects affected by an atomic commits and both the new
+ * state structures and pointers to the old state structures for
+ * these.
  *
  * States are added to an atomic update by calling drm_atomic_get_crtc_state(),
  * drm_atomic_get_plane_state(), drm_atomic_get_connector_state(), or for