VirtualBox

Ignore:
Timestamp:
Jul 15, 2009 8:06:37 AM (15 years ago)
Author:
vboxsync
Message:

video hw accel: interrupt support in guest video adapter & driver, NetFlt/Adp/win: get rid of alloca

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Makefile.kmk

    r19464 r21596  
    6262endif
    6363
     64ifdef VBOX_WITH_VIDEOHWACCEL
     65VBoxVideo_DEFS += VBOX_WITH_VIDEOHWACCEL
     66endif
     67
    6468include $(KBUILD_PATH)/subfooter.kmk
    6569
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r21219 r21596  
    7474    InitData.HwFindAdapter = VBoxVideoFindAdapter;
    7575    InitData.HwInitialize = VBoxVideoInitialize;
     76#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     77    InitData.HwInterrupt = VBoxVideoInterrupt;
     78#else
    7679    InitData.HwInterrupt = NULL;
     80#endif
    7781    InitData.HwStartIO = VBoxVideoStartIO;
    7882    InitData.HwResetHw = VBoxVideoResetHW;
     
    11981202         VBoxBiosString,
    11991203         sizeof(VBoxBiosString));
    1200 
     1204#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     1205      VIDEO_ACCESS_RANGE tmpRanges[1];
     1206      ULONG slot;
     1207
     1208      /* need to call VideoPortGetAccessRanges to ensure interrupt info in ConfigInfo gets set up */
     1209      VP_STATUS status = VideoPortGetAccessRanges(HwDeviceExtension,
     1210                                        0,
     1211                                        NULL,
     1212                                        1,
     1213                                        tmpRanges,
     1214                                        NULL,
     1215                                        NULL,
     1216                                        (PULONG) &slot);
     1217      Assert(status == NO_ERROR );
     1218//      Assert(AccessRanges[0].RangeStart.QuadPart == tmpRanges[0].RangeStart.QuadPart);
     1219//      Assert(AccessRanges[0].RangeLength == tmpRanges[0].RangeLength);
     1220//      Assert(AccessRanges[0].RangeInIoSpace == tmpRanges[0].RangeInIoSpace);
     1221//      Assert(AccessRanges[0].RangeVisible == tmpRanges[0].RangeVisible);
     1222//      Assert(AccessRanges[0].RangeShareable == tmpRanges[0].RangeShareable);
     1223//      Assert(AccessRanges[0].RangePassive == tmpRanges[0].RangePassive);
     1224
     1225      /* no matter what we get with VideoPortGetAccessRanges, we assert the default ranges */
     1226#endif
    12011227      rc = VideoPortVerifyAccessRanges(HwDeviceExtension, 1, AccessRanges);
    12021228      dprintf(("VBoxVideo::VBoxVideoFindAdapter: VideoPortVerifyAccessRanges returned 0x%x\n", rc));
     
    12891315}
    12901316
     1317#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     1318
     1319BOOLEAN VBoxVideoInterrupt(PVOID  HwDeviceExtension)
     1320{
     1321    PDEVICE_EXTENSION devExt = (PDEVICE_EXTENSION)HwDeviceExtension;
     1322    PDEVICE_EXTENSION PrimaryExtension = devExt->pPrimary;
     1323    uint32_t flags = PrimaryExtension->u.primary.pHostFlags->u32HostFlags;
     1324    if((flags & HGSMIHOSTFLAGS_IRQ) != 0)
     1325    {
     1326        if((flags & HGSMIHOSTFLAGS_COMMANDS_PENDING) != 0)
     1327        {
     1328            /* schedule a DPC*/
     1329            BOOLEAN bResult = VideoPortQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, NULL);
     1330            Assert(bResult);
     1331        }
     1332        /* clear the IRQ */
     1333        HGSMIClearIrq (PrimaryExtension);
     1334        return TRUE;
     1335    }
     1336    return FALSE;
     1337}
     1338#endif
     1339
    12911340/**
    12921341 * VBoxVideoStartIO
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r20478 r21596  
    175175   PVIDEO_REQUEST_PACKET RequestPacket);
    176176
     177#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     178BOOLEAN VBoxVideoInterrupt(PVOID  HwDeviceExtension);
     179#endif
     180
     181
    177182BOOLEAN VBoxVideoResetHW(
    178183   PVOID HwDeviceExtension,
     
    265270        int iDisplay, /* negative would mean this is a miniport handler */
    266271        uint8_t u8Channel);
     272
     273VOID VBoxVideoHGSMIDpc(
     274    IN PVOID  HwDeviceExtension,
     275    IN PVOID  Context
     276    );
     277
     278void HGSMIClearIrq (PDEVICE_EXTENSION PrimaryExtension);
     279
    267280#endif /* VBOX_WITH_HGSMI */
    268281} /* extern "C" */
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