dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all()
@ 2019-02-12 16:43 Sean Paul
  2019-02-12 17:08 ` Ville Syrjälä via dri-devel
  2019-02-12 17:08 ` Sean Paul
  0 siblings, 2 replies; 6+ messages in thread
From: Sean Paul @ 2019-02-12 16:43 UTC (permalink / raw)
  To: dri-devel; +Cc: Sinclair Yeh, Maxime Ripard, Sean Paul, David Airlie, Sean Paul

From: Sean Paul <seanpaul@chromium.org>

Its use was removed in an earlier commit, but it is still hanging
around.

Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/drm_atomic_helper.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index c53ecbd9abddd..460509ef180a6 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3031,8 +3031,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
 }
 
 static int __drm_atomic_helper_disable_all(struct drm_device *dev,
-					   struct drm_modeset_acquire_ctx *ctx,
-					   bool clean_old_fbs)
+					   struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_atomic_state *state;
 	struct drm_connector_state *conn_state;
@@ -3117,7 +3116,7 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
 int drm_atomic_helper_disable_all(struct drm_device *dev,
 				  struct drm_modeset_acquire_ctx *ctx)
 {
-	return __drm_atomic_helper_disable_all(dev, ctx, false);
+	return __drm_atomic_helper_disable_all(dev, ctx);
 }
 EXPORT_SYMBOL(drm_atomic_helper_disable_all);
 
@@ -3139,7 +3138,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
 
 	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
-	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
+	ret = __drm_atomic_helper_disable_all(dev, &ctx);
 	if (ret)
 		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
 
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all()
  2019-02-12 16:43 [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all() Sean Paul
@ 2019-02-12 17:08 ` Ville Syrjälä via dri-devel
  2019-02-12 17:08 ` Sean Paul
  1 sibling, 0 replies; 6+ messages in thread
From: Ville Syrjälä via dri-devel @ 2019-02-12 17:08 UTC (permalink / raw)
  To: Sean Paul; +Cc: Sinclair Yeh, Maxime Ripard, dri-devel, David Airlie, Sean Paul

On Tue, Feb 12, 2019 at 11:43:58AM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> Its use was removed in an earlier commit, but it is still hanging
> around.
> 
> Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index c53ecbd9abddd..460509ef180a6 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3031,8 +3031,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
>  }
>  
>  static int __drm_atomic_helper_disable_all(struct drm_device *dev,
> -					   struct drm_modeset_acquire_ctx *ctx,
> -					   bool clean_old_fbs)
> +					   struct drm_modeset_acquire_ctx *ctx)

And then s/__drm_atomic_helper_disable_all/drm_atomic_helper_disable_all/
and remove the wrapper?

>  {
>  	struct drm_atomic_state *state;
>  	struct drm_connector_state *conn_state;
> @@ -3117,7 +3116,7 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
>  int drm_atomic_helper_disable_all(struct drm_device *dev,
>  				  struct drm_modeset_acquire_ctx *ctx)
>  {
> -	return __drm_atomic_helper_disable_all(dev, ctx, false);
> +	return __drm_atomic_helper_disable_all(dev, ctx);
>  }
>  EXPORT_SYMBOL(drm_atomic_helper_disable_all);
>  
> @@ -3139,7 +3138,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
>  
>  	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
>  
> -	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
> +	ret = __drm_atomic_helper_disable_all(dev, &ctx);
>  	if (ret)
>  		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
>  
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all()
  2019-02-12 16:43 [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all() Sean Paul
  2019-02-12 17:08 ` Ville Syrjälä via dri-devel
@ 2019-02-12 17:08 ` Sean Paul
  2019-02-12 17:32   ` [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all() Sean Paul
  1 sibling, 1 reply; 6+ messages in thread
From: Sean Paul @ 2019-02-12 17:08 UTC (permalink / raw)
  To: dri-devel; +Cc: Sinclair Yeh, Maxime Ripard, Sean Paul, David Airlie, Sean Paul

On Tue, Feb 12, 2019 at 11:43:58AM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> Its use was removed in an earlier commit, but it is still hanging
> around.
> 
> Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index c53ecbd9abddd..460509ef180a6 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3031,8 +3031,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
>  }
>  
>  static int __drm_atomic_helper_disable_all(struct drm_device *dev,
> -					   struct drm_modeset_acquire_ctx *ctx,
> -					   bool clean_old_fbs)
> +					   struct drm_modeset_acquire_ctx *ctx)

And I just realized the arguments exactly mirror
drm_atomic_helper_disable_all(), so I'll spin a new patch to remove the '__' and unify the useless wrapper.

Sean

>  {
>  	struct drm_atomic_state *state;
>  	struct drm_connector_state *conn_state;
> @@ -3117,7 +3116,7 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
>  int drm_atomic_helper_disable_all(struct drm_device *dev,
>  				  struct drm_modeset_acquire_ctx *ctx)
>  {
> -	return __drm_atomic_helper_disable_all(dev, ctx, false);
> +	return __drm_atomic_helper_disable_all(dev, ctx);
>  }
>  EXPORT_SYMBOL(drm_atomic_helper_disable_all);
>  
> @@ -3139,7 +3138,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
>  
>  	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
>  
> -	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
> +	ret = __drm_atomic_helper_disable_all(dev, &ctx);
>  	if (ret)
>  		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
>  
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
  2019-02-12 17:08 ` Sean Paul
@ 2019-02-12 17:32   ` Sean Paul
  2019-02-13 15:35     ` Ville Syrjälä via dri-devel
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Paul @ 2019-02-12 17:32 UTC (permalink / raw)
  To: dri-devel; +Cc: Sinclair Yeh, Maxime Ripard, Sean Paul, David Airlie, Sean Paul

From: Sean Paul <seanpaul@chromium.org>

The only difference between the functions is the clean_old_fbs argument, whose
use was removed in the patch referenced below. So remove the internal
copy and drop the guts back into drm_atomic_helper_disable_all()

Changes in v2:
- Instead of just removing the unused arg, merge the functions

Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Sinclair Yeh <syeh@vmware.com> # This email bounces :(
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++----------------
 1 file changed, 26 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index c53ecbd9abddd..7a7231d007792 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3030,9 +3030,31 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
 	return 0;
 }
 
-static int __drm_atomic_helper_disable_all(struct drm_device *dev,
-					   struct drm_modeset_acquire_ctx *ctx,
-					   bool clean_old_fbs)
+/**
+ * drm_atomic_helper_disable_all - disable all currently active outputs
+ * @dev: DRM device
+ * @ctx: lock acquisition context
+ *
+ * Loops through all connectors, finding those that aren't turned off and then
+ * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
+ * that they are connected to.
+ *
+ * This is used for example in suspend/resume to disable all currently active
+ * functions when suspending. If you just want to shut down everything at e.g.
+ * driver unload, look at drm_atomic_helper_shutdown().
+ *
+ * Note that if callers haven't already acquired all modeset locks this might
+ * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
+ *
+ * Returns:
+ * 0 on success or a negative error code on failure.
+ *
+ * See also:
+ * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
+ * drm_atomic_helper_shutdown().
+ */
+int drm_atomic_helper_disable_all(struct drm_device *dev,
+				  struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_atomic_state *state;
 	struct drm_connector_state *conn_state;
@@ -3090,35 +3112,6 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
 	drm_atomic_state_put(state);
 	return ret;
 }
-
-/**
- * drm_atomic_helper_disable_all - disable all currently active outputs
- * @dev: DRM device
- * @ctx: lock acquisition context
- *
- * Loops through all connectors, finding those that aren't turned off and then
- * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
- * that they are connected to.
- *
- * This is used for example in suspend/resume to disable all currently active
- * functions when suspending. If you just want to shut down everything at e.g.
- * driver unload, look at drm_atomic_helper_shutdown().
- *
- * Note that if callers haven't already acquired all modeset locks this might
- * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
- *
- * Returns:
- * 0 on success or a negative error code on failure.
- *
- * See also:
- * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
- * drm_atomic_helper_shutdown().
- */
-int drm_atomic_helper_disable_all(struct drm_device *dev,
-				  struct drm_modeset_acquire_ctx *ctx)
-{
-	return __drm_atomic_helper_disable_all(dev, ctx, false);
-}
 EXPORT_SYMBOL(drm_atomic_helper_disable_all);
 
 /**
@@ -3139,7 +3132,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
 
 	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
-	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
+	ret = drm_atomic_helper_disable_all(dev, &ctx);
 	if (ret)
 		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
 
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
  2019-02-12 17:32   ` [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all() Sean Paul
@ 2019-02-13 15:35     ` Ville Syrjälä via dri-devel
  2019-02-13 16:28       ` Sean Paul
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä via dri-devel @ 2019-02-13 15:35 UTC (permalink / raw)
  To: Sean Paul; +Cc: Sinclair Yeh, Maxime Ripard, dri-devel, David Airlie, Sean Paul

On Tue, Feb 12, 2019 at 12:32:41PM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> The only difference between the functions is the clean_old_fbs argument, whose
> use was removed in the patch referenced below. So remove the internal
> copy and drop the guts back into drm_atomic_helper_disable_all()
> 
> Changes in v2:
> - Instead of just removing the unused arg, merge the functions
> 
> Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Sinclair Yeh <syeh@vmware.com> # This email bounces :(
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++----------------
>  1 file changed, 26 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index c53ecbd9abddd..7a7231d007792 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3030,9 +3030,31 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
>  	return 0;
>  }
>  
> -static int __drm_atomic_helper_disable_all(struct drm_device *dev,
> -					   struct drm_modeset_acquire_ctx *ctx,
> -					   bool clean_old_fbs)
> +/**
> + * drm_atomic_helper_disable_all - disable all currently active outputs
> + * @dev: DRM device
> + * @ctx: lock acquisition context
> + *
> + * Loops through all connectors, finding those that aren't turned off and then
> + * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
> + * that they are connected to.
> + *
> + * This is used for example in suspend/resume to disable all currently active
> + * functions when suspending. If you just want to shut down everything at e.g.
> + * driver unload, look at drm_atomic_helper_shutdown().
> + *
> + * Note that if callers haven't already acquired all modeset locks this might
> + * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
> + *
> + * Returns:
> + * 0 on success or a negative error code on failure.
> + *
> + * See also:
> + * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
> + * drm_atomic_helper_shutdown().
> + */
> +int drm_atomic_helper_disable_all(struct drm_device *dev,
> +				  struct drm_modeset_acquire_ctx *ctx)
>  {
>  	struct drm_atomic_state *state;
>  	struct drm_connector_state *conn_state;
> @@ -3090,35 +3112,6 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
>  	drm_atomic_state_put(state);
>  	return ret;
>  }
> -
> -/**
> - * drm_atomic_helper_disable_all - disable all currently active outputs
> - * @dev: DRM device
> - * @ctx: lock acquisition context
> - *
> - * Loops through all connectors, finding those that aren't turned off and then
> - * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
> - * that they are connected to.
> - *
> - * This is used for example in suspend/resume to disable all currently active
> - * functions when suspending. If you just want to shut down everything at e.g.
> - * driver unload, look at drm_atomic_helper_shutdown().
> - *
> - * Note that if callers haven't already acquired all modeset locks this might
> - * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
> - *
> - * Returns:
> - * 0 on success or a negative error code on failure.
> - *
> - * See also:
> - * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
> - * drm_atomic_helper_shutdown().
> - */
> -int drm_atomic_helper_disable_all(struct drm_device *dev,
> -				  struct drm_modeset_acquire_ctx *ctx)
> -{
> -	return __drm_atomic_helper_disable_all(dev, ctx, false);
> -}
>  EXPORT_SYMBOL(drm_atomic_helper_disable_all);
>  
>  /**
> @@ -3139,7 +3132,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
>  
>  	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
>  
> -	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
> +	ret = drm_atomic_helper_disable_all(dev, &ctx);
>  	if (ret)
>  		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
>  
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
  2019-02-13 15:35     ` Ville Syrjälä via dri-devel
@ 2019-02-13 16:28       ` Sean Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2019-02-13 16:28 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Sinclair Yeh, Maxime Ripard, dri-devel, David Airlie, Sean Paul,
	Sean Paul

On Wed, Feb 13, 2019 at 05:35:05PM +0200, Ville Syrjälä wrote:
> On Tue, Feb 12, 2019 at 12:32:41PM -0500, Sean Paul wrote:
> > From: Sean Paul <seanpaul@chromium.org>
> > 
> > The only difference between the functions is the clean_old_fbs argument, whose
> > use was removed in the patch referenced below. So remove the internal
> > copy and drop the guts back into drm_atomic_helper_disable_all()
> > 
> > Changes in v2:
> > - Instead of just removing the unused arg, merge the functions
> > 
> > Fixes: e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Harry Wentland <harry.wentland@amd.com>
> > Cc: Sinclair Yeh <syeh@vmware.com> # This email bounces :(
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 

Pushed to drm-misc-next-fixes, thanks for your review!

Sean

> > ---
> >  drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++----------------
> >  1 file changed, 26 insertions(+), 33 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index c53ecbd9abddd..7a7231d007792 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -3030,9 +3030,31 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
> >  	return 0;
> >  }
> >  
> > -static int __drm_atomic_helper_disable_all(struct drm_device *dev,
> > -					   struct drm_modeset_acquire_ctx *ctx,
> > -					   bool clean_old_fbs)
> > +/**
> > + * drm_atomic_helper_disable_all - disable all currently active outputs
> > + * @dev: DRM device
> > + * @ctx: lock acquisition context
> > + *
> > + * Loops through all connectors, finding those that aren't turned off and then
> > + * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
> > + * that they are connected to.
> > + *
> > + * This is used for example in suspend/resume to disable all currently active
> > + * functions when suspending. If you just want to shut down everything at e.g.
> > + * driver unload, look at drm_atomic_helper_shutdown().
> > + *
> > + * Note that if callers haven't already acquired all modeset locks this might
> > + * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
> > + *
> > + * Returns:
> > + * 0 on success or a negative error code on failure.
> > + *
> > + * See also:
> > + * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
> > + * drm_atomic_helper_shutdown().
> > + */
> > +int drm_atomic_helper_disable_all(struct drm_device *dev,
> > +				  struct drm_modeset_acquire_ctx *ctx)
> >  {
> >  	struct drm_atomic_state *state;
> >  	struct drm_connector_state *conn_state;
> > @@ -3090,35 +3112,6 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
> >  	drm_atomic_state_put(state);
> >  	return ret;
> >  }
> > -
> > -/**
> > - * drm_atomic_helper_disable_all - disable all currently active outputs
> > - * @dev: DRM device
> > - * @ctx: lock acquisition context
> > - *
> > - * Loops through all connectors, finding those that aren't turned off and then
> > - * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
> > - * that they are connected to.
> > - *
> > - * This is used for example in suspend/resume to disable all currently active
> > - * functions when suspending. If you just want to shut down everything at e.g.
> > - * driver unload, look at drm_atomic_helper_shutdown().
> > - *
> > - * Note that if callers haven't already acquired all modeset locks this might
> > - * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
> > - *
> > - * Returns:
> > - * 0 on success or a negative error code on failure.
> > - *
> > - * See also:
> > - * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
> > - * drm_atomic_helper_shutdown().
> > - */
> > -int drm_atomic_helper_disable_all(struct drm_device *dev,
> > -				  struct drm_modeset_acquire_ctx *ctx)
> > -{
> > -	return __drm_atomic_helper_disable_all(dev, ctx, false);
> > -}
> >  EXPORT_SYMBOL(drm_atomic_helper_disable_all);
> >  
> >  /**
> > @@ -3139,7 +3132,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
> >  
> >  	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
> >  
> > -	ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
> > +	ret = drm_atomic_helper_disable_all(dev, &ctx);
> >  	if (ret)
> >  		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
> >  
> > -- 
> > Sean Paul, Software Engineer, Google / Chromium OS
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-13 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 16:43 [PATCH] drm: Remove unused argument from __drm_atomic_helper_disable_all() Sean Paul
2019-02-12 17:08 ` Ville Syrjälä via dri-devel
2019-02-12 17:08 ` Sean Paul
2019-02-12 17:32   ` [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all() Sean Paul
2019-02-13 15:35     ` Ville Syrjälä via dri-devel
2019-02-13 16:28       ` Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).