Lines Matching refs:vps
305 void vmw_du_plane_unpin_surf(struct vmw_plane_state *vps, in vmw_du_plane_unpin_surf() argument
308 if (vps->surf) { in vmw_du_plane_unpin_surf()
309 if (vps->pinned) { in vmw_du_plane_unpin_surf()
310 vmw_resource_unpin(&vps->surf->res); in vmw_du_plane_unpin_surf()
311 vps->pinned--; in vmw_du_plane_unpin_surf()
315 if (vps->pinned) in vmw_du_plane_unpin_surf()
317 vmw_surface_unreference(&vps->surf); in vmw_du_plane_unpin_surf()
337 struct vmw_plane_state *vps = vmw_plane_state_to_vps(old_state); in vmw_du_plane_cleanup_fb() local
339 vmw_du_plane_unpin_surf(vps, false); in vmw_du_plane_cleanup_fb()
356 struct vmw_plane_state *vps = vmw_plane_state_to_vps(new_state); in vmw_du_cursor_plane_prepare_fb() local
359 if (vps->surf) in vmw_du_cursor_plane_prepare_fb()
360 vmw_surface_unreference(&vps->surf); in vmw_du_cursor_plane_prepare_fb()
362 if (vps->bo) in vmw_du_cursor_plane_prepare_fb()
363 vmw_bo_unreference(&vps->bo); in vmw_du_cursor_plane_prepare_fb()
367 vps->bo = vmw_framebuffer_to_vfbd(fb)->buffer; in vmw_du_cursor_plane_prepare_fb()
368 vmw_bo_reference(vps->bo); in vmw_du_cursor_plane_prepare_fb()
370 vps->surf = vmw_framebuffer_to_vfbs(fb)->surface; in vmw_du_cursor_plane_prepare_fb()
371 vmw_surface_reference(vps->surf); in vmw_du_cursor_plane_prepare_fb()
390 struct vmw_plane_state *vps = vmw_plane_state_to_vps(new_state); in vmw_du_cursor_plane_atomic_update() local
403 du->cursor_surface = vps->surf; in vmw_du_cursor_plane_atomic_update()
404 du->cursor_bo = vps->bo; in vmw_du_cursor_plane_atomic_update()
406 if (vps->surf) { in vmw_du_cursor_plane_atomic_update()
410 vps->surf->snooper.image, in vmw_du_cursor_plane_atomic_update()
413 } else if (vps->bo) { in vmw_du_cursor_plane_atomic_update()
414 ret = vmw_cursor_update_bo(dev_priv, vps->bo, in vmw_du_cursor_plane_atomic_update()
679 struct vmw_plane_state *vps; in vmw_du_plane_duplicate_state() local
681 vps = kmemdup(plane->state, sizeof(*vps), GFP_KERNEL); in vmw_du_plane_duplicate_state()
683 if (!vps) in vmw_du_plane_duplicate_state()
686 vps->pinned = 0; in vmw_du_plane_duplicate_state()
687 vps->cpp = 0; in vmw_du_plane_duplicate_state()
690 if (vps->surf) in vmw_du_plane_duplicate_state()
691 (void) vmw_surface_reference(vps->surf); in vmw_du_plane_duplicate_state()
693 if (vps->bo) in vmw_du_plane_duplicate_state()
694 (void) vmw_bo_reference(vps->bo); in vmw_du_plane_duplicate_state()
696 state = &vps->base; in vmw_du_plane_duplicate_state()
713 struct vmw_plane_state *vps; in vmw_du_plane_reset() local
719 vps = kzalloc(sizeof(*vps), GFP_KERNEL); in vmw_du_plane_reset()
721 if (!vps) { in vmw_du_plane_reset()
726 __drm_atomic_helper_plane_reset(plane, &vps->base); in vmw_du_plane_reset()
742 struct vmw_plane_state *vps = vmw_plane_state_to_vps(state); in vmw_du_plane_destroy_state() local
746 if (vps->surf) in vmw_du_plane_destroy_state()
747 vmw_surface_unreference(&vps->surf); in vmw_du_plane_destroy_state()
749 if (vps->bo) in vmw_du_plane_destroy_state()
750 vmw_bo_unreference(&vps->bo); in vmw_du_plane_destroy_state()