summaryrefslogtreecommitdiff
path: root/drivers/staging/vboxvideo
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-09-29 14:18:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-29 05:31:32 -0700
commit2fab6e754212a632d7a2124360ba31f46948f091 (patch)
tree41e8b817b794ba05d8d5543cd6444ebd9d5dcf9f /drivers/staging/vboxvideo
parent880f72829f94bc542be6bf94ec2fd0e95b7edca7 (diff)
staging: vboxvideo: Temporarily remove page_flip support
drm_mode_page_flip_ioctl() cannot deal with the in between phase of the transitioning to atomic modeset support. Once we start using drm_helper_crtc_mode_set(), we start setting plane->state on the primary plane. But we are not fully atomic yet so then set both plane-state->fb and plane->fb. If both plane-state->fb and plane->fb are set drm_mode_page_flip_ioctl() gets confused and stops calling drm_framebuffer_get() on the new fb while still calling drm_framebuffer_put() on the old fb. The current page_flip implementation expects drm_mode_page_flip_ioctl() to take care of both and once we switch to drm_atomic_helper_page_flip() that will expect neither to be done, taking care of both itself. So for the transition we need to remove page_flip support and then after the transition is complete and we set DRIVER_ATOMIC in our driver_features, we can start using drm_atomic_helper_page_flip(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vboxvideo')
-rw-r--r--drivers/staging/vboxvideo/vbox_mode.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c
index babb02a1ebf2..adb6bcf989d1 100644
--- a/drivers/staging/vboxvideo/vbox_mode.c
+++ b/drivers/staging/vboxvideo/vbox_mode.c
@@ -282,40 +282,6 @@ static int vbox_crtc_mode_set(struct drm_crtc *crtc,
return 0;
}
-static int vbox_crtc_page_flip(struct drm_crtc *crtc,
- struct drm_framebuffer *fb,
- struct drm_pending_vblank_event *event,
- uint32_t page_flip_flags,
- struct drm_modeset_acquire_ctx *ctx)
-{
- struct vbox_bo *bo = gem_to_vbox_bo(to_vbox_framebuffer(fb)->obj);
- struct drm_framebuffer *old_fb = CRTC_FB(crtc);
- unsigned long flags;
- int rc;
-
- rc = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM);
- if (rc) {
- DRM_WARN("Error %d pinning new fb, out of video mem?\n", rc);
- return rc;
- }
-
- vbox_crtc_set_base_and_mode(crtc, fb, NULL, 0, 0);
-
- if (old_fb) {
- bo = gem_to_vbox_bo(to_vbox_framebuffer(old_fb)->obj);
- vbox_bo_unpin(bo);
- }
-
- spin_lock_irqsave(&crtc->dev->event_lock, flags);
-
- if (event)
- drm_crtc_send_vblank_event(crtc, event);
-
- spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-
- return 0;
-}
-
static void vbox_crtc_disable(struct drm_crtc *crtc)
{
}
@@ -353,7 +319,6 @@ static const struct drm_crtc_funcs vbox_crtc_funcs = {
.reset = vbox_crtc_reset,
.set_config = drm_crtc_helper_set_config,
/* .gamma_set = vbox_crtc_gamma_set, */
- .page_flip = vbox_crtc_page_flip,
.destroy = vbox_crtc_destroy,
};