- Timestamp:
- May 23, 2014 3:59:13 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/undefined
r51242 r51374 36 36 close 37 37 drmClose 38 drmDropMaster 38 39 drmFreeVersion 39 40 drmGetVersion 40 41 drmIoctl 42 drmSetMaster 41 43 fbPictureInit 42 44 fbScreenInit -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r51242 r51374 1225 1225 #elif defined(VBOX_DRI) /* DRI2 */ 1226 1226 if (pVBox->drmFD >= 0) 1227 { 1227 1228 /* Tell the kernel driver, if present, that we are taking over. */ 1228 1229 drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_DISABLE_HGSMI, NULL); 1230 drmSetMaster(pVBox->drmFD); 1231 } 1229 1232 #endif 1230 1233 if (pVBox->fHaveHGSMI) … … 1260 1263 DRILock(xf86ScrnToScreen(pScrn), 0); 1261 1264 #elif defined(VBOX_DRI) /* DRI2 */ 1265 if (pVBox->drmFD >= 0) 1266 drmDropMaster(pVBox->drmFD); 1267 /* Tell the kernel driver, if present, that it can use the framebuffer 1268 * driver again. If not, or if that fails, restore the old mode ourselves. 1269 */ 1262 1270 if ( pVBox->drmFD < 0 1263 /* Tell the kernel driver, if present, that it can use the framebuffer1264 * driver again. */1265 1271 || drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) < 0) 1266 1272 #endif -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_dri2.c
r49628 r51374 62 62 63 63 memset(&DRI2Info, 0, sizeof(DRI2Info)); 64 pVBox->drmFD = -1; 64 65 for (i = 0; i < RT_ELEMENTS(devicePaths); ++i) 65 66 { … … 70 71 if ( pVersion 71 72 && pVersion->name_len 72 && !strcmp(pVersion->name, VBOX_DRM_DRIVER_NAME)) 73 && !strcmp(pVersion->name, VBOX_DRM_DRIVER_NAME) 74 && drmSetMaster(fd) == 0) 73 75 { 74 76 TRACE_LOG("Opened drm device %s\n", devicePaths[i]); … … 86 88 return FALSE; 87 89 DRI2Info.version = 3; 88 DRI2Info.fd = -1;90 DRI2Info.fd = pVBox->drmFD; 89 91 DRI2Info.driverName = VBOX_DRI_DRIVER_NAME; 90 92 DRI2Info.CopyRegion = VBOXDRICopyRegion; … … 98 100 { 99 101 DRI2CloseScreen(pScreen); 100 if (pVBox->drmFD )102 if (pVBox->drmFD >= 0) 101 103 close(pVBox->drmFD); 102 104 }
Note:
See TracChangeset
for help on using the changeset viewer.