aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c19
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c44
2 files changed, 2 insertions, 61 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 8e5eecdf148a..cd586c52af7e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -315,23 +315,6 @@ static void vmw_sou_crtc_atomic_disable(struct drm_crtc *crtc,
315 } 315 }
316} 316}
317 317
318static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc,
319 struct drm_framebuffer *new_fb,
320 struct drm_pending_vblank_event *event,
321 uint32_t flags,
322 struct drm_modeset_acquire_ctx *ctx)
323{
324 int ret;
325
326 ret = drm_atomic_helper_page_flip(crtc, new_fb, event, flags, ctx);
327 if (ret) {
328 DRM_ERROR("Page flip error %d.\n", ret);
329 return ret;
330 }
331
332 return ret;
333}
334
335static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { 318static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
336 .gamma_set = vmw_du_crtc_gamma_set, 319 .gamma_set = vmw_du_crtc_gamma_set,
337 .destroy = vmw_sou_crtc_destroy, 320 .destroy = vmw_sou_crtc_destroy,
@@ -339,7 +322,7 @@ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
339 .atomic_duplicate_state = vmw_du_crtc_duplicate_state, 322 .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
340 .atomic_destroy_state = vmw_du_crtc_destroy_state, 323 .atomic_destroy_state = vmw_du_crtc_destroy_state,
341 .set_config = drm_atomic_helper_set_config, 324 .set_config = drm_atomic_helper_set_config,
342 .page_flip = vmw_sou_crtc_page_flip, 325 .page_flip = drm_atomic_helper_page_flip,
343}; 326};
344 327
345/* 328/*
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 26a3515ae718..096c2941a8e4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -453,48 +453,6 @@ static void vmw_stdu_crtc_atomic_disable(struct drm_crtc *crtc,
453} 453}
454 454
455/** 455/**
456 * vmw_stdu_crtc_page_flip - Binds a buffer to a screen target
457 *
458 * @crtc: CRTC to attach FB to
459 * @fb: FB to attach
460 * @event: Event to be posted. This event should've been alloced
461 * using k[mz]alloc, and should've been completely initialized.
462 * @page_flip_flags: Input flags.
463 *
464 * If the STDU uses the same display and content buffers, i.e. a true flip,
465 * this function will replace the existing display buffer with the new content
466 * buffer.
467 *
468 * If the STDU uses different display and content buffers, i.e. a blit, then
469 * only the content buffer will be updated.
470 *
471 * RETURNS:
472 * 0 on success, error code on failure
473 */
474static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc,
475 struct drm_framebuffer *new_fb,
476 struct drm_pending_vblank_event *event,
477 uint32_t flags,
478 struct drm_modeset_acquire_ctx *ctx)
479
480{
481 struct vmw_screen_target_display_unit *stdu = vmw_crtc_to_stdu(crtc);
482 int ret;
483
484 if (!stdu->defined)
485 return -EINVAL;
486
487 ret = drm_atomic_helper_page_flip(crtc, new_fb, event, flags, ctx);
488 if (ret) {
489 DRM_ERROR("Page flip error %d.\n", ret);
490 return ret;
491 }
492
493 return 0;
494}
495
496
497/**
498 * vmw_stdu_bo_clip - Callback to encode a suface DMA command cliprect 456 * vmw_stdu_bo_clip - Callback to encode a suface DMA command cliprect
499 * 457 *
500 * @dirty: The closure structure. 458 * @dirty: The closure structure.
@@ -967,7 +925,7 @@ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
967 .atomic_duplicate_state = vmw_du_crtc_duplicate_state, 925 .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
968 .atomic_destroy_state = vmw_du_crtc_destroy_state, 926 .atomic_destroy_state = vmw_du_crtc_destroy_state,
969 .set_config = drm_atomic_helper_set_config, 927 .set_config = drm_atomic_helper_set_config,
970 .page_flip = vmw_stdu_crtc_page_flip, 928 .page_flip = drm_atomic_helper_page_flip,
971}; 929};
972 930
973 931