Changeset 49877 in vbox for trunk/src/VBox
- Timestamp:
- Dec 11, 2013 4:27:39 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/x11
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
r49643 r49877 30 30 endif 31 31 VBoxClient_DEFS.linux += _GNU_SOURCE 32 ifdef VBOX_WITH_GUEST_KMS_DRIVER 33 VBoxClient_DEFS += VBOX_WITH_GUEST_KMS_DRIVER 34 endif 32 35 VBoxClient_SOURCES = \ 33 36 main.cpp -
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r44967 r49877 48 48 rc = VERR_NOT_SUPPORTED; 49 49 if (RT_SUCCESS(rc)) 50 { 50 51 rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0); 52 #ifdef VBOX_WITH_GUEST_KMS_DRIVER 53 if (RT_SUCCESS(rc)) 54 VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0); 55 #endif 56 } 51 57 else 52 58 VbglR3CtlFilterMask(0, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST); … … 68 74 if (RT_FAILURE(rc)) 69 75 { 70 VbglR3CtlFilterMask(0, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED); 76 VbglR3CtlFilterMask(0, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED 77 | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST); 78 #ifdef VBOX_WITH_GUEST_KMS_DRIVER 79 VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS); 80 #endif 71 81 VbglR3SetMouseStatus( fMouseFeatures 72 82 | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR); … … 82 92 VbglR3CtlFilterMask(0, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST 83 93 | VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED); 94 #ifdef VBOX_WITH_GUEST_KMS_DRIVER 95 VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS); 96 #endif 84 97 int rc = VbglR3GetMouseStatus(&fMouseFeatures, NULL, NULL); 85 98 if (RT_SUCCESS(rc)) … … 223 236 { 224 237 RTStrPrintf(szCommand, sizeof(szCommand), 225 "%s --output VBOX%u --set VBOX_MODE %dx%d", 226 pcszXrandr, iDisplay, cx, cy); 238 "%s --output VGA-%u --set VBOX_MODE %d", 239 pcszXrandr, iDisplay, 240 (cx & 0xffff) << 16 | (cy & 0xffff)); 227 241 system(szCommand); 228 242 } … … 231 245 { 232 246 RTStrPrintf(szCommand, sizeof(szCommand), 233 "%s --output V BOX%u --auto --pos %dx%d",247 "%s --output VGA-%u --auto --pos %dx%d", 234 248 pcszXrandr, iDisplay, cxOrg, cyOrg); 235 249 system(szCommand); 236 250 } 237 251 RTStrPrintf(szCommand, sizeof(szCommand), 238 "%s --output V BOX%u --preferred",252 "%s --output VGA-%u --preferred", 239 253 pcszXrandr, iDisplay); 240 254 system(szCommand); … … 243 257 { 244 258 RTStrPrintf(szCommand, sizeof(szCommand), 245 "%s --output V BOX%u --off",259 "%s --output VGA-%u --off", 246 260 pcszXrandr, iDisplay); 247 261 system(szCommand); … … 253 267 { 254 268 RTStrPrintf(szCommand, sizeof(szCommand), 255 "%s --output VBOX%u --set VBOX_MODE %dx%d", 256 pcszXrandr, iDisplay, cx, cy); 269 "%s --output VGA-%u --set VBOX_MODE %d", 270 pcszXrandr, iDisplay, 271 (cx & 0xffff) << 16 | (cy & 0xffff)); 257 272 system(szCommand); 258 273 RTStrPrintf(szCommand, sizeof(szCommand), 259 "%s --output V BOX%u --preferred",274 "%s --output VGA-%u --preferred", 260 275 pcszXrandr, iDisplay); 261 276 system(szCommand); -
trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
r49643 r49877 30 30 ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here. 31 31 vboxvideo_70_DEFS += __EXTENSIONS__ ## @todo Why this? 32 endif 33 ifdef VBOX_WITH_GUEST_KMS_DRIVER 34 vboxvideo_70_DEFS += VBOX_WITH_GUEST_KMS_DRIVER 32 35 endif 33 36 vboxvideo_13_DEFS := $(vboxvideo_70_DEFS) VBOXVIDEO_13 … … 77 80 IN_MODULE XFree86Module IN_XF86_MODULE IN_RT_STATIC 78 81 vboxvideo_drv_DEFS += memset=xf86memset memcpy=xf86memcpy 82 ifdef VBOX_WITH_GUEST_KMS_DRIVER 83 vboxvideo_drv_DEFS += VBOX_WITH_GUEST_KMS_DRIVER 84 endif 79 85 vboxvideo_drv_INCS = \ 80 86 $(VBOX_PATH_X11_XFREE_4_3)/include \ -
trunk/src/VBox/Additions/x11/vboxvideo/setmode.c
r49187 r49877 122 122 vboxBPP(pScrn), 0, x, y); 123 123 /* Tell the host we support graphics */ 124 #ifndef VBOX_WITH_GUEST_KMS_DRIVER 124 125 if (vbox_device_available(pVBox)) 125 126 vboxEnableGraphicsCap(pVBox); 127 #endif 126 128 if (pVBox->fHaveHGSMI) 127 129 { -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r49639 r49877 520 520 ScrnInfoPtr pScrn = output->scrn; 521 521 VBOXPtr pVBox = VBOXGetRec(pScrn); 522 TRACE_LOG("property=%d, value->type=%d, value->format=%d, value->size=% ld\n",523 (int)property, (int)value->type, value->format,value->size);522 TRACE_LOG("property=%d, value->type=%d, value->format=%d, value->size=%d\n", 523 (int)property, (int)value->type, (int)value->format, (int)value->size); 524 524 if (property == vboxAtomVBoxMode()) 525 525 { 526 526 uint32_t cDisplay = (uintptr_t)output->driver_private; 527 char sz[256] = { 0 };528 527 int w, h; 529 528 530 if ( value->type != XA_STRING 531 || (unsigned) value->size > (sizeof(sz) - 1)) 529 if ( value->type != XA_INTEGER 530 || value->format != 32 531 || value->size != 1) 532 532 return FALSE; 533 strncpy(sz, value->data, value->size); 534 TRACE_LOG("screen=%u, property value=%s\n", cDisplay, sz); 535 if (sscanf(sz, "%dx%d", &w, &h) != 2) 536 return FALSE; 533 w = (*(uint32_t *)value->data) >> 16; 534 h = (*(uint32_t *)value->data) & 0xffff; 535 TRACE_LOG("screen=%u, property value=%dx%d\n", cDisplay, w, h); 537 536 pVBox->aPreferredSize[cDisplay].cx = w; 538 537 pVBox->aPreferredSize[cDisplay].cy = h; … … 1054 1053 if (vbox_open (pScrn, pScreen, pVBox)) { 1055 1054 vboxEnableVbva(pScrn); 1055 #ifndef VBOX_WITH_GUEST_KMS_DRIVER 1056 1056 vboxEnableGraphicsCap(pVBox); 1057 #endif 1057 1058 } 1058 1059 … … 1073 1074 1074 1075 /* Set up our virtual outputs. */ 1075 snprintf(szOutput, sizeof(szOutput), "V BOX%u", i);1076 snprintf(szOutput, sizeof(szOutput), "VGA-%u", i); 1076 1077 pVBox->paOutputs[i] = xf86OutputCreate(pScrn, &VBOXOutputFuncs, 1077 1078 szOutput); … … 1112 1113 for (i = 0; i < pVBox->cScreens; ++i) 1113 1114 { 1114 char csz[] = "0x0";1115 INT32 value = 0; 1115 1116 RRChangeOutputProperty(pVBox->paOutputs[i]->randr_output, 1116 vboxAtomVBoxMode(), XA_ STRING, 8,1117 PropModeReplace, sizeof(csz), csz, TRUE,1117 vboxAtomVBoxMode(), XA_INTEGER, 32, 1118 PropModeReplace, 1, &value, TRUE, 1118 1119 FALSE); 1119 1120 … … 1222 1223 vboxDisableVbva(pScrn); 1223 1224 vboxClearVRAM(pScrn, 0, 0); 1225 #ifndef VBOX_WITH_GUEST_KMS_DRIVER 1224 1226 vboxDisableGraphicsCap(pVBox); 1227 #endif 1225 1228 #ifdef VBOX_DRI_OLD 1226 1229 if (pVBox->useDRI) … … 1245 1248 if (pVBox->fHaveHGSMI) 1246 1249 vboxDisableVbva(pScrn); 1250 #ifndef VBOX_WITH_GUEST_KMS_DRIVER 1247 1251 if (pScrn->vtSema) 1248 1252 vboxDisableGraphicsCap(pVBox); 1253 #endif 1249 1254 vboxClearVRAM(pScrn, 0, 0); 1250 1255 }
Note:
See TracChangeset
for help on using the changeset viewer.