diff mbox series

[v4,07/11] drm/bridge: Clarify the atomic enable/disable hooks semantics

Message ID 20191203141515.3597631-8-boris.brezillon@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm: Add support for bus-format negotiation | expand

Commit Message

Boris Brezillon Dec. 3, 2019, 2:15 p.m. UTC
The [pre_]enable/[post_]disable hooks are passed the old atomic state.
Update the doc and rename the arguments to make it clear.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
---
Changes in v4:
* Drop the doc update (Laurent)
* Add Rbs

Changes in v3:
* New patch
---
 include/drm/drm_bridge.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Laurent Pinchart Dec. 3, 2019, 6:02 p.m. UTC | #1
Hi Boris,

Thanks for the patch.

On Tue, Dec 03, 2019 at 03:15:11PM +0100, Boris Brezillon wrote:
> The [pre_]enable/[post_]disable hooks are passed the old atomic state.
> Update the doc and rename the arguments to make it clear.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> Changes in v4:
> * Drop the doc update (Laurent)

I was referring to the doc updates in drm_bridge.h only. Is there a
reason you dropped the changes from drm_bridge.c ? I think those were
good.

> * Add Rbs
> 
> Changes in v3:
> * New patch
> ---
>  include/drm/drm_bridge.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index bfb0385163f1..d7d714023050 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -263,7 +263,7 @@ struct drm_bridge_funcs {
>  	 * The @atomic_pre_enable callback is optional.
>  	 */
>  	void (*atomic_pre_enable)(struct drm_bridge *bridge,
> -				  struct drm_atomic_state *state);
> +				  struct drm_atomic_state *old_state);
>  
>  	/**
>  	 * @atomic_enable:
> @@ -288,7 +288,7 @@ struct drm_bridge_funcs {
>  	 * The @atomic_enable callback is optional.
>  	 */
>  	void (*atomic_enable)(struct drm_bridge *bridge,
> -			      struct drm_atomic_state *state);
> +			      struct drm_atomic_state *old_state);
>  	/**
>  	 * @atomic_disable:
>  	 *
> @@ -311,7 +311,7 @@ struct drm_bridge_funcs {
>  	 * The @atomic_disable callback is optional.
>  	 */
>  	void (*atomic_disable)(struct drm_bridge *bridge,
> -			       struct drm_atomic_state *state);
> +			       struct drm_atomic_state *old_state);
>  
>  	/**
>  	 * @atomic_post_disable:
> @@ -337,7 +337,7 @@ struct drm_bridge_funcs {
>  	 * The @atomic_post_disable callback is optional.
>  	 */
>  	void (*atomic_post_disable)(struct drm_bridge *bridge,
> -				    struct drm_atomic_state *state);
> +				    struct drm_atomic_state *old_state);
>  };
>  
>  /**
Boris Brezillon Dec. 4, 2019, 9 a.m. UTC | #2
On Tue, 3 Dec 2019 20:02:23 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:

> Hi Boris,
> 
> Thanks for the patch.
> 
> On Tue, Dec 03, 2019 at 03:15:11PM +0100, Boris Brezillon wrote:
> > The [pre_]enable/[post_]disable hooks are passed the old atomic state.
> > Update the doc and rename the arguments to make it clear.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
> > ---
> > Changes in v4:
> > * Drop the doc update (Laurent)  
> 
> I was referring to the doc updates in drm_bridge.h only. Is there a
> reason you dropped the changes from drm_bridge.c ? I think those were
> good.

Oops, that's a mistake. I'll fix it before applying.

> 
> > * Add Rbs
> > 
> > Changes in v3:
> > * New patch
> > ---
> >  include/drm/drm_bridge.h | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> > index bfb0385163f1..d7d714023050 100644
> > --- a/include/drm/drm_bridge.h
> > +++ b/include/drm/drm_bridge.h
> > @@ -263,7 +263,7 @@ struct drm_bridge_funcs {
> >  	 * The @atomic_pre_enable callback is optional.
> >  	 */
> >  	void (*atomic_pre_enable)(struct drm_bridge *bridge,
> > -				  struct drm_atomic_state *state);
> > +				  struct drm_atomic_state *old_state);
> >  
> >  	/**
> >  	 * @atomic_enable:
> > @@ -288,7 +288,7 @@ struct drm_bridge_funcs {
> >  	 * The @atomic_enable callback is optional.
> >  	 */
> >  	void (*atomic_enable)(struct drm_bridge *bridge,
> > -			      struct drm_atomic_state *state);
> > +			      struct drm_atomic_state *old_state);
> >  	/**
> >  	 * @atomic_disable:
> >  	 *
> > @@ -311,7 +311,7 @@ struct drm_bridge_funcs {
> >  	 * The @atomic_disable callback is optional.
> >  	 */
> >  	void (*atomic_disable)(struct drm_bridge *bridge,
> > -			       struct drm_atomic_state *state);
> > +			       struct drm_atomic_state *old_state);
> >  
> >  	/**
> >  	 * @atomic_post_disable:
> > @@ -337,7 +337,7 @@ struct drm_bridge_funcs {
> >  	 * The @atomic_post_disable callback is optional.
> >  	 */
> >  	void (*atomic_post_disable)(struct drm_bridge *bridge,
> > -				    struct drm_atomic_state *state);
> > +				    struct drm_atomic_state *old_state);
> >  };
> >  
> >  /**  
>
diff mbox series

Patch

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index bfb0385163f1..d7d714023050 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -263,7 +263,7 @@  struct drm_bridge_funcs {
 	 * The @atomic_pre_enable callback is optional.
 	 */
 	void (*atomic_pre_enable)(struct drm_bridge *bridge,
-				  struct drm_atomic_state *state);
+				  struct drm_atomic_state *old_state);
 
 	/**
 	 * @atomic_enable:
@@ -288,7 +288,7 @@  struct drm_bridge_funcs {
 	 * The @atomic_enable callback is optional.
 	 */
 	void (*atomic_enable)(struct drm_bridge *bridge,
-			      struct drm_atomic_state *state);
+			      struct drm_atomic_state *old_state);
 	/**
 	 * @atomic_disable:
 	 *
@@ -311,7 +311,7 @@  struct drm_bridge_funcs {
 	 * The @atomic_disable callback is optional.
 	 */
 	void (*atomic_disable)(struct drm_bridge *bridge,
-			       struct drm_atomic_state *state);
+			       struct drm_atomic_state *old_state);
 
 	/**
 	 * @atomic_post_disable:
@@ -337,7 +337,7 @@  struct drm_bridge_funcs {
 	 * The @atomic_post_disable callback is optional.
 	 */
 	void (*atomic_post_disable)(struct drm_bridge *bridge,
-				    struct drm_atomic_state *state);
+				    struct drm_atomic_state *old_state);
 };
 
 /**