VirtualBox

Changeset 79694 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jul 11, 2019 12:40:41 PM (6 years ago)
Author:
vboxsync
Message:

Additions/linux/vboxvideo: apply kernel 2408898e3 and 65aac1742.
bugref:8282: Additions/linux: track kernel changes to vboxvideo in our own tree
commit 2408898e3b6c99b3ec792760989e57026cd9909d
Author: Steve Longerbeam <slongerbeam@…>
Date: Fri Jul 20 10:17:31 2018 -0700

staging: vboxvideo: Add page-flip support


Adds crtc page-flip support by passing the new requested framebuffer
to vbox_crtc_do_set_base().

...

Signed-off-by: Steve Longerbeam <steve_longerbeam@…>
Signed-off-by: Greg Kroah-Hartman <gregkh@…>

commit 65aac17423284634169489f298169c3e3f099cc7
Author: Hans de Goede <hdegoede@…>
Date: Mon Sep 10 20:30:39 2018 +0200

staging: vboxvideo: Change address of scanout buffer on page-flip


Commit 2408898e3b6c ("staging: vboxvideo: Add page-flip support") only
calls vbox_crtc_do_set_base() on page-flips, but despite that function-s
name it only pins the new fb, unpins the old fb and sets
vbox_crtc->fb_offset. It does not program the hardware to scan out at the
new vbox_crtc->fb_offset value.

...

Fixes: 2408898e3b6c ("staging: vboxvideo: Add page-flip support")
Cc: Steve Longerbeam <steve_longerbeam@…>
Signed-off-by: Hans de Goede <hdegoede@…>
Signed-off-by: Greg Kroah-Hartman <gregkh@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r79025 r79694  
    283283}
    284284
     285static int vbox_crtc_page_flip(struct drm_crtc *crtc,
     286                               struct drm_framebuffer *fb,
     287#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL_75)
     288                               struct drm_pending_vblank_event *event,
     289                               uint32_t page_flip_flags,
     290                               struct drm_modeset_acquire_ctx *ctx)
     291#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) || defined(RHEL_70)
     292                               struct drm_pending_vblank_event *event,
     293                               uint32_t page_flip_flags)
     294#else
     295                               struct drm_pending_vblank_event *event)
     296#endif
     297{
     298        struct vbox_private *vbox = crtc->dev->dev_private;
     299        struct drm_device *drm = vbox->dev;
     300        unsigned long flags;
     301        int rc;
     302
     303        rc = vbox_crtc_set_base(crtc, CRTC_FB(crtc), fb, 0, 0);
     304        if (rc)
     305                return rc;
     306
     307        vbox_do_modeset(crtc, &crtc->mode);
     308        mutex_unlock(&vbox->hw_mutex);
     309
     310        spin_lock_irqsave(&drm->event_lock, flags);
     311
     312        if (event)
     313#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_72)
     314                drm_crtc_send_vblank_event(crtc, event);
     315#else
     316                drm_send_vblank_event(drm, -1, event);
     317#endif
     318
     319        spin_unlock_irqrestore(&drm->event_lock, flags);
     320
     321        return 0;
     322}
     323
    285324static void vbox_crtc_disable(struct drm_crtc *crtc)
    286325{
     
    320359        .set_config = drm_crtc_helper_set_config,
    321360        /* .gamma_set = vbox_crtc_gamma_set, */
     361        .page_flip = vbox_crtc_page_flip,
    322362        .destroy = vbox_crtc_destroy,
    323363};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette