VirtualBox

Changeset 21596 in vbox for trunk/src/VBox/Additions


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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c

    r21553 r21596  
    10551055        {
    10561056            VBOXVHWACMD_SURF_LOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_LOCK);
     1057            RECT tmpRect, *pRect;
    10571058            memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_LOCK));
    10581059
     
    10751076            {
    10761077                pBody->u.in.flags |= VBOXVHWA_LOCK_DISCARDCONTENTS;
     1078//                if(lpLock->bHasRect)
     1079//                {
     1080//                    pRect = &lpLock->rArea;
     1081//                }
     1082//                else
     1083//                {
     1084//                    tmpRect.left=0;
     1085//                    tmpRect.top=0;
     1086//                    tmpRect.right=lpSurfaceGlobal->wWidth-1;
     1087//                    tmpRect.bottom=lpSurfaceGlobal->wHeight-1;
     1088//                    pRect = &tmpRect;
     1089//                }
     1090//
     1091//                if(vboxVHWARegionIncluded(&pDesc->DirtyRegion, pRect))
     1092//                {
     1093//                    vboxVHWARegionClear(&pDesc->DirtyRegion);
     1094//                }
     1095//            }
     1096//            else if(vboxVHWARegionInterse)
    10771097                /* we're not interested in completion, just send the command */
    10781098                vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r21553 r21596  
    9797typedef struct _VBOXVHWAREGION
    9898{
    99     RECT DirtyMem;
     99    RECT Rect;
    100100    bool bValid;
    101101}VBOXVHWAREGION, *PVBOXVHWAREGION;
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vbox.c

    r21553 r21596  
    943943    {
    944944        DISPDBG((0, "VBoxDISP::vboxVHWAQueryHostInfo1: vboxVHWACommandCreate failed\n"));
    945         return NULL;
     945        return rc;
    946946    }
    947947
     
    965965    {
    966966        DISPDBG((0, "VBoxDISP::vboxVHWAQueryHostInfo1: vboxVHWACommandCreate failed\n"));
    967         return NULL;
     967        return rc;
    968968    }
    969969
  • 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