VirtualBox

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


Ignore:
Timestamp:
Dec 5, 2012 1:56:15 PM (12 years ago)
Author:
vboxsync
Message:

wddm & vboxtray: better logging for autoresize

Location:
trunk/src/VBox/Additions/WINNT
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPVidModes.cpp

    r44038 r44040  
    545545
    546546    if (!VBoxMPValidateVideoModeParamsGuest(pExt, iDisplay, xres, yres, bpp))
     547    {
     548        WARN_NOBP(("GUEST does not like special mode %dx%d:%d for display %d", xres, yres, bpp, iDisplay));
    547549        return FALSE;
     550    }
    548551
    549552    /* Check if host likes this mode */
    550553    if (!VBoxLikesVideoMode(iDisplay, xres, yres, bpp))
    551554    {
    552         WARN_NOBP(("host does not like special mode %dx%d:%d for display %d", xres, yres, bpp, iDisplay));
     555        WARN_NOBP(("HOST does not like special mode %dx%d:%d for display %d", xres, yres, bpp, iDisplay));
    553556        return FALSE;
    554557    }
     
    616619        {
    617620            /*display = RT_ELEMENTS(g_CustomVideoModes) - 1;*/
     621            WARN(("VBoxQueryDisplayRequest returned invalid display number %d", display));
    618622            return FALSE;
    619623        }
     
    621625    else
    622626    {
     627        LOG(("no pending request"));
    623628        return FALSE;
    624629    }
     
    11051110            return;
    11061111        }
     1112        LOG(("invalidating videomede info for screen %d", VidPnTargetId));
    11071113        g_aVBoxVideoModeInfos[VidPnTargetId].cModes = 0;
    11081114        return;
    11091115    }
     1116
     1117    LOG(("invalidating ALL videomede infos"));
    11101118
    11111119    for (UINT i = 0; i < RT_ELEMENTS(g_aVBoxVideoModeInfos); ++i)
     
    12461254    if (VidPnTargetId >= (D3DDDI_VIDEO_PRESENT_TARGET_ID)VBoxCommonFromDeviceExt(pExt)->cDisplays)
    12471255    {
     1256        WARN(("video mode info for invalid screen (%d) requested", VidPnTargetId));
    12481257        return NULL;
    12491258    }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp

    r42228 r44040  
    553553        pInfo->fMatched = FALSE;
    554554
     555    if (!pInfo->fMatched)
     556        LOG(("Found non-matching mode (%d X %d)",
     557                pMonitorSMI->VideoSignalInfo.ActiveSize.cx, pMonitorSMI->VideoSignalInfo.ActiveSize.cy));
     558
    555559    pMonitorSMSIf->pfnReleaseModeInfo(hMonitorSMS, pMonitorSMI);
    556560
     
    597601    {
    598602        if (cModes < cResolutions)
     603        {
    599604            *pfMatch = FALSE;
     605            LOG(("num modes(%d) and resolutions(%d) do not match, treat as not matched..", cModes, cResolutions));
     606        }
    600607        else
    601608        {
     
    607614            Status = vboxVidPnEnumMonitorSourceModes(hMonitorSMS, pMonitorSMSIf, vboxFidPnMatchMonitorModesEnum, &Info);
    608615            if (NT_SUCCESS(Status))
     616            {
    609617                *pfMatch = Info.fMatched;
     618                LOG(("modes %smatched", Info.fMatched ? "" : "NOT "));
     619            }
     620            else
     621                WARN(("vboxVidPnEnumMonitorSourceModes failed, Status 0x%x", Status));
    610622        }
    611623    }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r43972 r44040  
    462462            DdiChildStatus.ChildUid = pChildStatus->iChild;
    463463        }
     464        LOG(("Reporting DISCONNECT to child %d", DdiChildStatus.ChildUid));
    464465        DdiChildStatus.HotPlug.Connected = FALSE;
    465466        NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbIndicateChildStatus(pDevExt->u.primary.DxgkInterface.DeviceHandle, &DdiChildStatus);
     
    488489            DdiChildStatus.ChildUid = pChildStatus->iChild;
    489490        }
     491        LOG(("Reporting CONNECT to child %d", DdiChildStatus.ChildUid));
    490492        DdiChildStatus.HotPlug.Connected = TRUE;
    491493        NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbIndicateChildStatus(pDevExt->u.primary.DxgkInterface.DeviceHandle, &DdiChildStatus);
     
    514516            DdiChildStatus.ChildUid = pChildStatus->iChild;
    515517        }
     518        LOG(("Reporting ROTATED to child %d", DdiChildStatus.ChildUid));
    516519        DdiChildStatus.Rotation.Angle = pChildStatus->u8RotationAngle;
    517520        NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbIndicateChildStatus(pDevExt->u.primary.DxgkInterface.DeviceHandle, &DdiChildStatus);
     
    665668    int i;
    666669
     670    LOG(("checking child status.."));
     671
    667672    for (i = 0; i < VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i)
    668673    {
    669674        if (pMask && !ASMBitTest(pMask, i))
    670675            continue;
     676
     677        LOG(("requested to change child status for display %d", i));
    671678
    672679        /* @todo: check that we actually need the current source->target */
     
    695702        if (bChanged[i])
    696703        {
     704            LOG(("modes changed for display %d", i));
     705
    697706            NTSTATUS tmpStatus = vboxWddmChildStatusReportReconnected(pDevExt, i);
    698707            if (!NT_SUCCESS(tmpStatus))
     
    41864195                    break;
    41874196                }
     4197                LOG(("=> VBOXESC_REINITVIDEOMODESBYMASK"));
    41884198                PVBOXDISPIFESCAPE_REINITVIDEOMODESBYMASK pData = (PVBOXDISPIFESCAPE_REINITVIDEOMODESBYMASK)pEscapeHdr;
    41894199                PVBOXWDDM_VIDEOMODES_INFO pInfos = VBoxWddmUpdateVideoModesInfoByMask(pDevExt, pData->ScreenMask);
     
    41964206                    }
    41974207                }
     4208                LOG(("<= VBOXESC_REINITVIDEOMODESBYMASK"));
    41984209                break;
    41994210            }
     
    66926703    vboxVDbgBreakFv();
    66936704
    6694 #ifdef DEBUG_misha
     6705#if 0//def DEBUG_misha
    66956706    RTLogGroupSettings(0, "+default.e.l.f.l2.l3");
    66966707#endif
    66976708
    66986709#ifdef VBOX_WDDM_WIN8
    6699     LOGREL(("VBox WDDM Driver for Windows 8; Built %s %s", __DATE__, __TIME__));
     6710    LOGREL(("VBox WDDM Driver for Windows 8, %d bit; Built %s %s", (sizeof (void*) << 3), __DATE__, __TIME__));
    67006711#else
    6701     LOGREL(("VBox WDDM Driver for Windows Vista and 7; Built %s %s", __DATE__, __TIME__));
     6712    LOGREL(("VBox WDDM Driver for Windows Vista and 7, %d bit; Built %s %s", (sizeof (void*) << 3), __DATE__, __TIME__));
    67026713#endif
    67036714
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp

    r42232 r44040  
    175175                {
    176176                    winEr = GetLastError();
    177                     Assert(0);
     177                    Log(("CreateDC failed %d", winEr));
    178178                    break;
    179179                }
    180180            }
     181            Log(("display data no match display(%d): i(%d), flags(%d)", iDisplay, i, pDev->StateFlags));
    181182        }
    182183        else
    183184        {
    184185            winEr = GetLastError();
    185             Assert(0);
     186            Log(("EnumDisplayDevices failed %d", winEr));
    186187            break;
    187188        }
    188189    }
    189190
     191    Log(("vboxDispIfWDDMAdpHdcCreate failure branch %d", winEr));
    190192    return winEr;
    191193}
     
    227229        DeleteDC(OpenAdapterData.hDc);
    228230    }
     231    else
     232        Log((__FUNCTION__": vboxDispIfWDDMAdpHdcCreate failed, winEr (%d)\n", err));
    229233
    230234    return err;
     
    10471051        {
    10481052            winEr = GetLastError();
    1049             Assert(0);
     1053            Log(("WARNING: Failed to get dc for display device %s, winEr %d\n", paDisplayDevices[i].DeviceName, winEr));
    10501054            break;
    10511055        }
     
    10561060        {
    10571061            winEr = ERROR_GEN_FAILURE;
    1058             Assert(0);
     1062            Log(("WARNING: Failed to open adapter from dc, Status 0x%x\n", Status));
    10591063            break;
    10601064        }
     
    10741078            ClosaAdapterData.hAdapter = OpenAdapterData.hAdapter;
    10751079            Status = pIf->modeData.wddm.pfnD3DKMTCloseAdapter(&ClosaAdapterData);
    1076             Assert(!Status);
     1080            if (Status)
     1081                Log(("WARNING: Failed to close adapter, Status 0x%x\n", Status));
    10771082        }
    10781083    }
     
    11081113        ClosaAdapterData.hAdapter = hAdapter;
    11091114        Status = pIf->modeData.wddm.pfnD3DKMTCloseAdapter(&ClosaAdapterData);
    1110         Assert(!Status);
     1115        if (Status)
     1116            Log(("WARNING: Failed to close adapter[2], Status 0x%x\n", Status));
    11111117    }
    11121118
     
    11181124    if (fAbleToInvalidateVidPn)
    11191125    {
     1126        Log(("Invalidating VidPn Worked!\n"));
    11201127        winEr = vboxDispIfWddmValidateFixResize(pIf, paDisplayDevices, paDeviceModes, cDevModes);
    11211128    }
    11221129    else
    11231130    {
     1131        Log(("Falling back to monitor mode reinit\n"));
    11241132        /* fallback impl needed for display-only driver
    11251133         * since D3DKMTInvalidateActiveVidPn is not available for WDDM > 1.0:
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