drm: Convert drm_framebuffer_remove to atomic, v4.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 21 Feb 2017 13:51:41 +0000 (14:51 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Feb 2017 12:06:48 +0000 (13:06 +0100)
commitdb8f6403e88a9664e1ffae2e60d19e10120921b6
treed2fbc6ee30278c78cb74ae88cb7664990dba906c
parent9b2104f423de5c148749a07e8197dbab4c449877
drm: Convert drm_framebuffer_remove to atomic, v4.

Instead of trying to do everything in 1 go, just do a basic safe
conversion first. We've been bitten by too many regressions in the
past.

This patch only converts drm_framebuffer_remove to atomic. The
regression sensitive part is split out to a separate patch.

v2:
- Remove plane->fb assignment, done by drm_atomic_clean_old_fb.
- Add WARN_ON when atomic_remove_fb fails.
- Always call drm_atomic_state_put.
v3:
- Use drm_drv_uses_atomic_modeset
- Handle the case where the first plane-disable-only commit fails
  with -EINVAL. Some drivers do not support this, fall back to
  disabling all crtc's in this case.
v4:
- Solve vmwgfx compatibility issue in their driver, was fixed in this
  patch by v3.
- Move only disabling primary to a separate patch.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1487685102-31991-3-git-send-email-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_crtc_internal.h
drivers/gpu/drm/drm_framebuffer.c