Hi,
I am developing a WDDM driver based on KMDOD sample.
My device has two distinct frame buffers and two outputs. The content of the first frame buffer can be displayed on first output only and similarly the content of the second frame buffer can only be displayed on the second output.
By reading the documentation first I thought everything is clear with the presentation sources and targets, but by now I got confused.
My DxgkDdiStartDevice() routine reports NumberOfVideoPresentSources=2 and NumberOfChildren=2.
I consider that Source#0 represents the first frame buffer, Source#1 represents the second frame buffer, Target#0 designates the first output and the Target#1 does the second output.
With this assumption my DxgkDdiIsSupportedVidPn() sets IsVidPnSupported=TRUE for the following VidPNs only:
“Source#0->Target#0” (single path)
“Source#1->Target#1” (single path)
“Source#0->Target#0 + Source#1->Target#1” (two paths)
For all the other VidPn-s like “Source#0->Target#1” or “Source#0->Target#0 + Source#0->Target#1”, etc. IsVidPnSupported=FALSE.
My problem is, that in the Screen Resolution page of Win8.1 I can set “Show desktop only on 1” and “Extend these displays” only. If I select “Show desktop only on 2”, a dialog appears saying “The display settings could not be saved. Please try a different combination of display settings.”
When I select “Show desktop only on 1” a VidPn having a single path “Source#0->Target#0” is set. For “Extend these displays” a VidPn is selected, which has two paths: Source#0->Target#0 and Source#1->Target#1.
I would expect that for the option “Show desktop only on 2” the Windows (or DXGK) sets a VidPn having the single path “Source#1->Target#1”, but it does not!
By tracing the calls of DxgkDdiIsSupportedVidPn() and DxgkDdiEnumVidPnCofuncModality() I can see that although DxgkDdiIsSupportedVidPn() is called several times for VidPns having a single Source#1->Target#1 path, they are occurred during booting only. Later, when I try to set “Show desktop only on 2” DxgkDdiIsSupportedVidPn() is not called for VidPn having the single Source#1->Target#1 path.
Furthermore, DxgkDdiEnumVidPnCofuncModality() is never called with VidPn having the single Source#1->Target#1 path.
I can see that at selecting the option “Show desktop only on 2” the system checks the combination of Source#0->Target#1 by calling DxgkDdiIsSupportedVidPn(), but this combination is not supported by my driver.
Do I misunderstand the terms presentation source and target? How can I have the windows set the path Source#1->Target#1 ?
Or do you have any idea what can be wrong in my realization?
Thank you for your comments in advance!
Laszlo
First: Windows can never be forced by the WDDM driver to set the path Source#1->Target#1 !
Windows is the master and the WDDM driver is the slave.
DirectX Graphics Kernel manages Video Present Networks.
WDDM drivers can only accept, partially augment (e.g. resolutions) or reject VidPns.
Second: There seems to be a requirement “Windows must be able to drive any target from any source, although there may be constraints on which target may be driven in combination.” This can hardly be read from the WDK documentation. However, it is stated as a sideline information in HLK WDDM test System.Client.Graphics.NoMoreThanOneInternalMonitor.
Thus the WDDM driver must also support:
“Source#0->Target#1” (single path)
“Source#1->Target#0” (single path)
Marcel Ruedinger
datronicsoft
Thank you, Marcel!
So, as I understand what you wrote, if the driver must support “Source#0->Target#1” or “Source#1->Target#0”, then my assumption that the “Source#0” definitely designates my first frame buffer and “Source#1” specifies the second frame buffer is wrong. In case e.g. “Source#0->Target#1” the Source#0 should specify my second frame buffer as it is the only source which can be displayed on Target#1, while in case of “Source#0->Target#0” Source#0 must specify the first frame buffer. Very confusing!
Additional info: we have developed an own display configuration program, which uses EnumDisplayDevices() and ChangeDisplaySettingsEx() calls. By this program we can attach/detach any display devices individually. This program is able to successfully set the display configuration where first display is detached and the second one is attached, which is the same what I expected from “Show desktop only on 2”.
By attaching the second display only my driver was called to set “Source#1->Target#1”. In this case it seems that Windows could successfully select the right VidPn form the set that my driver reported as supported.
Laszlo
EnumDisplayDevices(…) and ChangeDisplaySettingsEx(…) is completely different to what Windows 8 (and above) Display Control Panel is doing. It is using CCD API.
ChangeDisplaySettingsEx(…) API is actually legacy. CCD API is the successor. Is ChangeDisplayXxx API really working on Windows 8 and above on WDDM displays? Even if it is DOD only? I thought only the EnumDisplayXxx APIs are still working on Windows 8 and above…
Marcel Ruedinger
datronicsoft
Yes, I have performed the tests with EnumDisplayDevices() and ChangeDisplaySettingsEx() on Windows 8.1 and worked well. I am going to test them on Windows Server 2012 R2 and Windows 10 too.
Thank you for the hint, I will check the CCD API also.
Laszlo
By checking the manual page of ChangeDisplaySettingsEx() in MSDN Library (https://msdn.microsoft.com/en-us/library/dd183413(v=vs.85).aspx) I cannot see if it wouldn’t work on Windows 8 or later.
There is only one note for Win8, which regards to BPP modes less than 32.
Laszlo
xxxxx@datronic.de wrote:
EnumDisplayDevices(…) and ChangeDisplaySettingsEx(…) is completely different to what Windows 8 (and above) Display Control Panel is doing. It is using CCD API.
What do you mean by CCD API? I don’t know that acronym.
This is of interest to me as a user because of a project I’ve been
embroiled in for a while. I’m working on a manufacturing test station
for a complicated video board with six different video inputs, including
two that are 3840x2160 at 120Hz. We drive all six inputs (plus our
console) from a pair of Nvidia boards, and I use EnumDisplaySettingsEx
and ChangeDisplaySettingsEx to configure the seven monitors like we want
them. That process has been somewhat less than deterministic, and has
caused me considerable hair pulling and teeth gnashing. If there is a
better way, I’d like to hear about it.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
CCD == Connecting and Configuring Displays (API functions: QueryDisplayConfig, SetDisplayConfig, DisplayConfigGetDeviceInfo, DisplayConfigSetDeviceInfo, etc.).
CCD API is based on Video Present Network concepts. As opposed to the legacy API, the whole topology (including position of each VidPn Source on the Windows Desktop) can be set in one call. This could possibly by a key factor for eliminating the indeterminism in the above named video board project.
Marcel Ruedinger
datronicsoft
BTW - what is BasicDisplay.sys and BasicRender.sys in Win8+?
Do they replace the original cdd.dll which was the adapter from XPDM (actually NT4DM) to WDDM in Vista and Win7?
–
Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> CCD == Connecting and Configuring Displays (API functions: QueryDisplayConfig, SetDisplayConfig, DisplayConfigGetDeviceInfo, DisplayConfigSetDeviceInfo, etc.).
>
> CCD API is based on Video Present Network concepts. As opposed to the legacy API, the whole topology (including position of each VidPn Source on the Windows Desktop) can be set in one call. This could possibly by a key factor for eliminating the indeterminism in the above named video board project.
>
> Marcel Ruedinger
> datronicsoft
>
BasicDisplay is an in box WDDM “Display Only Driver” for Win8+ replacing the legacy VGA driver.
BasicRender is an in box WDDM “Render Only Driver” for Win8+ not replacing anything since this kind of driver did not exist before.
PS: Careful - CCD != CDD
Marcel Ruedinger
datronicsoft
> BasicDisplay is an in box WDDM “Display Only Driver” for Win8+ replacing the legacy VGA driver.
So, with BasicDisplay, D3D is not available at all?
BasicRender is an in box WDDM “Render Only Driver”
Can you tell us a bit more about this new kind of beast?
–
Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com
Not too much known nor published about WDDM Render Only drivers which were introduced in Windows 8. On Github, there is a new Microsoft “WDDM Render Only Driver” source code sample driver under construction for the Raspberry Pi 2.
Marcel Ruedinger
datronicsoft