On Wed, Aug 10, 2016 at 10:48:20AM -0400, Sean Paul wrote:
On Tue, Aug 9, 2016 at 9:41 AM, Daniel Vetter daniel.vetter@ffwll.ch wrote:
-/**
- drm_crtc_force_disable_all - Forcibly turn off all enabled CRTCs
- @dev: DRM device whose CRTCs to turn off
- Drivers may want to call this on unload to ensure that all displays are
- unlit and the GPU is in a consistent, low power state. Takes modeset locks.
- Returns:
- Zero on success, error code on failure.
- */
-int drm_crtc_force_disable_all(struct drm_device *dev) -{
struct drm_crtc *crtc;
int ret = 0;
drm_modeset_lock_all(dev);
drm_for_each_crtc(crtc, dev)
if (crtc->enabled) {
ret = drm_crtc_force_disable(crtc);
if (ret)
goto out;
}
-out:
drm_modeset_unlock_all(dev);
return ret;
-} -EXPORT_SYMBOL(drm_crtc_force_disable_all);
I'm not so sure about moving this one. If it's going to be declared in drm_crtc.h, it should stay here (with force_disable). Alternatively, assuming no one else is using this (didn't check), move it to drm_framebuffer and make it a static helper function there (removing the declaration from drm_crtc.h).
This shouldn't be moved, accidentally overselected. Will fix. -Daniel