VirtualBox

Ignore:
Timestamp:
Mar 9, 2010 10:16:07 AM (15 years ago)
Author:
vboxsync
Message:

wddm: bugfix

File:
1 edited

Legend:

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

    r27055 r27201  
    141141        pView->u32ViewIndex     = pPrimaryInfo->VidPnSourceId;
    142142        pView->u32ViewOffset    = offVram;
    143         pView->u32ViewSize      = vboxWddmVramReportedSize(pDevExt)/pDevExt->cSources;
     143        pView->u32ViewSize      = vboxWddmVramReportedSegmentSize(pDevExt)/pDevExt->cSources;
    144144
    145145        pView->u32MaxScreenSize = pView->u32ViewSize;
     
    917917    PAGED_CODE();
    918918
     919    vboxVDbgBreakFv();
     920
    919921    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)MiniportDeviceContext;
    920922
     
    943945    /* The DxgkDdiQueryChildStatus should be made pageable. */
    944946    PAGED_CODE();
     947
     948    vboxVDbgBreakFv();
    945949
    946950    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
     
    959963        default:
    960964            drprintf(("VBoxVideoWddm: ERROR: status type: %d\n", ChildStatus->Type));
     965            AssertBreakpoint();
    961966            Status = STATUS_INVALID_PARAMETER;
    962967            break;
     
    976981    /* The DxgkDdiQueryDeviceDescriptor should be made pageable. */
    977982    PAGED_CODE();
     983
     984    vboxVDbgBreakFv();
    978985
    979986    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
     
    9981005
    9991006    /* @todo: */
     1007    vboxVDbgBreakF();
    10001008
    10011009    dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
     
    10141022    dfprintf(("==> "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext));
    10151023
    1016     AssertBreakpoint();
     1024    vboxVDbgBreakF();
    10171025
    10181026    dfprintf(("<== "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext));
     
    10261034{
    10271035    /* DxgkDdiResetDevice can be called at any IRQL, so it must be in nonpageable memory.  */
     1036    vboxVDbgBreakF();
     1037
    10281038    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
    10291039    dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
     
    10501060    dfprintf(("==> "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext));
    10511061
    1052     AssertBreakpoint();
     1062    vboxVDbgBreakF();
    10531063
    10541064    dfprintf(("<== "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext));
     
    10651075    dfprintf(("==> "__FUNCTION__ "\n"));
    10661076
    1067     AssertBreakpoint();
     1077    vboxVDbgBreakF();
    10681078
    10691079    dfprintf(("<== "__FUNCTION__ "\n"));
     
    10841094    PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
    10851095
    1086     AssertBreakpoint();
     1096    vboxVDbgBreakF();
    10871097
    10881098    switch (pQueryAdapterInfo->Type)
     
    11421152            else
    11431153            {
     1154                DXGK_SEGMENTDESCRIPTOR* pDr = pQsOut->pSegmentDescriptor;
    11441155                /* we are requested to provide segment information */
    1145                 pQsOut->pSegmentDescriptor->BaseAddress.QuadPart = 0; /* VBE_DISPI_LFB_PHYSICAL_ADDRESS; */
    1146                 pQsOut->pSegmentDescriptor->CpuTranslatedAddress.QuadPart = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
     1156                pDr->BaseAddress.QuadPart = 0; /* VBE_DISPI_LFB_PHYSICAL_ADDRESS; */
     1157                pDr->CpuTranslatedAddress.QuadPart = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
    11471158                /* make sure the size is page aligned */
    11481159                /* @todo: need to setup VBVA buffers and adjust the mem size here */
    1149                 pQsOut->pSegmentDescriptor->Size = vboxWddmVramReportedSize(pContext);
    1150                 pQsOut->pSegmentDescriptor->NbOfBanks = 0;
    1151                 pQsOut->pSegmentDescriptor->pBankRangeTable = 0;
    1152                 pQsOut->pSegmentDescriptor->CommitLimit = pQsOut->pSegmentDescriptor->Size;
    1153                 pQsOut->pSegmentDescriptor->Flags.Value = 0;
    1154                 pQsOut->pSegmentDescriptor->Flags.CpuVisible = 1;
    1155             }
    1156             pQsOut->PagingBufferSegmentId = 0;
    1157             pQsOut->PagingBufferSize = 1024;
    1158             pQsOut->PagingBufferPrivateDataSize = 0; /* @todo: do we need a private buffer ? */
     1160                pDr->Size = vboxWddmVramReportedSegmentSize(pContext);
     1161                pDr->NbOfBanks = 0;
     1162                pDr->pBankRangeTable = 0;
     1163                pDr->CommitLimit = pDr->Size;
     1164                pDr->Flags.Value = 0;
     1165                pDr->Flags.CpuVisible = 1;
     1166
     1167                ++pDr;
     1168                /* create cpu-invisible segment of the same size */
     1169                pDr->BaseAddress.QuadPart = 0;
     1170                pDr->CpuTranslatedAddress.QuadPart = 0;
     1171                /* make sure the size is page aligned */
     1172                /* @todo: need to setup VBVA buffers and adjust the mem size here */
     1173                pDr->Size = vboxWddmVramReportedSegmentSize(pContext);
     1174                pDr->NbOfBanks = 0;
     1175                pDr->pBankRangeTable = 0;
     1176                pDr->CommitLimit = pDr->Size;
     1177                pDr->Flags.Value = 0;
     1178
     1179                pQsOut->PagingBufferSegmentId = 0;
     1180                pQsOut->PagingBufferSize = 1024;
     1181                pQsOut->PagingBufferPrivateDataSize = 0; /* @todo: do we need a private buffer ? */
     1182            }
    11591183            break;
    11601184        }
     
    11881212    PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
    11891213
    1190     AssertBreakpoint();
     1214    vboxVDbgBreakFv();
    11911215
    11921216    PVBOXWDDM_DEVICE pDevice = (PVBOXWDDM_DEVICE)vboxWddmMemAllocZero(sizeof (VBOXWDDM_DEVICE));
     
    23832407    dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));
    23842408
    2385     AssertBreakpoint();
     2409    vboxVDbgBreakF();
     2410
     2411    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
     2412    NTSTATUS Status;
     2413    uint32_t cModes;
     2414    uint32_t iPreferredMode;
     2415    VIDEO_MODE_INFORMATION *pModes;
     2416    uint32_t cResolutions;
     2417    D3DKMDT_2DREGION *pResolutions;
     2418    VBoxWddmGetModesTable(pDevExt, /* PDEVICE_EXTENSION DeviceExtension */
     2419            true, /* bool bRebuildTable*/
     2420            &pModes, /* VIDEO_MODE_INFORMATION ** ppModes*/
     2421            &cModes, /* uint32_t * pcModes */
     2422            &iPreferredMode, /* uint32_t * pPreferrableMode*/
     2423            &pResolutions, /* D3DKMDT_2DREGION **ppResolutions */
     2424            &cResolutions /* uint32_t * pcResolutions */);
     2425
     2426    for (uint32_t i = 0; i < cResolutions; i++)
     2427    {
     2428        D3DKMDT_MONITOR_SOURCE_MODE * pNewMonitorSourceModeInfo;
     2429        Status = pRecommendMonitorModesArg->pMonitorSourceModeSetInterface->pfnCreateNewModeInfo(
     2430                    pRecommendMonitorModesArg->hMonitorSourceModeSet, &pNewMonitorSourceModeInfo);
     2431        Assert(Status == STATUS_SUCCESS);
     2432        if (Status == STATUS_SUCCESS)
     2433        {
     2434            Status = vboxVidPnPopulateMonitorSourceModeInfoFromLegacy(pDevExt,
     2435                    pNewMonitorSourceModeInfo,
     2436                    &pResolutions[i],
     2437                    D3DKMDT_MCO_DRIVER,
     2438                    true);
     2439            Assert(Status == STATUS_SUCCESS);
     2440            if (Status == STATUS_SUCCESS)
     2441            {
     2442                Status = pRecommendMonitorModesArg->pMonitorSourceModeSetInterface->pfnAddMode(
     2443                        pRecommendMonitorModesArg->hMonitorSourceModeSet, pNewMonitorSourceModeInfo);
     2444                Assert(Status == STATUS_SUCCESS);
     2445                if (Status == STATUS_SUCCESS)
     2446                    continue;
     2447            }
     2448
     2449            /* error has occured, release & break */
     2450            pRecommendMonitorModesArg->pMonitorSourceModeSetInterface->pfnReleaseModeInfo(
     2451                    pRecommendMonitorModesArg->hMonitorSourceModeSet, pNewMonitorSourceModeInfo);
     2452            break;
     2453        }
     2454    }
    23862455
    23872456    dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));
    23882457
    2389     return STATUS_SUCCESS;
     2458    return Status;
    23902459}
    23912460
     
    23992468    dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));
    24002469
    2401     AssertBreakpoint();
     2470    vboxVDbgBreakF();
    24022471
    24032472    dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));
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