Changeset 27201 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
- Timestamp:
- Mar 9, 2010 10:16:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r27055 r27201 141 141 pView->u32ViewIndex = pPrimaryInfo->VidPnSourceId; 142 142 pView->u32ViewOffset = offVram; 143 pView->u32ViewSize = vboxWddmVramReportedS ize(pDevExt)/pDevExt->cSources;143 pView->u32ViewSize = vboxWddmVramReportedSegmentSize(pDevExt)/pDevExt->cSources; 144 144 145 145 pView->u32MaxScreenSize = pView->u32ViewSize; … … 917 917 PAGED_CODE(); 918 918 919 vboxVDbgBreakFv(); 920 919 921 PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)MiniportDeviceContext; 920 922 … … 943 945 /* The DxgkDdiQueryChildStatus should be made pageable. */ 944 946 PAGED_CODE(); 947 948 vboxVDbgBreakFv(); 945 949 946 950 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext)); … … 959 963 default: 960 964 drprintf(("VBoxVideoWddm: ERROR: status type: %d\n", ChildStatus->Type)); 965 AssertBreakpoint(); 961 966 Status = STATUS_INVALID_PARAMETER; 962 967 break; … … 976 981 /* The DxgkDdiQueryDeviceDescriptor should be made pageable. */ 977 982 PAGED_CODE(); 983 984 vboxVDbgBreakFv(); 978 985 979 986 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext)); … … 998 1005 999 1006 /* @todo: */ 1007 vboxVDbgBreakF(); 1000 1008 1001 1009 dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext)); … … 1014 1022 dfprintf(("==> "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext)); 1015 1023 1016 AssertBreakpoint();1024 vboxVDbgBreakF(); 1017 1025 1018 1026 dfprintf(("<== "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext)); … … 1026 1034 { 1027 1035 /* DxgkDdiResetDevice can be called at any IRQL, so it must be in nonpageable memory. */ 1036 vboxVDbgBreakF(); 1037 1028 1038 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext)); 1029 1039 dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext)); … … 1050 1060 dfprintf(("==> "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext)); 1051 1061 1052 AssertBreakpoint();1062 vboxVDbgBreakF(); 1053 1063 1054 1064 dfprintf(("<== "__FUNCTION__ ", MiniportDeviceContext(0x%x)\n", MiniportDeviceContext)); … … 1065 1075 dfprintf(("==> "__FUNCTION__ "\n")); 1066 1076 1067 AssertBreakpoint();1077 vboxVDbgBreakF(); 1068 1078 1069 1079 dfprintf(("<== "__FUNCTION__ "\n")); … … 1084 1094 PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter; 1085 1095 1086 AssertBreakpoint();1096 vboxVDbgBreakF(); 1087 1097 1088 1098 switch (pQueryAdapterInfo->Type) … … 1142 1152 else 1143 1153 { 1154 DXGK_SEGMENTDESCRIPTOR* pDr = pQsOut->pSegmentDescriptor; 1144 1155 /* we are requested to provide segment information */ 1145 p QsOut->pSegmentDescriptor->BaseAddress.QuadPart = 0; /* VBE_DISPI_LFB_PHYSICAL_ADDRESS; */1146 p QsOut->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; 1147 1158 /* make sure the size is page aligned */ 1148 1159 /* @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 } 1159 1183 break; 1160 1184 } … … 1188 1212 PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter; 1189 1213 1190 AssertBreakpoint();1214 vboxVDbgBreakFv(); 1191 1215 1192 1216 PVBOXWDDM_DEVICE pDevice = (PVBOXWDDM_DEVICE)vboxWddmMemAllocZero(sizeof (VBOXWDDM_DEVICE)); … … 2383 2407 dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 2384 2408 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 } 2386 2455 2387 2456 dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 2388 2457 2389 return S TATUS_SUCCESS;2458 return Status; 2390 2459 } 2391 2460 … … 2399 2468 dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 2400 2469 2401 AssertBreakpoint();2470 vboxVDbgBreakF(); 2402 2471 2403 2472 dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));
Note:
See TracChangeset
for help on using the changeset viewer.