@@ -3039,9 +3039,31 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
3039
3039
return 0 ;
3040
3040
}
3041
3041
3042
- static int __drm_atomic_helper_disable_all (struct drm_device * dev ,
3043
- struct drm_modeset_acquire_ctx * ctx ,
3044
- bool clean_old_fbs )
3042
+ /**
3043
+ * drm_atomic_helper_disable_all - disable all currently active outputs
3044
+ * @dev: DRM device
3045
+ * @ctx: lock acquisition context
3046
+ *
3047
+ * Loops through all connectors, finding those that aren't turned off and then
3048
+ * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
3049
+ * that they are connected to.
3050
+ *
3051
+ * This is used for example in suspend/resume to disable all currently active
3052
+ * functions when suspending. If you just want to shut down everything at e.g.
3053
+ * driver unload, look at drm_atomic_helper_shutdown().
3054
+ *
3055
+ * Note that if callers haven't already acquired all modeset locks this might
3056
+ * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
3057
+ *
3058
+ * Returns:
3059
+ * 0 on success or a negative error code on failure.
3060
+ *
3061
+ * See also:
3062
+ * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
3063
+ * drm_atomic_helper_shutdown().
3064
+ */
3065
+ int drm_atomic_helper_disable_all (struct drm_device * dev ,
3066
+ struct drm_modeset_acquire_ctx * ctx )
3045
3067
{
3046
3068
struct drm_atomic_state * state ;
3047
3069
struct drm_connector_state * conn_state ;
@@ -3099,35 +3121,6 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
3099
3121
drm_atomic_state_put (state );
3100
3122
return ret ;
3101
3123
}
3102
-
3103
- /**
3104
- * drm_atomic_helper_disable_all - disable all currently active outputs
3105
- * @dev: DRM device
3106
- * @ctx: lock acquisition context
3107
- *
3108
- * Loops through all connectors, finding those that aren't turned off and then
3109
- * turns them off by setting their DPMS mode to OFF and deactivating the CRTC
3110
- * that they are connected to.
3111
- *
3112
- * This is used for example in suspend/resume to disable all currently active
3113
- * functions when suspending. If you just want to shut down everything at e.g.
3114
- * driver unload, look at drm_atomic_helper_shutdown().
3115
- *
3116
- * Note that if callers haven't already acquired all modeset locks this might
3117
- * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
3118
- *
3119
- * Returns:
3120
- * 0 on success or a negative error code on failure.
3121
- *
3122
- * See also:
3123
- * drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
3124
- * drm_atomic_helper_shutdown().
3125
- */
3126
- int drm_atomic_helper_disable_all (struct drm_device * dev ,
3127
- struct drm_modeset_acquire_ctx * ctx )
3128
- {
3129
- return __drm_atomic_helper_disable_all (dev , ctx , false);
3130
- }
3131
3124
EXPORT_SYMBOL (drm_atomic_helper_disable_all );
3132
3125
3133
3126
/**
@@ -3148,7 +3141,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
3148
3141
3149
3142
DRM_MODESET_LOCK_ALL_BEGIN (dev , ctx , 0 , ret );
3150
3143
3151
- ret = __drm_atomic_helper_disable_all (dev , & ctx , true );
3144
+ ret = drm_atomic_helper_disable_all (dev , & ctx );
3152
3145
if (ret )
3153
3146
DRM_ERROR ("Disabling all crtc's during unload failed with %i\n" , ret );
3154
3147
0 commit comments