aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-03-22 17:50:42 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-03-29 03:14:49 -0400
commit5fbef3ee4a28f968e9d0ea97c6dc80388287122b (patch)
tree3e4f7976c6f1b38924a91ebc018a6a6dfe105c53
parent34a2ab5e0689e5174dd50e4a96e73c1c00539fdb (diff)
drm: drm_plane_force_disable is not for atomic drivers
This way I can explain why it'll be fine to pass a NULL acquire ctx here in the next patch. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-4-daniel.vetter@ffwll.ch
-rw-r--r--drivers/gpu/drm/drm_plane.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 8a4e75929810..67119332c441 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -277,6 +277,12 @@ EXPORT_SYMBOL(drm_plane_from_index);
277 * 277 *
278 * Used when the plane's current framebuffer is destroyed, 278 * Used when the plane's current framebuffer is destroyed,
279 * and when restoring fbdev mode. 279 * and when restoring fbdev mode.
280 *
281 * Note that this function is not suitable for atomic drivers, since it doesn't
282 * wire through the lock acquisition context properly and hence can't handle
283 * retries or driver private locks. You probably want to use
284 * drm_atomic_helper_disable_plane() or
285 * drm_atomic_helper_disable_planes_on_crtc() instead.
280 */ 286 */
281void drm_plane_force_disable(struct drm_plane *plane) 287void drm_plane_force_disable(struct drm_plane *plane)
282{ 288{
@@ -285,6 +291,8 @@ void drm_plane_force_disable(struct drm_plane *plane)
285 if (!plane->fb) 291 if (!plane->fb)
286 return; 292 return;
287 293
294 WARN_ON(drm_drv_uses_atomic_modeset(plane->dev));
295
288 plane->old_fb = plane->fb; 296 plane->old_fb = plane->fb;
289 ret = plane->funcs->disable_plane(plane); 297 ret = plane->funcs->disable_plane(plane);
290 if (ret) { 298 if (ret) {