Changeset 25069 in vbox
- Timestamp:
- Nov 28, 2009 10:17:22 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/DisplayImpl.cpp
r25054 r25069 108 108 mfu32PendingVideoAccelDisable = false; 109 109 #endif /* VBOX_WITH_OLD_VBVA_LOCK */ 110 111 #ifdef VBOX_WITH_HGSMI 112 mu32UpdateVBVAFlags = 0; 113 #endif 110 114 111 115 return S_OK; … … 1181 1185 } 1182 1186 } 1187 } 1183 1188 1184 1189 #ifdef VBOX_WITH_HGSMI 1190 static void vbvaSetMemoryFlagsHGSMI (unsigned uScreenId, 1191 uint32_t fu32SupportedOrders, 1192 bool fVideoAccelVRDP, 1193 DISPLAYFBINFO *pFBInfo) 1194 { 1195 LogFlowFunc(("HGSMI[%d]: %p\n", uScreenId, pFBInfo->pVBVAHostFlags)); 1196 1197 if (pFBInfo->pVBVAHostFlags) 1198 { 1199 uint32_t fu32HostEvents = VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET; 1200 1201 if (pFBInfo->fVBVAEnabled) 1202 { 1203 fu32HostEvents |= VBVA_F_MODE_ENABLED; 1204 1205 if (fVideoAccelVRDP) 1206 { 1207 fu32HostEvents |= VBVA_F_MODE_VRDP; 1208 } 1209 } 1210 1211 ASMAtomicOrU32(&pFBInfo->pVBVAHostFlags->u32HostEvents, fu32HostEvents); 1212 ASMAtomicWriteU32(&pFBInfo->pVBVAHostFlags->u32SupportedOrders, fu32SupportedOrders); 1213 1214 LogFlowFunc((" fu32HostEvents = 0x%08X, fu32SupportedOrders = 0x%08X\n", fu32HostEvents, fu32SupportedOrders)); 1215 } 1216 } 1217 1218 static void vbvaSetMemoryFlagsAllHGSMI (uint32_t fu32SupportedOrders, 1219 bool fVideoAccelVRDP, 1220 DISPLAYFBINFO *paFBInfos, 1221 unsigned cFBInfos) 1222 { 1223 unsigned uScreenId; 1224 1185 1225 for (uScreenId = 0; uScreenId < cFBInfos; uScreenId++) 1186 1226 { 1187 LogFlowFunc(("HGSMI[%d]: %p\n", uScreenId, paFBInfos[uScreenId].pVBVAHostFlags)); 1188 if (paFBInfos[uScreenId].pVBVAHostFlags) 1189 { 1190 uint32_t fu32HostEvents = VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET; 1191 1192 if (fVideoAccelEnabled) 1193 { 1194 fu32HostEvents |= VBVA_F_MODE_ENABLED; 1195 1196 if (fVideoAccelVRDP) 1197 { 1198 fu32HostEvents |= VBVA_F_MODE_VRDP; 1199 } 1200 } 1201 1202 paFBInfos[uScreenId].pVBVAHostFlags->u32HostEvents |= fu32HostEvents; 1203 paFBInfos[uScreenId].pVBVAHostFlags->u32SupportedOrders = fu32SupportedOrders; 1204 } 1205 } 1227 vbvaSetMemoryFlagsHGSMI(uScreenId, fu32SupportedOrders, fVideoAccelVRDP, &paFBInfos[uScreenId]); 1228 } 1229 } 1206 1230 #endif /* VBOX_WITH_HGSMI */ 1207 }1208 1231 1209 1232 bool Display::VideoAccelAllowed (void) … … 1387 1410 1388 1411 vbvaSetMemoryFlags (mpVbvaMemory, mfVideoAccelEnabled, mfVideoAccelVRDP, mfu32SupportedOrders, maFramebuffers, mcMonitors); 1412 #ifdef VBOX_WITH_HGSMI 1413 /* Here is VRDP-IN thread. Process the request in vbvaUpdateBegin under DevVGA lock on an EMT. */ 1414 ASMAtomicIncU32(&mu32UpdateVBVAFlags); 1415 #endif /* VBOX_WITH_HGSMI */ 1389 1416 1390 1417 LogRel(("VBVA: VRDP acceleration has been disabled.\n")); … … 1402 1429 1403 1430 vbvaSetMemoryFlags (mpVbvaMemory, mfVideoAccelEnabled, mfVideoAccelVRDP, mfu32SupportedOrders, maFramebuffers, mcMonitors); 1431 #ifdef VBOX_WITH_HGSMI 1432 /* Here is VRDP-IN thread. Process the request in vbvaUpdateBegin under DevVGA lock on an EMT. */ 1433 ASMAtomicIncU32(&mu32UpdateVBVAFlags); 1434 #endif /* VBOX_WITH_HGSMI */ 1404 1435 1405 1436 LogRel(("VBVA: VRDP acceleration has been requested.\n")); … … 3160 3191 pThis->maFramebuffers[uScreenId].pVBVAHostFlags = pHostFlags; 3161 3192 3162 vbvaSetMemoryFlags (NULL, true, pThis->mfVideoAccelVRDP, pThis->mfu32SupportedOrders, pThis->maFramebuffers, pThis->mcMonitors);3193 vbvaSetMemoryFlagsHGSMI(uScreenId, pThis->mfu32SupportedOrders, pThis->mfVideoAccelVRDP, &pThis->maFramebuffers[uScreenId]); 3163 3194 3164 3195 return VINF_SUCCESS; … … 3173 3204 3174 3205 pThis->maFramebuffers[uScreenId].fVBVAEnabled = false; 3206 3207 vbvaSetMemoryFlagsHGSMI(uScreenId, 0, false, &pThis->maFramebuffers[uScreenId]); 3208 3175 3209 pThis->maFramebuffers[uScreenId].pVBVAHostFlags = NULL; 3176 3210 } … … 3183 3217 Display *pThis = pDrv->pDisplay; 3184 3218 DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[uScreenId]; 3219 3220 if (ASMAtomicReadU32(&pThis->mu32UpdateVBVAFlags) > 0) 3221 { 3222 vbvaSetMemoryFlagsAllHGSMI(pThis->mfu32SupportedOrders, pThis->mfVideoAccelVRDP, pThis->maFramebuffers, pThis->mcMonitors); 3223 ASMAtomicDecU32(&pThis->mu32UpdateVBVAFlags); 3224 } 3185 3225 3186 3226 if (RT_LIKELY(pFBInfo->u32ResizeStatus == ResizeStatus_Void)) -
trunk/src/VBox/Main/include/DisplayImpl.h
r25052 r25069 361 361 void videoAccelFlush (void); 362 362 #endif /* VBOX_WITH_OLD_VBVA_LOCK */ 363 364 #ifdef VBOX_WITH_HGSMI 365 volatile uint32_t mu32UpdateVBVAFlags; 366 #endif 363 367 }; 364 368
Note:
See TracChangeset
for help on using the changeset viewer.