Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question about video driver sample source code - mga

0 views
Skip to first unread message

tom1000000

unread,
Aug 10, 2008, 6:32:01 AM8/10/08
to
Hello

I was looking through the included source code in the NT4 DDK... yes its
old, but I guess it should be simpler to understand.

In the file ddk\src\video\displays\mga\ENABLE.C it refers to
IOCTL_VIDEO_MTZ_QUERY_HW_DATA.

Where is the source code for this IOCTL? The source code given in the DDK
doesn't even include the code that queries the video card? I would say the
provided source code is incomplete.

As a challenge for myself, I tried to find the code that determines the
amount of RAM on the video card. I couldn't find it.

Why did they only provide some of the source code. Why did they leave out
the code that queries / initializes the mga video card? Thats only like the
most important part of the driver? I am not impressed.

Thank you for your help.

if (EngDeviceIoControl(ppdev->hDriver,
IOCTL_VIDEO_MTX_QUERY_HW_DATA,
NULL, // Input
0,
&HwData, // Output
sizeof(HW_DATA),
&ReturnedDataLength))


Tim Roberts

unread,
Aug 10, 2008, 6:39:07 PM8/10/08
to
tom1000000 <tom10...@discussions.microsoft.com> wrote:
>
>I was looking through the included source code in the NT4 DDK... yes its
>old, but I guess it should be simpler to understand.

Maybe, but it's also buggier, and it doesn't include enhancements to the
driver interface since then.

>In the file ddk\src\video\displays\mga\ENABLE.C it refers to
>IOCTL_VIDEO_MTZ_QUERY_HW_DATA.
>
>Where is the source code for this IOCTL? The source code given in the DDK
>doesn't even include the code that queries the video card?

The hardware interface is implemented in the miniport, not in the display
driver. The display driver sends those ioctls to the miniport.

>I would say the provided source code is incomplete.

Matrox contributed the source code for their display driver. They did not
contribute the source code for their miniport. Apparently, they felt the
miniport contained the parts they deemed as proprietary.

>As a challenge for myself, I tried to find the code that determines the
>amount of RAM on the video card. I couldn't find it.

It would be in the miniport, not the display driver.

>Why did they only provide some of the source code. Why did they leave out
>the code that queries / initializes the mga video card? Thats only like the
>most important part of the driver?

Depends on your point of view, I guess. In terms of time spent in the
driver, the display driver is called MUCH more than the miniport. The
miniport controls initialization, and after that it gets out of the way.
The miniport tends to be very hardware specific.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

allenzhang

unread,
Aug 10, 2008, 9:32:13 PM8/10/08
to
Yes, You should see it in the miniport, But it is incomplete, Only the ddi is
provided in NT4.DDK,
It should be dispatched in HwStartIO.


Best regards,
Allen

tom1000000

unread,
Aug 23, 2008, 6:14:01 PM8/23/08
to
Thank you for the info.

I have no understanding why they are so secretive. Matrox makes its money
selling the HARDWARE, the source code isn't going to help their competitors.

I'm disappointed with Matrox, but there's no hope for me.

Thank you.

David Craig

unread,
Aug 23, 2008, 9:36:31 PM8/23/08
to
Think about all the time and money that goes into creating a chip. Chips
far less complex than a video card can cost about $1M just to get one wafer
produced. There are significant costs in modifying/creating the drivers to
support the new chip. Then there are more costs involved in 'correcting'
errata that are discovered with each major/minor revision of the ASIC until
a final chip is chosen to be the production one. There are special
capabilities of some chips that are not enabled in production code but may
require the code execute a sequence to disable that feature. The chip maker
may not want their competitors to know what is planned or attempted.

For a video card some chips may have some features implemented in the driver
and not in hardware because that specific version of the chip fails under
some circumstances. I know a competitor can shave a chip and reverse
engineer it, but that requires significant allocation of moneys which may
slow the impact. Just eposing the features, failures, and successes via the
driver source code will allow too much information to be exposed.

"tom1000000" <tom10...@discussions.microsoft.com> wrote in message
news:121038E3-FF03-4577...@microsoft.com...

0 new messages