- Timestamp:
- Oct 10, 2016 8:40:56 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxVideo.h
r63824 r64185 27 27 #define ___VBox_VBoxVideo_h 28 28 29 #include <VBox/VMMDev.h>30 29 #include <VBox/Hardware/VBoxVideoVBE.h> 31 30 32 31 #include <iprt/cdefs.h> 33 32 #include <iprt/types.h> 33 #include <iprt/assert.h> 34 34 35 35 /* … … 82 82 #define VBOX_VIDEO_NO_SCREEN ~0 83 83 84 /** 85 * VBVA command header. 86 * 87 * @todo Where does this fit in? 88 */ 89 typedef struct VBVACMDHDR 90 { 91 /** Coordinates of affected rectangle. */ 92 int16_t x; 93 int16_t y; 94 uint16_t w; 95 uint16_t h; 96 } VBVACMDHDR; 97 AssertCompileSize(VBVACMDHDR, 8); 98 99 /** @name VBVA ring defines. 100 * 101 * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of 102 * data. For example big bitmaps which do not fit to the buffer. 103 * 104 * Guest starts writing to the buffer by initializing a record entry in the 105 * aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being 106 * written. As data is written to the ring buffer, the guest increases off32End 107 * for the record. 108 * 109 * The host reads the aRecords on flushes and processes all completed records. 110 * When host encounters situation when only a partial record presents and 111 * cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE - 112 * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates 113 * off32Head. After that on each flush the host continues fetching the data 114 * until the record is completed. 115 * 116 */ 117 #define VBVA_RING_BUFFER_SIZE (_4M - _1K) 118 #define VBVA_RING_BUFFER_THRESHOLD (4 * _1K) 119 120 #define VBVA_MAX_RECORDS (64) 121 122 #define VBVA_F_MODE_ENABLED UINT32_C(0x00000001) 123 #define VBVA_F_MODE_VRDP UINT32_C(0x00000002) 124 #define VBVA_F_MODE_VRDP_RESET UINT32_C(0x00000004) 125 #define VBVA_F_MODE_VRDP_ORDER_MASK UINT32_C(0x00000008) 126 127 #define VBVA_F_STATE_PROCESSING UINT32_C(0x00010000) 128 129 #define VBVA_F_RECORD_PARTIAL UINT32_C(0x80000000) 130 /** @} */ 131 132 /** 133 * VBVA record. 134 */ 135 typedef struct VBVARECORD 136 { 137 /** The length of the record. Changed by guest. */ 138 uint32_t cbRecord; 139 } VBVARECORD; 140 AssertCompileSize(VBVARECORD, 4); 141 84 142 /* The size of the information. */ 85 143 /* … … 940 998 } VBVACONF32; 941 999 1000 /** Reserved for historical reasons. */ 1001 #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED0 RT_BIT(0) 1002 /** Guest cursor capability: can the host show a hardware cursor at the host 1003 * pointer location? */ 1004 #define VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE RT_BIT(1) 1005 /** Reserved for historical reasons. */ 1006 #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED2 RT_BIT(2) 1007 /** Reserved for historical reasons. Must always be unset. */ 1008 #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED3 RT_BIT(3) 1009 /** Reserved for historical reasons. */ 1010 #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED4 RT_BIT(4) 1011 /** Reserved for historical reasons. */ 1012 #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED5 RT_BIT(5) 1013 942 1014 typedef struct VBVAINFOVIEW 943 1015 { … … 1100 1172 1101 1173 } VBVAMOUSEPOINTERSHAPE; 1174 1175 /** @name VBVAMOUSEPOINTERSHAPE::fu32Flags 1176 * @note The VBOX_MOUSE_POINTER_* flags are used in the guest video driver, 1177 * values must be <= 0x8000 and must not be changed. (try make more sense 1178 * of this, please). 1179 * @{ 1180 */ 1181 /** pointer is visible */ 1182 #define VBOX_MOUSE_POINTER_VISIBLE (0x0001) 1183 /** pointer has alpha channel */ 1184 #define VBOX_MOUSE_POINTER_ALPHA (0x0002) 1185 /** pointerData contains new pointer shape */ 1186 #define VBOX_MOUSE_POINTER_SHAPE (0x0004) 1187 /** @} */ 1102 1188 1103 1189 /* the guest driver can handle asynch guest cmd completion by reading the command offset from io port */ -
trunk/include/VBox/VBoxVideoGuest.h
r63273 r64185 32 32 #include <VBox/HGSMI/HGSMIChSetup.h> 33 33 #include <VBox/VBoxVideo.h> 34 35 #include <iprt/err.h> /* The functions in here return IPRT errors. */ 34 36 35 37 #ifdef VBOX_XPDM_MINIPORT -
trunk/include/VBox/VMMDev.h
r62965 r64185 27 27 #define ___VBox_VMMDev_h 28 28 29 #include <VBox/VBoxVideo.h> /* For VBVA definitions. */ 29 30 #include <VBox/cdefs.h> 30 31 #include <VBox/param.h> /* for the PCI IDs. */ … … 348 349 /** Header. */ 349 350 VMMDevRequestHeader header; 350 /** VBOX_MOUSE_POINTER_* bit flags . */351 /** VBOX_MOUSE_POINTER_* bit flags from VBox/VBoxVideo.h. */ 351 352 uint32_t fFlags; 352 353 /** x coordinate of hot spot. */ … … 404 405 sizeof(VMMDevReqMousePointer)); 405 406 } 406 407 /** @name VMMDevReqMousePointer::fFlags408 * @note The VBOX_MOUSE_POINTER_* flags are used in the guest video driver,409 * values must be <= 0x8000 and must not be changed. (try make more sense410 * of this, please).411 * @{412 */413 /** pointer is visible */414 #define VBOX_MOUSE_POINTER_VISIBLE (0x0001)415 /** pointer has alpha channel */416 #define VBOX_MOUSE_POINTER_ALPHA (0x0002)417 /** pointerData contains new pointer shape */418 #define VBOX_MOUSE_POINTER_SHAPE (0x0004)419 /** @} */420 407 421 408 … … 2074 2061 2075 2062 /** 2076 * VBVA command header.2077 *2078 * @todo Where does this fit in?2079 */2080 typedef struct VBVACMDHDR2081 {2082 /** Coordinates of affected rectangle. */2083 int16_t x;2084 int16_t y;2085 uint16_t w;2086 uint16_t h;2087 } VBVACMDHDR;2088 AssertCompileSize(VBVACMDHDR, 8);2089 2090 /** @name VBVA ring defines.2091 *2092 * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of2093 * data. For example big bitmaps which do not fit to the buffer.2094 *2095 * Guest starts writing to the buffer by initializing a record entry in the2096 * aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being2097 * written. As data is written to the ring buffer, the guest increases off32End2098 * for the record.2099 *2100 * The host reads the aRecords on flushes and processes all completed records.2101 * When host encounters situation when only a partial record presents and2102 * cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE -2103 * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates2104 * off32Head. After that on each flush the host continues fetching the data2105 * until the record is completed.2106 *2107 */2108 #define VBVA_RING_BUFFER_SIZE (_4M - _1K)2109 #define VBVA_RING_BUFFER_THRESHOLD (4 * _1K)2110 2111 #define VBVA_MAX_RECORDS (64)2112 2113 #define VBVA_F_MODE_ENABLED UINT32_C(0x00000001)2114 #define VBVA_F_MODE_VRDP UINT32_C(0x00000002)2115 #define VBVA_F_MODE_VRDP_RESET UINT32_C(0x00000004)2116 #define VBVA_F_MODE_VRDP_ORDER_MASK UINT32_C(0x00000008)2117 2118 #define VBVA_F_STATE_PROCESSING UINT32_C(0x00010000)2119 2120 #define VBVA_F_RECORD_PARTIAL UINT32_C(0x80000000)2121 /** @} */2122 2123 /**2124 * VBVA record.2125 */2126 typedef struct VBVARECORD2127 {2128 /** The length of the record. Changed by guest. */2129 uint32_t cbRecord;2130 } VBVARECORD;2131 AssertCompileSize(VBVARECORD, 4);2132 2133 2134 /**2135 2063 * VBVA memory layout. 2136 2064 * -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r64172 r64185 699 699 if (ret) 700 700 return ret; 701 if ( caps & VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER 702 || !(caps & VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE)) 701 if (!(caps & VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE)) 703 702 /* -EINVAL means cursor_set2() not supported, -EAGAIN means 704 703 * retry at once. */ -
trunk/src/VBox/Additions/x11/vboxvideo/getmode.c
r63221 r64185 168 168 static bool useHardwareCursor(uint32_t fCursorCapabilities) 169 169 { 170 if ( !(fCursorCapabilities & VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER) 171 && (fCursorCapabilities & VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE)) 170 if (fCursorCapabilities & VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE) 172 171 return true; 173 172 return false;
Note:
See TracChangeset
for help on using the changeset viewer.