Changeset 35267 in vbox for trunk/src/VBox/Additions/x11/vboxvideo
- Timestamp:
- Dec 20, 2010 9:07:52 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69115
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r35208 r35267 195 195 196 196 pVBox = pScrn->driverPrivate; 197 if (pVBox->fHaveHGSMI == FALSE )197 if (pVBox->fHaveHGSMI == FALSE || pVBox->vtSwitch) 198 198 return; 199 199 … … 259 259 ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; 260 260 int rc = VINF_SUCCESS; 261 unsigned i;262 uint32_t offVRAMBaseMapping, offGuestHeapMemory, cbGuestHeapMemory,263 cScreens;264 void *pvGuestHeapMemory;265 261 266 262 pVBox->cScreens = 1; … … 270 266 return FALSE; 271 267 } 268 269 /* Set up the dirty rectangle handler. It will be added into a function 270 * chain and gets removed when the screen is cleaned up. */ 271 if (ShadowFBInit2(pScreen, NULL, vboxHandleDirtyRect) != TRUE) 272 { 273 xf86DrvMsg(scrnIndex, X_ERROR, 274 "Unable to install dirty rectangle handler for VirtualBox graphics acceleration.\n"); 275 return FALSE; 276 } 277 return TRUE; 278 } 279 280 /** 281 * Initialise VirtualBox's accelerated video extensions. 282 * 283 * @returns TRUE on success, FALSE on failure 284 */ 285 static Bool 286 vboxSetupVRAMVbva(ScrnInfoPtr pScrn, VBOXPtr pVBox) 287 { 288 int rc = VINF_SUCCESS; 289 unsigned i; 290 uint32_t offVRAMBaseMapping, offGuestHeapMemory, cbGuestHeapMemory; 291 void *pvGuestHeapMemory; 292 293 if (!pVBox->fHaveHGSMI) 294 return FALSE; 272 295 VBoxHGSMIGetBaseMappingInfo(pScrn->videoRam * 1024, &offVRAMBaseMapping, 273 296 NULL, &offGuestHeapMemory, &cbGuestHeapMemory, … … 283 306 if (RT_FAILURE(rc)) 284 307 { 285 xf86DrvMsg( scrnIndex, X_ERROR, "Failed to set up the guest-to-host communication context, rc=%d\n", rc);308 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up the guest-to-host communication context, rc=%d\n", rc); 286 309 return FALSE; 287 310 } 288 311 pVBox->cbView = pVBox->cbFramebuffer = offVRAMBaseMapping; 289 312 pVBox->cScreens = VBoxHGSMIGetMonitorCount(&pVBox->guestCtx); 290 xf86DrvMsg( scrnIndex, X_INFO, "Requested monitor count: %u\n",313 xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Requested monitor count: %u\n", 291 314 pVBox->cScreens); 292 315 for (i = 0; i < pVBox->cScreens; ++i) … … 305 328 rc = VBoxHGSMISendViewInfo(&pVBox->guestCtx, pVBox->cScreens, 306 329 vboxFillViewInfo, (void *)pVBox); 307 308 /* Set up the dirty rectangle handler. It will be added into a function 309 * chain and gets removed when the screen is cleaned up. */ 310 if (ShadowFBInit2(pScreen, NULL, vboxHandleDirtyRect) != TRUE) 311 { 312 xf86DrvMsg(scrnIndex, X_ERROR, 313 "Unable to install dirty rectangle handler for VirtualBox graphics acceleration.\n"); 330 if (RT_FAILURE(rc)) 331 { 332 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to send the view information to the host, rc=%d\n", rc); 314 333 return FALSE; 315 334 } … … 767 786 768 787 TRACE_ENTRY(); 769 if (! pVBox->fHaveHGSMI)788 if (!vboxSetupVRAMVbva(pScrn, pVBox)) 770 789 return FALSE; 771 790 for (i = 0; i < pVBox->cScreens; ++i) -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r35266 r35267 1159 1159 1160 1160 TRACE_ENTRY(); 1161 if (pVBox->fHaveHGSMI) 1162 vboxEnableVbva(pScrn); 1161 1163 pVBox->vtSwitch = FALSE; 1162 1164 #ifdef VBOX_DRI … … 1173 1175 return FALSE; 1174 1176 #endif 1175 if (pVBox->fHaveHGSMI)1176 vboxEnableVbva(pScrn);1177 1177 return TRUE; 1178 1178 }
Note:
See TracChangeset
for help on using the changeset viewer.