diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-18 11:00:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-18 11:00:00 -0700 |
commit | 2475c515d4031c494ff452508a8bf8c281ec6e56 (patch) | |
tree | 0303935bbd919ec522bf0fe02066f09b391d2b57 /drivers/staging/vboxvideo/vbox_mode.c | |
parent | 336722eb9d9732c5a497fb6299bf38cde413592b (diff) | |
parent | e4f6a44c4aeca9eda153302abb0c14d053914f72 (diff) |
Merge tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here are the big staging/iio patches for 4.19-rc1.
Lots of churn here, with tons of cleanups happening in staging
drivers, a removal of an old crypto driver that no one was using
(skein), and the addition of some new IIO drivers. Also added was a
"gasket" driver from Google that needs loads of work and the erofs
filesystem.
Even with adding all of the new drivers and a new filesystem, we are
only adding about 1000 lines overall to the kernel linecount, which
shows just how much cleanup happened, and how big the unused crypto
driver was.
All of these have been in the linux-next tree for a while now with no
reported issues"
* tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (903 commits)
staging:rtl8192u: Remove unused macro definitions - Style
staging:rtl8192u: Add spaces around '+' operator - Style
staging:rtl8192u: Remove stale comment - Style
staging: rtl8188eu: remove unused mp_custom_oid.h
staging: fbtft: Add spaces around / - Style
staging: fbtft: Erases some repetitive usage of function name - Style
staging: fbtft: Adjust some empty-line problems - Style
staging: fbtft: Removes one nesting level to help readability - Style
staging: fbtft: Changes gamma table to define.
staging: fbtft: A bit more information on dev_err.
staging: fbtft: Fixes some alignment issues - Style
staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues - Style
staging: rtl8188eu: remove unused array dB_Invert_Table
staging: rtl8188eu: remove whitespace, add missing blank line
staging: rtl8188eu: use is_multicast_ether_addr in rtw_sta_mgt.c
staging: rtl8188eu: remove whitespace - style
staging: rtl8188eu: cleanup block comment - style
staging: rtl8188eu: use is_multicast_ether_addr in rtl8188eu_xmit.c
staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c
staging: rtlwifi: refactor rtl_get_tcb_desc
...
Diffstat (limited to 'drivers/staging/vboxvideo/vbox_mode.c')
-rw-r--r-- | drivers/staging/vboxvideo/vbox_mode.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c index da4a93df8d75..a83eac8668d0 100644 --- a/drivers/staging/vboxvideo/vbox_mode.c +++ b/drivers/staging/vboxvideo/vbox_mode.c @@ -222,7 +222,9 @@ static bool vbox_set_up_input_mapping(struct vbox_private *vbox) } static int vbox_crtc_do_set_base(struct drm_crtc *crtc, - struct drm_framebuffer *old_fb, int x, int y) + struct drm_framebuffer *old_fb, + struct drm_framebuffer *new_fb, + int x, int y) { struct vbox_private *vbox = crtc->dev->dev_private; struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); @@ -245,7 +247,7 @@ static int vbox_crtc_do_set_base(struct drm_crtc *crtc, vbox_bo_unreserve(bo); } - vbox_fb = to_vbox_framebuffer(CRTC_FB(crtc)); + vbox_fb = to_vbox_framebuffer(new_fb); obj = vbox_fb->obj; bo = gem_to_vbox_bo(obj); @@ -281,7 +283,7 @@ static int vbox_crtc_do_set_base(struct drm_crtc *crtc, static int vbox_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) { - return vbox_crtc_do_set_base(crtc, old_fb, x, y); + return vbox_crtc_do_set_base(crtc, old_fb, CRTC_FB(crtc), x, y); } static int vbox_crtc_mode_set(struct drm_crtc *crtc, @@ -306,6 +308,31 @@ static int vbox_crtc_mode_set(struct drm_crtc *crtc, return ret; } +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_private *vbox = crtc->dev->dev_private; + struct drm_device *drm = vbox->dev; + unsigned long flags; + int rc; + + rc = vbox_crtc_do_set_base(crtc, CRTC_FB(crtc), fb, 0, 0); + if (rc) + return rc; + + spin_lock_irqsave(&drm->event_lock, flags); + + if (event) + drm_crtc_send_vblank_event(crtc, event); + + spin_unlock_irqrestore(&drm->event_lock, flags); + + return 0; +} + static void vbox_crtc_disable(struct drm_crtc *crtc) { } @@ -344,6 +371,7 @@ 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, }; |