Re: problem about WDDM miniport driver of win7

now, the newest call sequence as follows:

DriverEntry
DxgkDdiAddDevice
DxgkDdiQueryInterface
DxgkDdiQueryInterface
DxgkDdiStartDevice
DxgkDdiQueryChildRelations

DxgkDdiQueryAdapterInfo(DXGKQAITYPE_DRIVERCAPS)

DxgkDdiQueryAdapterInfo(DXGKQAITYPE_QUERYSEGMENT)

DxgkDdiQueryAdapterInfo(DXGKQAITYPE_QUERYSEGMENT)

DxgkDdiQueryDeviceDescriptor DxgkDdiQueryDeviceDescriptor DxgkDdiRecommendMonitorModes DxgkDdiIsSupportedVidPn * many DxgkDdiEnumVidPnCofuncModality * manyand why not call DxgkDdiCreateDevice

Is there somthing wrong i am passing? Thanks for your any help.

-----原始邮件-----
发件人:“闵亮文”
发送时间:2017-10-10 11:27:52 (星期二)
收件人: xxxxx@lists.osr.com
抄送:
主题: problem about WDDM miniport driver of win7

Hi all,

I’m developing a WDDM driver, currently I have skeleton user mode
and miniport drivers.

After installation and rebooting on Win7 I’m getting the following
call sequence.

DriverEntry
DxgkDdiAddDevice
DxgkDdiQueryInterface
DxgkDdiQueryInterface
DxgkDdiStartDevice
DxgkDdiQueryChildRelations
DxgkDdiStopDevice
DxgkDdiRemoveDevice
DxgkDdiUnload

The call sequence hangs on it , And i can’t see anything on display(in virtual
machine window).

Is there something wrong i am passing?
Thanks for your any help.

Did you research this list?
Did you see the thread “problem about WDDM miniport driver of win7” July 13th 2015 - Aug 6th 2015?
In this thread (and others) I comprehensively answered exactly this kind of question and the next ones which will immediately follow after this one.

Marcel Ruedinger
datronicsoft?

Hi Marcel, Thank you very much for your reply.
I have seen the thread “problem about WDDM miniport driver of win7” July 13th 2015 - Aug 6th 2015
But I Use the same implementation of DxgkDdiQueryAdapterInfo as author, just there is something wrong.

The driver’s call sequence is as follow:
DxgkDdiQueryAdapterInfo(DXGKQAITYPE_DRIVERCAPS)
DxgkDdiCreateDevice
DxgkDdiQueryAdapterInfo(DXGKQAITYPE_QUERYSEGMENT)
DxgkDdiQueryAdapterInfo(DXGKQAITYPE_QUERYSEGMENT)
DxgkDdiCreateContext
DxgkDdiIsSupportedVidPn x many
DxgkDdiEnumVidPnCofuncModality x many

And not call DxgkDdiGetStandardAllocationDriverData

The screen was black all the time.

