PCI express card video streaming causes BSOD on Laptop

Hi All,

The AV stream driver for PCIe express card on Vista OS causes blue screen
and system hangs and does not give allow to control through windbg debugger
also. We use scatter gather DMA to transfer data between our hardware and
AVstream buffers directly. This mechanism works flawlessly in Windows XP,
MCE opertating systems. Where as in Vista OS, the same driver causes the
problem on same machine.

After checking with protocol analyzer, we found that when the AVstream
buffer addresses switches to Graphics adapter addresses, and this problem
happens right after that. As long as the buffer addresses are in system address memory, then there is no problem.

We also verified that if we use AVI decompressor in between our capture
filter and VMR filter then this problem does not happen.

Currently, we are under the assumption that something related to Graphics
driver is causing this problem. But not sure of this.

The burst sizes is total avstream buffer size which is about 735 KB. I tried to split them into 4KB sizes, which also did not help me.

Why the same hardware worked fine in Windows XP / MCE system, and why not in
Vista OS is my problem right now.

Inserting AVI decompressor helps in solving the problem temporarily. This is
because, our driver always gets only system memory buffers either total size
or 4KB or lessthan 4KB sizes. If system copies the data, then there is no
issue.

Can somebody help me fix this problem?

thanks in advance,
DV.

xxxxx@gmail.com wrote:

The AV stream driver for PCIe express card on Vista OS causes blue screen
and system hangs and does not give allow to control through windbg debugger
also.

Bus lock. If you unplug your PCIExpress card, does the system recover?
Remember that PCIExpress boards are hot-pluggable. If it does not
recover, then the problem is probably on the graphics card side.

Does this happen on every system, or only on one system? Intel-based,
or AMD-based?

After checking with protocol analyzer, we found that when the AVstream
buffer addresses switches to Graphics adapter addresses, and this problem
happens right after that. As long as the buffer addresses are in system address memory, then there is no problem.

We also verified that if we use AVI decompressor in between our capture
filter and VMR filter then this problem does not happen.

Yes, because in that case, you are writing into system memory, and not
into device memory.

Currently, we are under the assumption that something related to Graphics
driver is causing this problem. But not sure of this.

As I said on the newsgroup, it is not the graphics driver, but rather
the graphics chip. Some graphics chips are not prepared to accept DMA
transfers at arbitrary times.

The burst sizes is total avstream buffer size which is about 735 KB. I tried to split them into 4KB sizes, which also did not help me.

That’s not what I meant by burst size. When a PCIExpress device does a
bus-master transfer, it has to chops the transfer up into smaller chunks
called “bursts”, similar to the way a USB transaction is chopped into
packets. The maximum burst size is a bus parameter. The maximum
allowed by the bus is 4096 bytes, but almost all of the devices on the
market today are limited to 128 or 256.

When you chopped the transfer into 4KB chunks, did it fail on the very
first one, or did it fail later on?

Why the same hardware worked fine in Windows XP / MCE system, and why not in
Vista OS is my problem right now.

My guess would be that your XP and MCE graphs were not really rendering
directly into graphics memory. The path to the graphics card in Vista
is rather different.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Bus lock. If you unplug your PCIExpress card, does the system recover?
Remember that PCIExpress boards are hot-pluggable. If it does not
recover, then the problem is probably on the graphics card side.

Does this happen on every system, or only on one system? Intel-based,
or AMD-based?

>> The system never recovers even if we unplug the device. I have tried it many times. The only to recover is power off.

It happens only on particular systems. This is an IBM laptop with ATI graphics chipset. System is Intel based one. We have seen this problem on other laptops but it is very random.

That’s not what I meant by burst size. When a PCIExpress device does a
bus-master transfer, it has to chops the transfer up into smaller chunks
called “bursts”, similar to the way a USB transaction is chopped into
packets. The maximum burst size is a bus parameter. The maximum
allowed by the bus is 4096 bytes, but almost all of the devices on the
market today are limited to 128 or 256.

>> uses a maximum payload size of 128 bytes.

the crash happens even for the very simplified case of when our chip sends a packet with a payload size of 4 bytes, the problem doesn’t seem to have anything to do with large payloads.

When you chopped the transfer into 4KB chunks, did it fail on the very
first one, or did it fail later on?

> It is the first one itself. As soon it gets the Graphics buffer address, the crash happens. The AV stream buffers initially send atleast 10 buffers of system memory address and then start switching to actual graphics memory addresses. Which is common across multiple systems.

Infact we have even tried programming our device DMA to touch the graphics memory, which also resulted the same result like system hang.

Another point is, after the system hang, screen shows blue screen ( not BSOD) with out failure information and then in the background the transactions are going on continuously. Either AV stream driver did not die or controller did stop requesting DMA transfer. We found that through PCI express analyzer in between. We could not find any errors on the bus too.

I think, some how we make graphics chip unhappy about something and then it goes to some unrecoverable state.

My guess would be that your XP and MCE graphs were not really rendering
directly into graphics memory. The path to the graphics card in Vista
is rather different.

>> I guess this is not right. We have seen writing to graphics memory address directly with other PCI and PCI express cards too.

May be in Vista is different. But definitely there is a mismatch somewhere which I am not able to understand now.

Hi Tim / anybody,

Does the above information ring any bell? I am kind of stuck and exhausted all the options with this problem.

Can somebody help me?

Thanks in advance
DV.

xxxxx@gmail.com wrote:

Does the above information ring any bell? I am kind of stuck and exhausted all the options with this problem.

Can somebody help me?

I have no other ideas. I suspect you’ve run into a hardware limitation
in the graphics chip. You may have to live with an extra filter.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.