Changeset 43081 in vbox for trunk/src/VBox/Additions/x11/vboxvideo
- Timestamp:
- Aug 29, 2012 3:16:49 PM (12 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/pointer.c
r38648 r43081 28 28 #include "compiler.h" 29 29 #include "cursorstr.h" 30 #include "servermd.h" 30 31 31 32 #include "vboxvideo.h" -
trunk/src/VBox/Additions/x11/vboxvideo/setmode.c
r36020 r43081 54 54 #endif 55 55 #include "vboxvideo.h" 56 #include <iprt/asm-math.h>57 56 #include "version-generated.h" 58 57 #include "product-generated.h" 59 #include <xf86.h> 60 #include <misc.h> 61 62 /* All drivers initialising the SW cursor need this */ 63 #include "mipointer.h" 64 65 /* Colormap handling */ 66 #include "micmap.h" 67 #include "xf86cmap.h" 68 69 /* DPMS */ 70 /* #define DPMS_SERVER 71 #include "extensions/dpms.h" */ 58 #include "xf86.h" 72 59 73 60 /* VGA hardware functions for setting and restoring text mode */ -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r39695 r43081 53 53 # include <string.h> 54 54 #endif 55 56 #include "xf86.h" 57 #include "xf86_OSproc.h" 58 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 59 # include "xf86Resources.h" 60 #endif 61 62 #ifndef PCIACCESS 63 /* Drivers for PCI hardware need this */ 64 # include "xf86PciInfo.h" 65 /* Drivers that need to access the PCI config space directly need this */ 66 # include "xf86Pci.h" 67 #endif 68 69 #include "fb.h" 70 55 71 #include "vboxvideo.h" 56 72 #include <iprt/asm-math.h> … … 110 126 static void VBOXSaveMode(ScrnInfoPtr pScrn); 111 127 static void VBOXRestoreMode(ScrnInfoPtr pScrn); 128 129 static inline void VBOXSetRec(ScrnInfoPtr pScrn) 130 { 131 if (!pScrn->driverPrivate) 132 pScrn->driverPrivate = calloc(sizeof(VBOXRec), 1); 133 } 112 134 113 135 enum GenericTypes … … 583 605 NULL, NULL, NULL, NULL, NULL); 584 606 if (pScrn != NULL) { 585 VBOXPtr pVBox = VBOXGetRec(pScrn); 586 607 VBOXPtr pVBox; 608 609 VBOXSetRec(pScrn); 610 pVBox = VBOXGetRec(pScrn); 611 if (!pVBox) 612 return FALSE; 587 613 pScrn->driverVersion = VBOX_VERSION; 588 614 pScrn->driverName = VBOX_DRIVER_NAME; … … 678 704 { 679 705 ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; 706 680 707 VBOXPtr pVBox = VBOXGetRec(pScrn); 681 708 682 709 TRACE_LOG("enable=%s\n", enable ? "TRUE" : "FALSE"); 710 VBOXSetRec(pScrn); 683 711 pVBox->accessEnabled = enable; 684 712 pVBox->EnableDisableFBAccess(scrnIndex, enable); … … 728 756 729 757 /* Get our private data from the ScrnInfoRec structure. */ 758 VBOXSetRec(pScrn); 730 759 pVBox = VBOXGetRec(pScrn); 731 760 if (!pVBox) -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
r36020 r43081 55 55 #include <VBox/VBoxVideoGuest.h> 56 56 #include <VBox/VBoxVideo.h> 57 58 #include <iprt/asm-math.h>59 57 60 58 #ifdef DEBUG … … 102 100 #include <VBox/VMMDev.h> 103 101 104 /* All drivers should typically include these */ 105 #include "xf86.h" 106 #include "xf86_OSproc.h" 107 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 108 # include "xf86Resources.h" 109 #endif 110 111 #include <iprt/string.h> 112 #include "compiler.h" 113 114 #ifndef PCIACCESS 115 /* Drivers for PCI hardware need this */ 116 # include "xf86PciInfo.h" 117 /* Drivers that need to access the PCI config space directly need this */ 118 # include "xf86Pci.h" 119 #endif 120 121 /* ShadowFB support */ 122 #include "shadowfb.h" 123 124 /* Dga definitions */ 125 #include "dgaproc.h" 126 127 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 128 # include "xf86RAC.h" 129 #endif 130 131 #include "fb.h" 102 #include "xf86str.h" 103 #include "xf86Cursor.h" 132 104 133 105 #define VBOX_VERSION 4000 /* Why? */ 134 #include "xf86Cursor.h"135 106 #define VBOX_NAME "VBoxVideo" 136 107 #define VBOX_DRIVER_NAME "vboxvideo" … … 278 249 static inline VBOXPtr VBOXGetRec(ScrnInfoPtr pScrn) 279 250 { 280 if (!pScrn->driverPrivate)281 {282 pScrn->driverPrivate = calloc(sizeof(VBOXRec), 1);283 }284 285 251 return ((VBOXPtr)pScrn->driverPrivate); 286 252 } … … 302 268 static inline int32_t vboxDisplayPitch(ScrnInfoPtr pScrn, int32_t cbLine) 303 269 { 304 return ASMDivU64ByU32RetU32((uint64_t)cbLine * 8,vboxBPP(pScrn));270 return (int32_t)((uint64_t)cbLine * 8 / vboxBPP(pScrn)); 305 271 } 306 272 -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_dri.c
r35268 r43081 47 47 */ 48 48 49 #include "xf86.h" 49 50 #include "vboxvideo.h" 50 51 #ifndef PCIACCESS -
trunk/src/VBox/Additions/x11/vboxvideo/vbva.c
r35932 r43081 27 27 #include <iprt/string.h> 28 28 #include "compiler.h" 29 30 /* ShadowFB support */ 31 #include "shadowfb.h" 29 32 30 33 #include "vboxvideo.h"
Note:
See TracChangeset
for help on using the changeset viewer.