From 18dddadc78c91a91b546acc48506c24f5f840c4f Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 21 Mar 2017 17:41:49 +0100 Subject: drm/atomic: Introduce drm_atomic_helper_shutdown The trouble here is that it does multiple atomic commits under one drm_modeset_lock_all, which breaks the behind-the-scenes acquire context magic that function pulls off. It's much better to have one overall atomic commit. That we still have multiple atomic commits prevents us from adding some pretty useful debug checks to the atomic machinery. Hence it is really a bad idea to call the legacy drm_crtc_force_disable_all() function. There's 2 atomic drivers using this still, nouveau and tinydrm. To fix this, introduce a new drm_atomic_helper_shutdown() by extracting the code from i915. While at it improve kernel-doc and catch future offenders by sprinkling a WARN_ON into the legacy function. We should probably move those into the legacy modeset helpers, too ... v2: Make it compile on arm drivers too (Noralf). v3: Correct kerneldoc to point at _disable_all(). Reviewed-by: Maarten Lankhorst Acked-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Noralf Trønnes Cc: Ben Skeggs Tested-by: Tomi Valkeinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170321164149.31531-1-daniel.vetter@ffwll.ch --- include/drm/drm_atomic_helper.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/drm/drm_atomic_helper.h') diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h index dc16274987c7..969f7237f1fc 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h @@ -104,6 +104,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set, int drm_atomic_helper_disable_all(struct drm_device *dev, struct drm_modeset_acquire_ctx *ctx); +void drm_atomic_helper_shutdown(struct drm_device *dev); struct drm_atomic_state *drm_atomic_helper_suspend(struct drm_device *dev); int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state, struct drm_modeset_acquire_ctx *ctx); -- cgit v1.2.3-55-g7522