My implementation of DxgkDdiQueryAdapterInfo callback is as follow…
switch (pQueryAdapterInfo->Type)
{
case DXGKQAITYPE_DRIVERCAPS:
{
DXGK_DRIVERCAPS *pCaps = (DXGK_DRIVERCAPS*)pQueryAdapterInfo->pOutputData;

pCaps->MaxPointerWidth = POINTER_SIZE;
pCaps->MaxPointerHeight = POINTER_SIZE;
pCaps->PointerCaps.Value = 3;
pCaps->HighestAcceptableAddress.QuadPart = 0xFFFFFFFF;
pCaps->MaxAllocationListSlotId = -1;
pCaps->NumberOfSwizzlingRanges = 0;
pCaps->ApertureSegmentCommitLimit = 0;
pCaps->InterruptMessageNumber = 0;
pCaps->MaxOverlays = 0;
pCaps->GammaRampCaps.Value = 0;
pCaps->PresentationCaps.Value = 0;
pCaps->MaxQueuedFlipOnVSync = 0;
pCaps->FlipCaps.Value = 0;
pCaps->SchedulingCaps.Value = 0;
pCaps->SchedulingCaps.MultiEngineAware = 1;
pCaps->GpuEngineTopology.NbAsymetricProcessingNodes = WDDM_NUM_NODES;
pCaps->MemoryManagementCaps.PagingNode = 0;
pCaps->MemoryManagementCaps.Value = 0;
pCaps->WDDMVersion = DXGKDDI_WDDMv1;
ntStatus = STATUS_SUCCESS;
break;
}
case DXGKQAITYPE_QUERYSEGMENT:
{

define WDDM_SEGMENTS_COUNT 1

DXGK_QUERYSEGMENTOUT *pQsOut = (DXGK_QUERYSEGMENTOUT*)pQueryAdapterInfo->pOutputData;
if (!pQsOut->pSegmentDescriptor)
{
pQsOut->NbSegment = WDDM_SEGMENTS_COUNT;
ntStatus = STATUS_SUCCESS;
break;
}
DXGK_SEGMENTDESCRIPTOR* pDr = pQsOut->pSegmentDescriptor;
for (int i = 0; i < pQsOut->NbSegment; i++, pDr++)
{
pDr[i].BaseAddress = pDevExt->m_pHWDevice->GetVRamPhyAddr();
pDr[i].CpuTranslatedAddress = pDevExt->m_pHWDevice->GetVRamPhyAddr();;
pDr[i].Size = pDevExt->m_pHWDevice->GetVRamPhrSize();
pDr[i].NbOfBanks = 0;
pDr[i].pBankRangeTable = 0;
pDr[i].CommitLimit = pDr[i].Size;
pDr[i].Flags.Value = 0;
pDr[i].Flags.CpuVisible = 1;
pDr[i].Flags.PopulatedFromSystemMemory = FALSE;
}

pQsOut->PagingBufferSegmentId = 0;
pQsOut->PagingBufferSize = PAGE_SIZE;
pQsOut->PagingBufferPrivateDataSize = PAGE_SIZE;

ntStatus = STATUS_SUCCESS;
break;
}

Is there somthing wrong which my implementation?
Thanks for your any help.

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-22 19:28:12 (星期日)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> Did you research this list?
> Did you see the thread “problem about WDDM miniport driver of win7” July 13th 2015 - Aug 6th 2015?
> In this thread (and others) I comprehensively answered exactly this kind of question and the next ones which will immediately follow after this one.
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

There can be hundreds of reasons and I can only guess…

Does it ever stop calling DxgkDdiIsSupportedVidPn and DxgkDdiEnumVidPnCofuncModality?
Does it not call DxgkDdiRemoveDevice and DxgkDdiUnload any more?

If it does continue endlessly, then the driver’s Video Present Network code is still broken.
In that case, I can only repeat the previous thread:
Study the topic “Video Present Networks”.
Get the working “Video Present Network” code from WDK source code sample KMDOD.

Marcel Ruedinger
datronicsoft

Hi Marcel, thank you sincerely for reply.

Does it ever stop calling DxgkDdiIsSupportedVidPn and DxgkDdiEnumVidPnCofuncModality?
Does it not call DxgkDdiRemoveDevice and DxgkDdiUnload any more?

That is the case.

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-23 16:07:50 (星期一)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> There can be hundreds of reasons and I can only guess…
>
> Does it ever stop calling DxgkDdiIsSupportedVidPn and DxgkDdiEnumVidPnCofuncModality?
> Does it not call DxgkDdiRemoveDevice and DxgkDdiUnload any more?
>
> If it does continue endlessly, then the driver’s Video Present Network code is still broken.
> In that case, I can only repeat the previous thread:
> Study the topic “Video Present Networks”.
> Get the working “Video Present Network” code from WDK source code sample KMDOD.
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Hi Marcel, i am sorry, i just made some mistakes,
because it stop calling DxgkDdiIsSupportedVidPn and DxgkDdiEnumVidPnCofuncModality after many times
by print log.

But the driver just not call other functions, I am very confused. Besides, i get the working
code from WDK source code sample KMDOD.

Thank you for your help.

cruisemin

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-23 16:07:50 (星期一)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> There can be hundreds of reasons and I can only guess…
>
> Does it ever stop calling DxgkDdiIsSupportedVidPn and DxgkDdiEnumVidPnCofuncModality?
> Does it not call DxgkDdiRemoveDevice and DxgkDdiUnload any more?
>
> If it does continue endlessly, then the driver’s Video Present Network code is still broken.
> In that case, I can only repeat the previous thread:
> Study the topic “Video Present Networks”.
> Get the working “Video Present Network” code from WDK source code sample KMDOD.
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Confused? Then let us start very simple from the very beginning of the “Video Present Network” code:
Is your driver’s “Video Present Network” code telling dxgkrnl.sys that a display monitor is plugged to your graphics adapter?
If the answer is “no”, then you would probably see exactly the scenario described above.
dxgkrnl.sys is not doing any work, but not unloading the driver either.
Instead it just sits there waiting until a monitor is plugged.

Marcel Ruedinger
datronicsoft

Also if you end up reporting that you can’t support any offered
configurations.

Mark Roddy

On Mon, Oct 23, 2017 at 9:59 AM, xxxxx@datronic.de wrote:

> Confused? Then let us start very simple from the very beginning of the
> “Video Present Network” code:
> Is your driver’s “Video Present Network” code telling dxgkrnl.sys that a
> display monitor is plugged to your graphics adapter?
> If the answer is “no”, then you would probably see exactly the scenario
> described above.
> dxgkrnl.sys is not doing any work, but not unloading the driver either.
> Instead it just sits there waiting until a monitor is plugged.
>
> Marcel Ruedinger
> datronicsoft
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:></http:>

Hi, Marcel, thank you for your reply.

What is the meanings of “driver’s “Video Present Network” code telling dxgkrnl.sys that a display
monitor is plugged to your graphics adapter”, or in which function it is implemented.

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-23 21:59:57 (星期一)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> Confused? Then let us start very simple from the very beginning of the “Video Present Network” code:
> Is your driver’s “Video Present Network” code telling dxgkrnl.sys that a display monitor is plugged to your graphics adapter?
> If the answer is “no”, then you would probably see exactly the scenario described above.
> dxgkrnl.sys is not doing any work, but not unloading the driver either.
> Instead it just sits there waiting until a monitor is plugged.
>
> Marcel Ruedinger
> datronicsoft
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

DxgkDdiQueryChildStatus and DxgkCbIndicateChildStatus

Marcel Ruedinger
datronicsoft

Hi, Marcel, you are so warmly and kindly, thank you.

I have already noticed this theme of “Monitor Hot Plug Detection” on MSDN.
And call functions as mentioned, but the problem still exist…

My implementation callback is as follow:

DxgkDdiQueryChildRelations:
ChildRelations[ChildIndex].ChildDeviceType = TypeVideoOutput;
ChildRelations[ChildIndex].ChildCapabilities.HpdAwareness = HpdAwarenessInterruptible;
ChildRelations[ChildIndex].ChildCapabilities.Type.VideoOutput.InterfaceTechnology = D3DKMDT_VOT_HD15;
ChildRelations[ChildIndex].ChildCapabilities.Type.VideoOutput.MonitorOrientationAwareness = D3DKMDT_MOA_INTERRUPTIBLE;
ChildRelations[ChildIndex].AcpiUid = 0;
ChildRelations[ChildIndex].ChildUid = ChildIndex;

DxgkDdiQueryChildStatus:
switch (ChildStatus->Type)
{
case StatusConnection:
ChildStatus->HotPlug.Connected = TRUE;
return STATUS_SUCCESS;
case StatusRotation:
ChildStatus->Rotation.Angle = 0;
return STATUS_SUCCESS;
default:
LogLog(LOG_PREFIX,eLogWarn, “Unknown pChildStatus->Type (0x%I64x) requested.”, ChildStatus->Type);
return STATUS_NOT_SUPPORTED;
}

DxgkCbIndicateChildStatus:
ChildStatus.Type = StatusConnection;
ChildStatus.ChildUid = 0;
ChildStatus.HotPlug.Connected = TRUE;
DxgkCbIndicateChildStatus(DeviceHandle, &ChildStatus);

Is there somthing wrong i am passing?
Thanks for your any help.

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-27 02:12:24 (星期五)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> DxgkDdiQueryChildStatus and DxgkCbIndicateChildStatus
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

I cannot see any obvious mistake here, but don’t count on it! As I always say: There can be hundreds of reasons and I can only guess…

I assume that there is a reasonable number (probably 1) of Video Present Sources and a reasonable number (probably 1) of Video Present Targets (children) reported in DxgkDdiStartDevice.

Then, most likely, the error is in the implementation of
DxgkDdiEnumVidPnCofuncModality. It probably wouldn’t get there if DxgkDdiIsSupportedVidPn didn’t report at least one supported Video Present Network.

Marcel Ruedinger
datronicsoft

very nice! here

Hi, Marcel, I have a problem:
The members PrimarySegment and PrimaryAddress of struct DXGKARG_SETVIDPNSOURCEADDRESS which is pointed by pSetVidPnSourceAddress when calls DxgkDdiSetVidPnSourceAddress function, who passed the value, because the DxgkDdiSetVidPnSourceAddress function use that and Looks like some problems.

thank you for your any help.

-----原始邮件-----
发件人: “xxxxx@datronic.de
> 发送时间: 2017-10-27 02:12:24 (星期五)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> DxgkDdiQueryChildStatus and DxgkCbIndicateChildStatus
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Hi, all

What are the call queues of WDDM?

Than you for any help.

Best regared.

-----原始邮件-----
发件人: “xxxxx@mail.ru
> 发送时间: 2017-10-29 17:21:58 (星期日)
> 收件人: “Windows System Software Devs Interest List”
> 抄送:
> 主题: RE:[ntdev] Re: problem about WDDM miniport driver of win7
>
> very nice!here
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>