diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2011-10-04 14:13:26 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-05 05:17:17 -0400 |
commit | 2fcd5a73bfd5341876f9ea6b5adcc1dd814226d4 (patch) | |
tree | 88aa55c24bc1fe620a0753ab1598fe2727b19352 /include/drm | |
parent | 44031d25ccface0ae647d664347ae3d3a8016f5f (diff) |
vmwgfx: Add present and readback ioctls
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/vmwgfx_drm.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index 29cd9cfdd611..5b5b0a891f36 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -52,6 +52,8 @@ | |||
52 | #define DRM_VMW_FENCE_SIGNALED 15 | 52 | #define DRM_VMW_FENCE_SIGNALED 15 |
53 | #define DRM_VMW_FENCE_UNREF 16 | 53 | #define DRM_VMW_FENCE_UNREF 16 |
54 | #define DRM_VMW_FENCE_EVENT 17 | 54 | #define DRM_VMW_FENCE_EVENT 17 |
55 | #define DRM_VMW_PRESENT 18 | ||
56 | #define DRM_VMW_PRESENT_READBACK 19 | ||
55 | 57 | ||
56 | 58 | ||
57 | /*************************************************************************/ | 59 | /*************************************************************************/ |
@@ -681,5 +683,66 @@ struct drm_vmw_fence_arg { | |||
681 | }; | 683 | }; |
682 | 684 | ||
683 | 685 | ||
686 | /*************************************************************************/ | ||
687 | /** | ||
688 | * DRM_VMW_PRESENT | ||
689 | * | ||
690 | * Executes an SVGA present on a given fb for a given surface. The surface | ||
691 | * is placed on the framebuffer. Cliprects are given relative to the given | ||
692 | * point (the point disignated by dest_{x|y}). | ||
693 | * | ||
694 | */ | ||
695 | |||
696 | /** | ||
697 | * struct drm_vmw_present_arg | ||
698 | * @fb_id: framebuffer id to present / read back from. | ||
699 | * @sid: Surface id to present from. | ||
700 | * @dest_x: X placement coordinate for surface. | ||
701 | * @dest_y: Y placement coordinate for surface. | ||
702 | * @clips_ptr: Pointer to an array of clip rects cast to an uint64_t. | ||
703 | * @num_clips: Number of cliprects given relative to the framebuffer origin, | ||
704 | * in the same coordinate space as the frame buffer. | ||
705 | * @pad64: Unused 64-bit padding. | ||
706 | * | ||
707 | * Input argument to the DRM_VMW_PRESENT ioctl. | ||
708 | */ | ||
709 | |||
710 | struct drm_vmw_present_arg { | ||
711 | uint32_t fb_id; | ||
712 | uint32_t sid; | ||
713 | int32_t dest_x; | ||
714 | int32_t dest_y; | ||
715 | uint64_t clips_ptr; | ||
716 | uint32_t num_clips; | ||
717 | uint32_t pad64; | ||
718 | }; | ||
719 | |||
720 | |||
721 | /*************************************************************************/ | ||
722 | /** | ||
723 | * DRM_VMW_PRESENT_READBACK | ||
724 | * | ||
725 | * Executes an SVGA present readback from a given fb to the dma buffer | ||
726 | * currently bound as the fb. If there is no dma buffer bound to the fb, | ||
727 | * an error will be returned. | ||
728 | * | ||
729 | */ | ||
730 | |||
731 | /** | ||
732 | * struct drm_vmw_present_arg | ||
733 | * @fb_id: fb_id to present / read back from. | ||
734 | * @num_clips: Number of cliprects. | ||
735 | * @clips_ptr: Pointer to an array of clip rects cast to an uint64_t. | ||
736 | * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an uint64_t. | ||
737 | * If this member is NULL, then the ioctl should not return a fence. | ||
738 | */ | ||
739 | |||
740 | struct drm_vmw_present_readback_arg { | ||
741 | uint32_t fb_id; | ||
742 | uint32_t num_clips; | ||
743 | uint64_t clips_ptr; | ||
744 | uint64_t fence_rep; | ||
745 | }; | ||
746 | |||
684 | 747 | ||
685 | #endif | 748 | #endif |