VirtualBox

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


Ignore:
Timestamp:
Nov 11, 2010 12:13:36 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67642
Message:

wddm: vidpn logging + bugfixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.h

    r33048 r33980  
    4747#define OSDBGPRINT(a) DbgPrint a
    4848
    49 /* dprintf */
     49#ifdef LOG_TO_BACKDOOR
     50# include <VBox/log.h>
     51# define dDoPrintf(a) RTLogBackdoorPrintf a
     52#else
     53# define dDoPrintf(a) OSDBGPRINT(a)
     54#endif
     55
     56/* release log */
     57# define drprintf dDoPrintf
     58/* flow log */
     59# define dfprintf(a) do {} while (0)
     60/* basic debug log */
    5061#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
    51 # ifdef LOG_TO_BACKDOOR
    52 #  include <VBox/log.h>
    53 #  define dprintf(a) RTLogBackdoorPrintf a
    54 # else
    55 #  define dprintf(a) OSDBGPRINT(a)
    56 # endif
    57 /* flow log */
    58 # define dfprintf dprintf
    59 /* release log */
    60 # define drprintf dprintf
     62# define dprintf dDoPrintf
    6163#else
    6264# define dprintf(a) do {} while (0)
    63 /* flow log */
    64 # define dfprintf dprintf
    65 /* release log */
    66 # define drprintf dprintf
    6765#endif
     66
    6867
    6968/* dprintf2 - extended logging. */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp

    r33929 r33980  
    1313#include "../Helper.h"
    1414
    15 NTSTATUS vboxVidPnCheckTopology(const D3DKMDT_HVIDPN hDesiredVidPn,
     15NTSTATUS vboxVidPnCheckTopology(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn,
    1616        D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
    1717        BOOLEAN *pbSupported)
     
    2323    if (Status == STATUS_SUCCESS)
    2424    {
     25        BOOLEAN bFoundPrimary = FALSE;
     26
    2527        while (1)
    2628        {
    27             /* @todo: which paths do we support? no matter for now
    28             pNewVidPnPresentPathInfo->VidPnSourceId
    29             pNewVidPnPresentPathInfo->VidPnTargetId
    30 
     29            if (pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId)
     30            {
     31                dprintf(("unsupported source(%d)->target(%d) pare\n", pNewVidPnPresentPathInfo->VidPnSourceId, pNewVidPnPresentPathInfo->VidPnTargetId));
     32                AssertBreakpoint();
     33                bSupported = FALSE;
     34                break;
     35            }
     36
     37            if (pNewVidPnPresentPathInfo->VidPnSourceId == 0)
     38            {
     39                bFoundPrimary = TRUE;
     40            }
     41
     42            /*
    3143            ImportanceOrdinal does not matter for now
    3244            pNewVidPnPresentPathInfo->ImportanceOrdinal
     
    200212            }
    201213        }
     214
     215        bSupported &= bFoundPrimary;
    202216
    203217        if (pNewVidPnPresentPathInfo)
     
    860874{
    861875    NTSTATUS Status;
     876#if 0
    862877    D3DKMDT_2DREGION *pResolutionsCopy = (D3DKMDT_2DREGION*)vboxWddmMemAlloc(cResolutions * sizeof (D3DKMDT_2DREGION));
    863878    if (pResolutionsCopy)
    864879    {
    865880        memcpy(pResolutionsCopy, pResolutions, cResolutions * sizeof (D3DKMDT_2DREGION));
     881#endif
    866882        CONST DXGK_MONITOR_INTERFACE *pMonitorInterface;
    867883        Status = pDevExt->u.primary.DxgkInterface.DxgkCbQueryMonitorInterface(pDevExt->u.primary.DxgkInterface.DeviceHandle, DXGK_MONITOR_INTERFACE_VERSION_V1, &pMonitorInterface);
     
    878894            if (Status == STATUS_SUCCESS)
    879895            {
     896#if 0
    880897                VBOXVIDPNCHECKADDMONITORMODES EnumData = {0};
    881898                EnumData.cResolutions = cResolutions;
     
    889906                    if (EnumData.Status == STATUS_SUCCESS)
    890907                    {
     908#endif
    891909                        for (uint32_t i = 0; i < cResolutions; ++i)
    892910                        {
     911#if 0
    893912                            D3DKMDT_2DREGION *pRes = &pResolutionsCopy[i];
     913#else
     914                            D3DKMDT_2DREGION *pRes = &pResolutions[i];
     915#endif
    894916                            if (pRes->cx)
    895917                            {
     
    900922                                        enmOrigin,
    901923                                        i == (uint32_t)iPreferred);
    902                                 Assert(Status == STATUS_SUCCESS);
    903                                 if (Status != STATUS_SUCCESS)
     924                                Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET);
     925                                if (Status == STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET)
     926                                {
     927                                    Status = STATUS_SUCCESS;
     928                                }
     929                                else if (Status != STATUS_SUCCESS)
    904930                                {
    905931                                    drprintf((__FUNCTION__": vboxVidPnCreatePopulateMonitorSourceModeInfoFromLegacy failed Status(0x%x)\n", Status));
     
    908934                            }
    909935                        }
     936#if 0
    910937                    }
    911938                }
    912 
     939#endif
    913940                NTSTATUS tmpStatus = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hMonitorSMS);
    914941                Assert(tmpStatus == STATUS_SUCCESS);
     
    921948        else
    922949            drprintf((__FUNCTION__": DxgkCbQueryMonitorInterface failed Status(0x%x)\n", Status));
    923 
     950#if 0
    924951        vboxWddmMemFree(pResolutionsCopy);
    925952    }
     
    929956        Status = STATUS_NO_MEMORY;
    930957    }
     958#endif
    931959
    932960    return Status;
     
    17741802}
    17751803
    1776 const char* vboxVidPnDumpStrColorBasis(D3DKMDT_COLOR_BASIS ColorBasis)
     1804const char* vboxVidPnDumpStrColorBasis(const D3DKMDT_COLOR_BASIS ColorBasis)
    17771805{
    17781806    switch (ColorBasis)
     
    17881816}
    17891817
     1818const char* vboxVidPnDumpStrPvam(D3DKMDT_PIXEL_VALUE_ACCESS_MODE PixelValueAccessMode)
     1819{
     1820    switch (PixelValueAccessMode)
     1821    {
     1822        VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_UNINITIALIZED);
     1823        VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_DIRECT);
     1824        VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_PRESETPALETTE);
     1825        VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_SETTABLEPALETTE);
     1826        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     1827    }
     1828}
     1829
     1830
     1831
    17901832const char* vboxVidPnDumpStrContent(D3DKMDT_VIDPN_PRESENT_PATH_CONTENT Content)
    17911833{
     
    18241866}
    18251867
     1868const char* vboxVidPnDumpStrSourceModeType(D3DKMDT_VIDPN_SOURCE_MODE_TYPE Type)
     1869{
     1870    switch (Type)
     1871    {
     1872        VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_UNINITIALIZED);
     1873        VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_GRAPHICS);
     1874        VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_TEXT);
     1875        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     1876    }
     1877}
     1878
     1879const char* vboxVidPnDumpStrScanLineOrdering(D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING ScanLineOrdering)
     1880{
     1881    switch (ScanLineOrdering)
     1882    {
     1883        VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_UNINITIALIZED);
     1884        VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_PROGRESSIVE);
     1885        VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_INTERLACED_UPPERFIELDFIRST);
     1886        VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_INTERLACED_LOWERFIELDFIRST);
     1887        VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_OTHER);
     1888        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     1889    }
     1890}
     1891
     1892const char* vboxVidPnDumpStrModePreference(D3DKMDT_MODE_PREFERENCE Preference)
     1893{
     1894    switch (Preference)
     1895    {
     1896        VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_UNINITIALIZED);
     1897        VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_PREFERRED);
     1898        VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_NOTPREFERRED);
     1899        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     1900    }
     1901}
     1902
     1903const char* vboxVidPnDumpStrSignalStandard(D3DKMDT_VIDEO_SIGNAL_STANDARD VideoStandard)
     1904{
     1905    switch (VideoStandard)
     1906    {
     1907        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_UNINITIALIZED);
     1908        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_DMT);
     1909        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_GTF);
     1910        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_CVT);
     1911        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_IBM);
     1912        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_APPLE);
     1913        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_M);
     1914        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_J);
     1915        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_443);
     1916        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_B);
     1917        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_B1);
     1918        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_G);
     1919        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_H);
     1920        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_I);
     1921        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_D);
     1922        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_N);
     1923        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_NC);
     1924        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_B);
     1925        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_D);
     1926        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_G);
     1927        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_H);
     1928        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_K);
     1929        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_K1);
     1930        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_L);
     1931        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_L1);
     1932        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861);
     1933        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861A);
     1934        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861B);
     1935        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_K);
     1936        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_K1);
     1937        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_L);
     1938        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_M);
     1939        VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_OTHER);
     1940        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     1941    }
     1942}
     1943
     1944const char* vboxVidPnDumpStrPixFormat(D3DDDIFORMAT PixelFormat)
     1945{
     1946    switch (PixelFormat)
     1947    {
     1948        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_UNKNOWN);
     1949        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R8G8B8);
     1950        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8R8G8B8);
     1951        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8R8G8B8);
     1952        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R5G6B5);
     1953        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X1R5G5B5);
     1954        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A1R5G5B5);
     1955        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A4R4G4B4);
     1956        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R3G3B2);
     1957        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8);
     1958        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8R3G3B2);
     1959        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X4R4G4B4);
     1960        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2B10G10R10);
     1961        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8B8G8R8);
     1962        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8B8G8R8);
     1963        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G16R16);
     1964        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2R10G10B10);
     1965        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A16B16G16R16);
     1966        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8P8);
     1967        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R32F);
     1968        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G32R32F);
     1969        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A32B32G32R32F);
     1970        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_CxV8U8);
     1971        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A1);
     1972        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_BINARYBUFFER);
     1973        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_VERTEXDATA);
     1974        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_INDEX16);
     1975        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_INDEX32);
     1976        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_Q16W16V16U16);
     1977        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_MULTI2_ARGB8);
     1978        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R16F);
     1979        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G16R16F);
     1980        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A16B16G16R16F);
     1981        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32F_LOCKABLE);
     1982        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24FS8);
     1983        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32_LOCKABLE);
     1984        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S8_LOCKABLE);
     1985        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S1D15);
     1986        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S8D24);
     1987        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8D24);
     1988        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X4S4D24);
     1989        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L16);
     1990        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_UYVY);
     1991        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R8G8_B8G8);
     1992        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_YUY2);
     1993        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G8R8_G8B8);
     1994        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT1);
     1995        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT2);
     1996        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT3);
     1997        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT4);
     1998        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT5);
     1999        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D16_LOCKABLE);
     2000        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32);
     2001        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D15S1);
     2002        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24S8);
     2003        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24X8);
     2004        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24X4S4);
     2005        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D16);
     2006        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_P8);
     2007        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L8);
     2008        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8L8);
     2009        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A4L4);
     2010        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_V8U8);
     2011        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L6V5U5);
     2012        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8L8V8U8);
     2013        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_Q8W8V8U8);
     2014        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_V16U16);
     2015        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_W11V11U10);
     2016        VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2W10V10U10);
     2017        VBOXVIDPNDUMP_STRCASE_UNKNOWN();
     2018    }
     2019}
    18262020
    18272021void vboxVidPnDumpCopyProtectoin(const D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION *pCopyProtection)
     
    18412035void vboxVidPnDumpRegion(const char *pPrefix, const D3DKMDT_2DREGION *pRegion, const char *pSuffix)
    18422036{
    1843     drprintf(("%scx(%d), cy(%d)%s", pPrefix, pRegion->cx, pRegion->cy, pSuffix));
     2037    drprintf(("%s%dX%d%s", pPrefix, pRegion->cx, pRegion->cy, pSuffix));
     2038}
     2039
     2040void vboxVidPnDumpRational(const char *pPrefix, const D3DDDI_RATIONAL *pRational, const char *pSuffix)
     2041{
     2042    drprintf(("%s%d/%d=%d%s", pPrefix, pRational->Numerator, pRational->Denominator, pRational->Numerator/pRational->Denominator, pSuffix));
    18442043}
    18452044
     
    18562055void vboxVidPnDumpGammaRamp(const char *pPrefix, const D3DKMDT_GAMMA_RAMP *pGammaRamp, const char *pSuffix)
    18572056{
    1858     drprintf(("%Type(%s), DataSize(%d), TODO: dump the rest%s", pPrefix,
     2057    drprintf(("%sType(%s), DataSize(%d), TODO: dump the rest%s", pPrefix,
    18592058            vboxVidPnDumpStrGammaRampType(pGammaRamp->Type), pGammaRamp->DataSize,
    18602059            pSuffix));
    18612060}
    18622061
     2062void vboxVidPnDumpSourceMode(const char *pPrefix, const D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo, const char *pSuffix)
     2063{
     2064    drprintf(("%sType(%s), ", pPrefix, vboxVidPnDumpStrSourceModeType(pVidPnSourceModeInfo->Type)));
     2065    vboxVidPnDumpRegion("surf(", &pVidPnSourceModeInfo->Format.Graphics.PrimSurfSize, "), ");
     2066    vboxVidPnDumpRegion("vis(", &pVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize, "), ");
     2067    drprintf(("stride(%d), ", pVidPnSourceModeInfo->Format.Graphics.Stride));
     2068    drprintf(("format(%s), ", vboxVidPnDumpStrPixFormat(pVidPnSourceModeInfo->Format.Graphics.PixelFormat)));
     2069    drprintf(("clrBasis(%s), ", vboxVidPnDumpStrColorBasis(pVidPnSourceModeInfo->Format.Graphics.ColorBasis)));
     2070    drprintf(("pvam(%s)%s", vboxVidPnDumpStrPvam(pVidPnSourceModeInfo->Format.Graphics.PixelValueAccessMode), pSuffix));
     2071}
     2072
     2073void vboxVidPnDumpSignalInfo(const char *pPrefix, const D3DKMDT_VIDEO_SIGNAL_INFO *pVideoSignalInfo, const char *pSuffix)
     2074{
     2075    drprintf(("%sVStd(%s), ", pPrefix, vboxVidPnDumpStrSignalStandard(pVideoSignalInfo->VideoStandard)));
     2076    vboxVidPnDumpRegion("totSize(", &pVideoSignalInfo->TotalSize, "), ");
     2077    vboxVidPnDumpRegion("activeSize(", &pVideoSignalInfo->ActiveSize, "), ");
     2078    vboxVidPnDumpRational("VSynch(", &pVideoSignalInfo->VSyncFreq, "), ");
     2079    drprintf(("PixelRate(%d), ScanLineOrdering(%s)%s\n", pVideoSignalInfo->PixelRate, vboxVidPnDumpStrScanLineOrdering(pVideoSignalInfo->ScanLineOrdering), pSuffix));
     2080}
     2081
     2082void vboxVidPnDumpTargetMode(const char *pPrefix, const D3DKMDT_VIDPN_TARGET_MODE* CONST  pVidPnTargetModeInfo, const char *pSuffix)
     2083{
     2084    drprintf(("%s", pPrefix));
     2085    vboxVidPnDumpSignalInfo("VSI: ", &pVidPnTargetModeInfo->VideoSignalInfo, ", ");
     2086    drprintf(("Preference(%s)%s", vboxVidPnDumpStrModePreference(pVidPnTargetModeInfo->Preference), pPrefix));
     2087}
     2088
     2089void vboxVidPnDumpPinnedSourceMode(const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
     2090{
     2091    D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet;
     2092    const DXGK_VIDPNSOURCEMODESET_INTERFACE *pCurVidPnSourceModeSetInterface;
     2093
     2094    NTSTATUS Status = pVidPnInterface->pfnAcquireSourceModeSet(hVidPn,
     2095                        VidPnSourceId,
     2096                        &hCurVidPnSourceModeSet,
     2097                        &pCurVidPnSourceModeSetInterface);
     2098    Assert(Status == STATUS_SUCCESS);
     2099    if (Status == STATUS_SUCCESS)
     2100    {
     2101        CONST D3DKMDT_VIDPN_SOURCE_MODE* pPinnedVidPnSourceModeInfo;
     2102
     2103        Status = pCurVidPnSourceModeSetInterface->pfnAcquirePinnedModeInfo(hCurVidPnSourceModeSet, &pPinnedVidPnSourceModeInfo);
     2104        Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_NOT_PINNED);
     2105        if (Status == STATUS_SUCCESS)
     2106        {
     2107            vboxVidPnDumpSourceMode("Source Pinned: ", pPinnedVidPnSourceModeInfo, "\n");
     2108            pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo);
     2109        }
     2110        else if (Status == STATUS_GRAPHICS_MODE_NOT_PINNED)
     2111        {
     2112            drprintf(("Source NOT Pinned\n"));
     2113        }
     2114        else
     2115        {
     2116            drprintf(("ERROR getting piined Source Mode(0x%x)\n", Status));
     2117        }
     2118        pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet);
     2119    }
     2120    else
     2121    {
     2122        drprintf(("ERROR getting SourceModeSet(0x%x)\n", Status));
     2123    }
     2124}
     2125
     2126
     2127static DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
     2128        D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
     2129        const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext)
     2130{
     2131    vboxVidPnDumpSourceMode("SourceMode: ", pNewVidPnSourceModeInfo, "\n");
     2132    return TRUE;
     2133}
     2134
     2135void vboxVidPnDumpSourceModeSet(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
     2136{
     2137    drprintf(("  >>>***SourceMode Set for Source(%d)***\n", VidPnSourceId));
     2138    D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet;
     2139    const DXGK_VIDPNSOURCEMODESET_INTERFACE *pCurVidPnSourceModeSetInterface;
     2140
     2141    NTSTATUS Status = pVidPnInterface->pfnAcquireSourceModeSet(hVidPn,
     2142                        VidPnSourceId,
     2143                        &hCurVidPnSourceModeSet,
     2144                        &pCurVidPnSourceModeSetInterface);
     2145    Assert(Status == STATUS_SUCCESS);
     2146    if (Status == STATUS_SUCCESS)
     2147    {
     2148
     2149        Status = vboxVidPnEnumSourceModes(pDevExt, hVidPn, pVidPnInterface, hCurVidPnSourceModeSet, pCurVidPnSourceModeSetInterface,
     2150                vboxVidPnDumpSourceModeSetEnum, NULL);
     2151        Assert(Status == STATUS_SUCCESS);
     2152        if (Status != STATUS_SUCCESS)
     2153        {
     2154            drprintf(("ERROR enumerating Source Modes(0x%x)\n", Status));
     2155        }
     2156        pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet);
     2157    }
     2158    else
     2159    {
     2160        drprintf(("ERROR getting SourceModeSet for Source(%d), Status(0x%x)\n", VidPnSourceId, Status));
     2161    }
     2162
     2163    drprintf(("  <<<***End Of SourceMode Set for Source(%d)***\n", VidPnSourceId));
     2164}
     2165
     2166DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
     2167        D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
     2168        const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext)
     2169{
     2170    vboxVidPnDumpTargetMode("TargetMode: ", pNewVidPnTargetModeInfo, "\n");
     2171    return TRUE;
     2172}
     2173
     2174void vboxVidPnDumpTargetModeSet(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
     2175{
     2176    drprintf(("  >>>***TargetMode Set for Target(%d)***\n", VidPnTargetId));
     2177    D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet;
     2178    const DXGK_VIDPNTARGETMODESET_INTERFACE *pCurVidPnTargetModeSetInterface;
     2179
     2180    NTSTATUS Status = pVidPnInterface->pfnAcquireTargetModeSet(hVidPn,
     2181                        VidPnTargetId,
     2182                        &hCurVidPnTargetModeSet,
     2183                        &pCurVidPnTargetModeSetInterface);
     2184    Assert(Status == STATUS_SUCCESS);
     2185    if (Status == STATUS_SUCCESS)
     2186    {
     2187
     2188        Status = vboxVidPnEnumTargetModes(pDevExt, hVidPn, pVidPnInterface, hCurVidPnTargetModeSet, pCurVidPnTargetModeSetInterface,
     2189                vboxVidPnDumpTargetModeSetEnum, NULL);
     2190        Assert(Status == STATUS_SUCCESS);
     2191        if (Status != STATUS_SUCCESS)
     2192        {
     2193            drprintf(("ERROR enumerating Target Modes(0x%x)\n", Status));
     2194        }
     2195        pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet);
     2196    }
     2197    else
     2198    {
     2199        drprintf(("ERROR getting TargetModeSet for Target(%d), Status(0x%x)\n", VidPnTargetId, Status));
     2200    }
     2201
     2202    drprintf(("  <<<***End Of TargetMode Set for Target(%d)***\n", VidPnTargetId));
     2203}
     2204
     2205
     2206void vboxVidPnDumpPinnedTargetMode(const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
     2207{
     2208    D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet;
     2209    const DXGK_VIDPNTARGETMODESET_INTERFACE *pCurVidPnTargetModeSetInterface;
     2210
     2211    NTSTATUS Status = pVidPnInterface->pfnAcquireTargetModeSet(hVidPn,
     2212                        VidPnTargetId,
     2213                        &hCurVidPnTargetModeSet,
     2214                        &pCurVidPnTargetModeSetInterface);
     2215    Assert(Status == STATUS_SUCCESS);
     2216    if (Status == STATUS_SUCCESS)
     2217    {
     2218        CONST D3DKMDT_VIDPN_TARGET_MODE* pPinnedVidPnTargetModeInfo;
     2219
     2220        Status = pCurVidPnTargetModeSetInterface->pfnAcquirePinnedModeInfo(hCurVidPnTargetModeSet, &pPinnedVidPnTargetModeInfo);
     2221        Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_NOT_PINNED);
     2222        if (Status == STATUS_SUCCESS)
     2223        {
     2224            vboxVidPnDumpTargetMode("Target Pinned: ", pPinnedVidPnTargetModeInfo, "\n");
     2225            pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo);
     2226        }
     2227        else if (Status == STATUS_GRAPHICS_MODE_NOT_PINNED)
     2228        {
     2229            drprintf(("Target NOT Pinned\n"));
     2230        }
     2231        else
     2232        {
     2233            drprintf(("ERROR getting piined Target Mode(0x%x)\n", Status));
     2234        }
     2235        pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet);
     2236    }
     2237    else
     2238    {
     2239        drprintf(("ERROR getting TargetModeSet(0x%x)\n", Status));
     2240    }
     2241}
    18632242
    18642243void vboxVidPnDumpPath(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
     
    18662245{
    18672246    drprintf((" >>Start Dump VidPn Path>>\n"));
    1868     drprintf(("VidPnSourceId(%d),  VidPnTargetId(%d), ImportanceOrdinal(%s), VidPnTargetColorBasis(%s), Content(%s)\n",
    1869             pVidPnPresentPathInfo->VidPnSourceId, pVidPnPresentPathInfo->VidPnTargetId,
     2247    drprintf(("VidPnSourceId(%d),  VidPnTargetId(%d)\n",
     2248            pVidPnPresentPathInfo->VidPnSourceId, pVidPnPresentPathInfo->VidPnTargetId));
     2249
     2250    vboxVidPnDumpPinnedSourceMode(hVidPn, pVidPnInterface, pVidPnPresentPathInfo->VidPnSourceId);
     2251    vboxVidPnDumpPinnedTargetMode(hVidPn, pVidPnInterface, pVidPnPresentPathInfo->VidPnTargetId);
     2252
     2253    drprintf(("ImportanceOrdinal(%s), VidPnTargetColorBasis(%s), Content(%s)\n",
    18702254            vboxVidPnDumpStrImportance(pVidPnPresentPathInfo->ImportanceOrdinal),
    18712255            vboxVidPnDumpStrColorBasis(pVidPnPresentPathInfo->VidPnTargetColorBasis),
    18722256            vboxVidPnDumpStrContent(pVidPnPresentPathInfo->Content)));
    18732257    vboxVidPnDumpPathTransformation(&pVidPnPresentPathInfo->ContentTransformation);
    1874     vboxVidPnDumpRegion("VisibleFromActiveTLOffset: ", &pVidPnPresentPathInfo->VisibleFromActiveTLOffset, "\n");
    1875     vboxVidPnDumpRegion("VisibleFromActiveBROffset: ", &pVidPnPresentPathInfo->VisibleFromActiveBROffset, "\n");
     2258    vboxVidPnDumpRegion("VisibleFromActiveTLOffset(", &pVidPnPresentPathInfo->VisibleFromActiveTLOffset, ")\n");
     2259    vboxVidPnDumpRegion("VisibleFromActiveBROffset(", &pVidPnPresentPathInfo->VisibleFromActiveBROffset, ")\n");
    18762260    vboxVidPnDumpRanges("VidPnTargetColorCoeffDynamicRanges: ", &pVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges, "\n");
    18772261    vboxVidPnDumpCopyProtectoin(&pVidPnPresentPathInfo->CopyProtection);
     
    18912275}
    18922276
    1893 void vboxVidPnDumpVidPn(PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface)
    1894 {
    1895     drprintf ((">>>>>>>>>>>>>>>>>Start Dumping VidPn>>>>>>>>>>>>>>>>>>>>>>\n"));
     2277void vboxVidPnDumpVidPn(const char * pPrefix, PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, const char * pSuffix)
     2278{
     2279    drprintf (("%s", pPrefix));
    18962280
    18972281    D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
     
    19072291    }
    19082292
    1909     drprintf (("<<<<<<<<<<<<<<<<<Stop Dumping VidPn<<<<<<<<<<<<<<<<<<<<<<\n"));
    1910 }
     2293    for (int i = 0; i < commonFromDeviceExt(pDevExt)->cDisplays; ++i)
     2294    {
     2295        vboxVidPnDumpSourceModeSet(pDevExt, hVidPn, pVidPnInterface, (D3DDDI_VIDEO_PRESENT_SOURCE_ID)i);
     2296        vboxVidPnDumpTargetModeSet(pDevExt, hVidPn, pVidPnInterface, (D3DDDI_VIDEO_PRESENT_TARGET_ID)i);
     2297    }
     2298
     2299    drprintf (("%s", pSuffix));
     2300}
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.h

    r33868 r33980  
    1818#define VBOXVDPN_C_DISPLAY_VBLANK_SIZE 180
    1919
    20 NTSTATUS vboxVidPnCheckTopology(const D3DKMDT_HVIDPN hDesiredVidPn,
     20NTSTATUS vboxVidPnCheckTopology(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn,
    2121        D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
    2222        BOOLEAN *pbSupported);
     
    129129        D3DDDI_VIDEO_PRESENT_TARGET_ID targetId, D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
    130130        D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, int32_t iPreferred);
     131
     132void vboxVidPnDumpVidPn(const char * pPrefix, PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, const char * pSuffix);
    131133#endif /* #ifndef ___VBoxVideoVidPn_h___ */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r33879 r33980  
    36213621    if (Status == STATUS_SUCCESS)
    36223622    {
     3623#ifdef DEBUG_misha
     3624        vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>\n", pContext, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n");
     3625#endif
     3626
    36233627        D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
    36243628        const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
     
    36263630        if (Status == STATUS_SUCCESS)
    36273631        {
    3628             Status = vboxVidPnCheckTopology(pIsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported);
     3632            Status = vboxVidPnCheckTopology(pContext, pIsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported);
    36293633            if (Status == STATUS_SUCCESS && bSupported)
    36303634            {
     
    37023706    pIsSupportedVidPnArg->IsVidPnSupported = bSupported;
    37033707
     3708#ifdef DEBUG_misha
     3709    drprintf(("The Given VidPn is %ssupported", pIsSupportedVidPnArg->IsVidPnSupported ? "", "!!NOT!! "));
     3710#endif
     3711
    37043712    dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
    37053713
     
    37303738    if (Status == STATUS_SUCCESS)
    37313739    {
    3732         for (int i = 0; i < commonFromDeviceExt(pDevExt)->cDisplays; ++i)
    3733         {
     3740        VIDEO_MODE_INFORMATION *pResModes = NULL;
     3741        uint32_t cResModes = 0;
     3742        for (int i = commonFromDeviceExt(pDevExt)->cDisplays -1; i >= 0 ; --i)
     3743        {
     3744            /* @todo: check that we actually need the current source->target */
    37343745            D3DKMDT_2DREGION Resolution;
    37353746            PVBOXWDDM_VIDEOMODES_INFO pInfo = &pInfos[i];
     
    37453756            }
    37463757
     3758            int32_t iPreferableResMode;
     3759            uint32_t cActualResModes;
     3760
     3761            Status = vboxWddmGetModesForResolution(pDevExt, pInfo, &Resolution,
     3762                    pResModes, cResModes, &cActualResModes, &iPreferableResMode);
     3763            Assert(Status == STATUS_SUCCESS || Status == STATUS_BUFFER_TOO_SMALL);
     3764            if (Status == STATUS_BUFFER_TOO_SMALL)
     3765            {
     3766                Assert(cResModes < cActualResModes);
     3767                if (pResModes)
     3768                {
     3769                    vboxWddmMemFree(pResModes);
     3770                }
     3771                pResModes = (VIDEO_MODE_INFORMATION*)vboxWddmMemAllocZero(sizeof (*pResModes) * cActualResModes);
     3772                Assert(pResModes);
     3773                if (!pResModes)
     3774                {
     3775                    Status = STATUS_NO_MEMORY;
     3776                    break;
     3777                }
     3778                cResModes = cActualResModes;
     3779                Status = vboxWddmGetModesForResolution(pDevExt, pInfo, &Resolution,
     3780                                    pResModes, cResModes, &cActualResModes, &iPreferableResMode);
     3781                Assert(Status == STATUS_SUCCESS);
     3782                if (Status != STATUS_SUCCESS)
     3783                    break;
     3784            }
     3785            else if (Status != STATUS_SUCCESS)
     3786                break;
     3787
     3788            Assert(iPreferableResMode > 0);
     3789
    37473790            Status = vboxVidPnCreatePopulateVidPnFromLegacy(pDevExt, pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, pVidPnInterface,
    3748                             pInfo->aModes, pInfo->cModes, pInfo->iPreferredMode,
    3749                             pInfo->aResolutions, pInfo->cResolutions,
    3750                             i, i);
     3791                            pResModes, cResModes, iPreferableResMode,
     3792                            &Resolution, 1 /* cResolutions */,
     3793                            i, i); /* srcId, tgtId */
    37513794            Assert(Status == STATUS_SUCCESS);
    37523795            if (Status != STATUS_SUCCESS)
     
    37563799            }
    37573800        }
     3801
     3802#ifdef DEBUG_misha
     3803        vboxVidPnDumpVidPn("\n>>>>Recommended VidPN: >>>>\n", pDevExt, pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n");
     3804#endif
    37583805    }
    37593806
     
    37823829    if (Status == STATUS_SUCCESS)
    37833830    {
     3831#ifdef DEBUG_misha
     3832        vboxVidPnDumpVidPn("\n>>>>MODALITY VidPN (IN) : >>>>\n", pDevExt, pEnumCofuncModalityArg->hConstrainingVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n");
     3833#endif
     3834
    37843835        D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
    37853836        const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
     
    38073858        else
    38083859            drprintf((__FUNCTION__ ": pfnGetTopology failed Status(0x%x)\n", Status));
     3860
     3861#ifdef DEBUG_misha
     3862        vboxVidPnDumpVidPn("\n>>>>MODALITY VidPN (OUT) : >>>>\n", pDevExt, pEnumCofuncModalityArg->hConstrainingVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n");
     3863#endif
    38093864    }
    38103865    else
     
    39934048    const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
    39944049    NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pCommitVidPnArg->hFunctionalVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
     4050    Assert(Status == STATUS_SUCCESS);
    39954051    if (Status == STATUS_SUCCESS)
    39964052    {
     4053#ifdef DEBUG_misha
     4054        vboxVidPnDumpVidPn("\n>>>>COMMIT VidPN: >>>>\n", pDevExt, pCommitVidPnArg->hFunctionalVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n");
     4055#endif
    39974056        if (pCommitVidPnArg->AffectedVidPnSourceId != D3DDDI_ID_ALL)
    39984057        {
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp

    r33931 r33980  
    280280    Ctx.Info.Height = Height;
    281281    Ctx.Info.BitsPerPixel = BitsPerPixel;
    282     DWORD err = vboxDispIfWDDMAdapterOp(pIf, (int)Id, vboxDispIfResizeWDDMOp, &Ctx);
     282    DWORD err = vboxDispIfWDDMAdapterOp(pIf, -1, /* (int)Id - always say -1 to use primary display since the display does not really matter here */
     283            vboxDispIfResizeWDDMOp, &Ctx);
    283284    if (err == NO_ERROR)
    284285    {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette