drm: Remove unused argument from __drm_atomic_helper_disable_all()
Subsystems (2)
PATCH 1/1 drm: Remove unused argument from __drm_atomic_helper_disable_all()
From: Sean Paul <[email protected]>
Its use was removed in an earlier commit, but it is still hanging around.
--- drivers/gpu/drm/drm_atomic_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +3 -4
@@ -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);
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 25 lines · Sean Paul
From: Sean Paul <[email protected]>
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ä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Harry Wentland <[email protected]>Cc Sinclair Yeh <[email protected]>Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Sean Paul <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-0
drivers/gpu/drm/drm_atomic_helper.c int __drm_atomic_helper_set_config(struct drm_mode_set *set, · line 3034
Quoted 6 lines
drivers/gpu/drm/drm_atomic_helper.c +1
-2@@ -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?
Quoted 23 lines
drivers/gpu/drm/drm_atomic_helper.c +2
-2{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);Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 25 lines · Sean Paul
From: Sean Paul <[email protected]>
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ä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Harry Wentland <[email protected]>Cc Sinclair Yeh <[email protected]>Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Sean Paul <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-0
drivers/gpu/drm/drm_atomic_helper.c int __drm_atomic_helper_set_config(struct drm_mode_set *set, · line 3034
Quoted 6 lines
drivers/gpu/drm/drm_atomic_helper.c +1
-2@@ -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 mirrordrm_atomic_helper_disable_all(), so I'll spin a new patch to remove the '__' and unify the useless wrapper.
Sean
Quoted 24 lines
drivers/gpu/drm/drm_atomic_helper.c +2
-2{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);Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
From: Sean Paul <[email protected]>
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
--- drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++---------------- 1 file changed, 26 insertions(+), 33 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +26 -33
@@ -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);
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
Quoted 9 lines · Sean Paul
From: Sean Paul <[email protected]>
The only difference between the functions is the
clean_old_fbsargument, whose use was removed in the patch referenced below. So remove the internal copy and drop the guts back intodrm_atomic_helper_disable_all()Changes in v2:
- Instead of just removing the unused arg, merge the functions
Quoted 11 lines
Fixes e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Harry Wentland <[email protected]>Cc Sinclair Yeh <[email protected]> # This email bounces :(Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Sean Paul <[email protected]>
Quoted 90 lines
--- drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++---------------- 1 file changed, 26 insertions(+), 33 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +26
-33@@ -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);Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sean Paul
AppliedRe: [PATCH v2] drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()
Quoted 22 lines · Ville Syrjälä
Quoted 9 lines · Sean Paul
From: Sean Paul <[email protected]>
The only difference between the functions is the
clean_old_fbsargument, whose use was removed in the patch referenced below. So remove the internal copy and drop the guts back intodrm_atomic_helper_disable_all()Changes in v2:
- Instead of just removing the unused arg, merge the functionsQuoted 11 lines
Fixes e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Harry Wentland <[email protected]>Cc Sinclair Yeh <[email protected]> # This email bounces :(Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Sean Paul <[email protected]>
Quoted 2 lines
Reviewed-by Ville Syrjälä <[email protected]>
Pushed to drm-misc-next-fixes, thanks for your review!
Sean
Quoted 94 lines
Quoted 90 lines
--- drivers/gpu/drm/drm_atomic_helper.c | 59 +++++++++++++---------------- 1 file changed, 26 insertions(+), 33 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +26
-33@@ -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);Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OSSignature · 2 lines
Ville Syrjälä Intel
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel