- Timestamp:
- Dec 6, 2010 1:44:49 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
r34722 r34747 131 131 vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD 132 132 vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS) 133 vboxvideo_drv_13_DEFS := $(vboxvideo_drv_70_DEFS) vboxvideo133 vboxvideo_drv_13_DEFS := $(vboxvideo_drv_70_DEFS) VBOXVIDEO_13 134 134 vboxvideo_drv_13_INCS = \ 135 135 $(VBOX_PATH_X11_XORG_1_3) \ -
trunk/src/VBox/Additions/x11/vboxvideo/undefined_13
r34721 r34747 112 112 sigfillset 113 113 sprintf 114 snprintf 114 115 sscanf 115 116 sscanf … … 191 192 xf86UnMapVidMem 192 193 xf86sprintf 194 xf86snprintf -
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r34715 r34747 215 215 || aRects[i].y2 < pVBox->aScreenLocation[j].y) 216 216 continue; 217 cmdHdr.x = (int16_t)aRects[i].x1 - pVBox->aScreenLocation[j].x; 218 cmdHdr.y = (int16_t)aRects[i].y1 - pVBox->aScreenLocation[j].y; 217 cmdHdr.x = (int16_t)aRects[i].x1 218 - pVBox->aScreenLocation[j].x * 2 219 + pVBox->aScreenLocation[0].x; 220 cmdHdr.y = (int16_t)aRects[i].y1 221 - pVBox->aScreenLocation[j].y * 2 222 + pVBox->aScreenLocation[0].y; 219 223 cmdHdr.w = (uint16_t)(aRects[i].x2 - aRects[i].x1); 220 224 cmdHdr.h = (uint16_t)(aRects[i].y2 - aRects[i].y1); 221 225 222 TRACE_LOG(" x=%d, y=%d, w=%d, z=%d\n", cmdHdr.x, cmdHdr.y,223 cmdHdr.w, cmdHdr.h);226 TRACE_LOG("display=%u, x=%d, y=%d, w=%d, h=%d\n", 227 j, cmdHdr.x, cmdHdr.y, cmdHdr.w, cmdHdr.h); 224 228 225 229 VBoxVBVABufferBeginUpdate(&pVBox->aVbvaCtx[j], &pVBox->guestCtx); -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r34722 r34747 301 301 TRACE_LOG("name=%s, HDisplay=%d, VDisplay=%d, x=%d, y=%d\n", adjusted_mode->name, 302 302 adjusted_mode->HDisplay, adjusted_mode->VDisplay, x, y); 303 VBOXSetMode(crtc->scrn, 0, adjusted_mode->HDisplay, adjusted_mode->VDisplay,304 x, y);303 VBOXSetMode(crtc->scrn, (uint32_t)crtc->driver_private, 304 adjusted_mode->HDisplay, adjusted_mode->VDisplay, x, y); 305 305 /* Don't remember any modes set while we are seamless, as they are 306 306 * just temporary. */ … … 713 713 Gamma gzeros = {0.0, 0.0, 0.0}; 714 714 rgb rzeros = {0, 0, 0}; 715 #ifdef VBOXVIDEO_13716 xf86OutputPtr output;717 #endif718 715 unsigned DispiId; 719 716 … … 822 819 if (!xf86SetDepthBpp(pScrn, cBits, 0, 0, Support32bppFb)) 823 820 return FALSE; 824 #ifndef VBOXVIDEO_13825 821 vboxAddModes(pScrn, cx, cy); 826 #endif827 822 } 828 823 if (pScrn->bitsPerPixel != 32 && pScrn->bitsPerPixel != 16) … … 840 835 pScrn->virtualX = 32000; 841 836 pScrn->virtualY = 32000; 842 843 /* Initialise CRTC and output configuration for use with randr1.2. */ 844 xf86CrtcConfigInit(pScrn, &VBOXCrtcConfigFuncs); 845 846 /* Setup our single virtual CRTC. */ 847 xf86CrtcCreate(pScrn, &VBOXCrtcFuncs); 848 849 /* Set up our single virtual output. */ 850 output = xf86OutputCreate(pScrn, &VBOXOutputFuncs, "VBOX1"); 851 852 /* Set a sane minimum and maximum mode size */ 853 xf86CrtcSetSizeRange(pScrn, 64, 64, 32000, 32000); 854 855 /* We are not interested in the monitor section in the configuration file. */ 856 xf86OutputUseScreenMonitor(output, FALSE); 857 output->possible_crtcs = 1; 858 output->possible_clones = 0; 859 860 /* Now create our initial CRTC/output configuration. */ 861 if (!xf86InitialConfiguration(pScrn, TRUE)) { 862 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Initial CRTC configuration failed!\n"); 863 return (FALSE); 864 } 865 #else /* !VBOXVIDEO_13 */ 837 #else 866 838 /* We don't validate with xf86ValidateModes and xf86PruneModes as we 867 839 * already know what we like and what we don't. */ … … 873 845 pScrn->virtualY = pScrn->currentMode->VDisplay; 874 846 847 #endif /* !VBOXVIDEO_13 */ 848 849 /* Needed before we initialise DRI. */ 875 850 pScrn->displayWidth = pScrn->virtualX; 876 851 877 852 xf86PrintModes(pScrn); 878 879 #endif /* !VBOXVIDEO_13 */880 853 881 854 /* Colour weight - we always call this, since we are always in … … 970 943 if (!miSetPixmapDepths()) 971 944 return (FALSE); 972 973 /* Needed before we initialise DRI. */974 pScrn->displayWidth = pScrn->virtualX;975 945 976 946 #ifdef VBOX_DRI … … 1017 987 1018 988 #ifdef VBOXVIDEO_13 989 /* Initialise CRTC and output configuration for use with randr1.2. */ 990 xf86CrtcConfigInit(pScrn, &VBOXCrtcConfigFuncs); 991 992 { 993 uint32_t i; 994 995 for (i = 0; i < pVBox->cScreens; ++i) 996 { 997 char szOutput[256]; 998 999 /* Setup our virtual CRTCs. */ 1000 pVBox->paCrtcs[i] = xf86CrtcCreate(pScrn, &VBOXCrtcFuncs); 1001 pVBox->paCrtcs[i]->driver_private = (void *)i; 1002 1003 /* Set up our virtual outputs. */ 1004 snprintf(szOutput, sizeof(szOutput), "VBOX%u", i); 1005 pVBox->paOutputs[i] = xf86OutputCreate(pScrn, &VBOXOutputFuncs, 1006 szOutput); 1007 1008 /* We are not interested in the monitor section in the 1009 * configuration file. */ 1010 xf86OutputUseScreenMonitor(pVBox->paOutputs[i], FALSE); 1011 pVBox->paOutputs[i]->possible_crtcs = 1 << i; 1012 pVBox->paOutputs[i]->possible_clones = 0; 1013 TRACE_LOG("Created crtc (%p) and output %s (%p)\n", 1014 (void *)pVBox->paCrtcs[i], szOutput, 1015 (void *)pVBox->paOutputs[i]); 1016 } 1017 } 1018 1019 /* Set a sane minimum and maximum mode size */ 1020 xf86CrtcSetSizeRange(pScrn, 64, 64, 32000, 32000); 1021 1022 /* Now create our initial CRTC/output configuration. */ 1023 if (!xf86InitialConfiguration(pScrn, TRUE)) { 1024 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Initial CRTC configuration failed!\n"); 1025 return (FALSE); 1026 } 1027 1019 1028 /* Initialise randr 1.2 mode-setting functions and set first mode. 1020 1029 * Note that the mode won't be usable until the server has resized the … … 1180 1189 xf86PrintModes(pScrn); 1181 1190 } 1182 #endif1183 1191 if (rc && !vboxGuestIsSeamless(pScrn)) 1184 1192 vboxSaveVideoMode(pScrn, pMode->HDisplay, pMode->VDisplay, 1185 1193 pScrn->bitsPerPixel); 1194 #endif 1186 1195 if (pVBox->accessEnabled) 1187 1196 pVBox->EnableDisableFBAccess(scrnIndex, TRUE); … … 1197 1206 unsigned cHeight, int x, int y) 1198 1207 { 1199 VBOXPtr pVBox ;1208 VBOXPtr pVBox = VBOXGetRec(pScrn); 1200 1209 Bool rc = TRUE; 1210 uint32_t xRel = cDisplay ? x - pVBox->aScreenLocation[0].x : 0; 1211 uint32_t yRel = cDisplay ? y - pVBox->aScreenLocation[0].y : 0; 1201 1212 1202 1213 int bpp = pScrn->depth == 24 ? 32 : 16; 1203 1214 TRACE_LOG("cDisplay=%u, cWidth=%u, cHeight=%u, x=%d, y=%d, displayWidth=%d\n", 1204 1215 cDisplay, cWidth, cHeight, x, y, pScrn->displayWidth); 1205 pVBox = VBOXGetRec(pScrn);1206 1216 /* Don't fiddle with the hardware if we are switched 1207 1217 * to a virtual terminal. */ … … 1218 1228 && (pVBox->fHaveHGSMI) 1219 1229 && !pVBox->vtSwitch) 1220 VBoxHGSMIProcessDisplayInfo(&pVBox->guestCtx, cDisplay, x , y,1230 VBoxHGSMIProcessDisplayInfo(&pVBox->guestCtx, cDisplay, xRel, yRel, 1221 1231 (y * pScrn->displayWidth + x) * bpp / 8, 1222 1232 pScrn->displayWidth * bpp / 8, 1223 1233 cWidth, cHeight, bpp); 1224 pVBox->aScreenLocation[ 0].cx = cWidth;1225 pVBox->aScreenLocation[ 0].cy = cHeight;1226 pVBox->aScreenLocation[ 0].x = x;1227 pVBox->aScreenLocation[ 0].y = y;1234 pVBox->aScreenLocation[cDisplay].cx = cWidth; 1235 pVBox->aScreenLocation[cDisplay].cy = cHeight; 1236 pVBox->aScreenLocation[cDisplay].x = x; 1237 pVBox->aScreenLocation[cDisplay].y = y; 1228 1238 TRACE_LOG("returning %s\n", rc ? "TRUE" : "FALSE"); 1229 1239 return rc; -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
r34715 r34747 212 212 * sending dirty rectangle information to the right one. */ 213 213 RTRECT2 aScreenLocation[VBOX_VIDEO_MAX_SCREENS]; 214 #ifdef VBOXVIDEO_13 215 /** The virtual crtcs */ 216 struct _xf86Crtc *paCrtcs[VBOX_VIDEO_MAX_SCREENS]; 217 struct _xf86Output *paOutputs[VBOX_VIDEO_MAX_SCREENS]; 218 #endif 214 219 /** Offsets of VBVA buffers in video RAM */ 215 220 uint32_t aoffVBVABuffer[VBOX_VIDEO_MAX_SCREENS];
Note:
See TracChangeset
for help on using the changeset viewer.