VirtualBox

Ignore:
Timestamp:
Aug 28, 2009 11:24:07 AM (15 years ago)
Author:
vboxsync
Message:

HGSMI/VBVA removed obsolete VBE port IO code (spinlock).

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r22548 r22549  
    11511151#ifdef VBOX_WITH_HGSMI
    11521152   VBoxSetupVideoPortFunctions((PDEVICE_EXTENSION)HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.VideoPortProcs, ConfigInfo);
    1153    ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.VideoPortProcs.pfnCreateSpinLock(HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.pGHRWLock);
    11541153#endif
    11551154
     
    18101809            {
    18111810                /* The display driver must have prepared the monitor information. */
    1812 #ifndef VBOX_WITH_HGSMI
    18131811                VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VBOX_VIDEO);
    18141812                VideoPortWritePortUlong((PULONG)VBE_DISPI_IOPORT_DATA, VBOX_VIDEO_INTERPRET_DISPLAY_MEMORY_BASE + pDevExt->iDevice);
    1815 #else
    1816                 VBoxVideoVBEWriteUlong(((PDEVICE_EXTENSION)HwDeviceExtension)->pPrimary, VBE_DISPI_INDEX_VBOX_VIDEO, VBOX_VIDEO_INTERPRET_DISPLAY_MEMORY_BASE + pDevExt->iDevice);
    1817 #endif
    18181813            }
    18191814            else
     
    21042099    }
    21052100
    2106 #ifndef VBOX_WITH_HGSMI
    21072101    VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ENABLE);
    21082102    VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_DISABLED);
    2109 #else
    2110     VBoxVideoVBEWriteUshort(((PDEVICE_EXTENSION)HwDeviceExtension)->pPrimary, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_DISABLED);
    2111 #endif
    21122103
    21132104    if (pDevExt->u.primary.pvReqFlush != NULL)
     
    22112202
    22122203    /* set the mode characteristics */
    2213 #ifndef VBOX_WITH_HGSMI
    22142204    VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);
    22152205    VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)ModeInfo->VisScreenWidth);
     
    22222212    VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED);
    22232213    /** @todo read from the port to see if the mode switch was successful */
    2224 #else
    2225     VBoxVideoVBEWriteUshort(DeviceExtension->pPrimary, VBE_DISPI_INDEX_XRES, (USHORT)ModeInfo->VisScreenWidth);
    2226     VBoxVideoVBEWriteUshort(DeviceExtension->pPrimary, VBE_DISPI_INDEX_YRES, (USHORT)ModeInfo->VisScreenHeight);
    2227     VBoxVideoVBEWriteUshort(DeviceExtension->pPrimary, VBE_DISPI_INDEX_BPP, (USHORT)ModeInfo->BitsPerPlane);
    2228     VBoxVideoVBEWriteUshort(DeviceExtension->pPrimary, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED);
    2229 #endif
    22302214
    22312215    /* Tell the host that we now support graphics in the additions.
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r22548 r22549  
    143143           HGSMIHEAP hgsmiAdapterHeap;
    144144
    145            PSPIN_LOCK pGHRWLock; /* lock for making guest->host read/writes atomic */
    146 
    147145           /* The IO Port Number for host commands. */
    148146           RTIOPORT IOPortHost;
     
    277275#ifdef VBOX_WITH_HGSMI
    278276
    279 DECLINLINE(void) VBoxVideoVBEWriteUlongLocked(USHORT dataType, ULONG data)
    280 {
    281     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, dataType);
    282     VideoPortWritePortUlong((PULONG)VBE_DISPI_IOPORT_DATA, data);
    283 }
    284 
    285 DECLINLINE(void) VBoxVideoVBEWriteUshortLocked(USHORT dataType, USHORT data)
    286 {
    287     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, dataType);
    288     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, data);
    289 }
    290 
    291 DECLINLINE(ULONG) VBoxVideoVBEReadUlongLocked (USHORT dataType)
    292 {
    293     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, dataType);
    294     return VideoPortReadPortUlong((PULONG)VBE_DISPI_IOPORT_DATA);
    295 }
    296 
    297 DECLINLINE(void) VBoxVideoVBEWriteUlong(PDEVICE_EXTENSION PrimaryExtension, USHORT dataType, ULONG data)
    298 {
    299     UCHAR oldIrql;
    300     PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension,
    301                 PrimaryExtension->u.primary.pGHRWLock,
    302             &oldIrql);
    303     VBoxVideoVBEWriteUlongLocked(dataType, data);
    304     PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension,
    305                 PrimaryExtension->u.primary.pGHRWLock,
    306             oldIrql);
    307 }
    308 
    309 DECLINLINE(void) VBoxVideoVBEWriteUshort(PDEVICE_EXTENSION PrimaryExtension, USHORT dataType, USHORT data)
    310 {
    311     UCHAR oldIrql;
    312     PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension,
    313                 PrimaryExtension->u.primary.pGHRWLock,
    314             &oldIrql);
    315     VBoxVideoVBEWriteUshortLocked(dataType, data);
    316     PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension,
    317                 PrimaryExtension->u.primary.pGHRWLock,
    318             oldIrql);
    319 }
    320 
    321 DECLINLINE(ULONG) VBoxVideoVBEReadUlong(PDEVICE_EXTENSION PrimaryExtension, USHORT dataType)
    322 {
    323     ULONG data;
    324     UCHAR oldIrql;
    325     PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension,
    326                 PrimaryExtension->u.primary.pGHRWLock,
    327             &oldIrql);
    328     data = VBoxVideoVBEReadUlongLocked(dataType);
    329     PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension,
    330                 PrimaryExtension->u.primary.pGHRWLock,
    331             oldIrql);
    332     return data;
    333 }
    334 
    335277/*
    336278 * Host and Guest port IO helpers.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette