diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-11 06:37:39 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-14 08:39:09 +0100 |
commit | 0f0eb98e33c64eebb493829cf0c2e059c4eac872 (patch) | |
tree | 7025d71dd85ba19b28b3f71c3a3ad17d8ffb6521 /drivers/gpu/drm/bochs | |
parent | 472fde887f6c8e9a68fcf5902c500c070b5d44e3 (diff) | |
download | linux-0f0eb98e33c64eebb493829cf0c2e059c4eac872.tar.gz linux-0f0eb98e33c64eebb493829cf0c2e059c4eac872.tar.bz2 linux-0f0eb98e33c64eebb493829cf0c2e059c4eac872.zip |
drm/bochs: atomic: add atomic_flush+atomic_enable callbacks.
Conversion to atomic modesetting, step one.
Add atomic crtc helper callbacks.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-4-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r-- | drivers/gpu/drm/bochs/bochs_kms.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index f7e6d1a9b351..2cbd406b1f82 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -115,6 +115,29 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc, return 0; } +static void bochs_crtc_atomic_enable(struct drm_crtc *crtc, + struct drm_crtc_state *old_crtc_state) +{ +} + +static void bochs_crtc_atomic_flush(struct drm_crtc *crtc, + struct drm_crtc_state *old_crtc_state) +{ + struct drm_device *dev = crtc->dev; + struct drm_pending_vblank_event *event; + + if (crtc->state && crtc->state->event) { + unsigned long irqflags; + + spin_lock_irqsave(&dev->event_lock, irqflags); + event = crtc->state->event; + crtc->state->event = NULL; + drm_crtc_send_vblank_event(crtc, event); + spin_unlock_irqrestore(&dev->event_lock, irqflags); + } +} + + /* These provide the minimum set of functions required to handle a CRTC */ static const struct drm_crtc_funcs bochs_crtc_funcs = { .set_config = drm_crtc_helper_set_config, @@ -128,6 +151,8 @@ static const struct drm_crtc_helper_funcs bochs_helper_funcs = { .mode_set_base = bochs_crtc_mode_set_base, .prepare = bochs_crtc_prepare, .commit = bochs_crtc_commit, + .atomic_enable = bochs_crtc_atomic_enable, + .atomic_flush = bochs_crtc_atomic_flush, }; static const uint32_t bochs_formats[] = { |