video minidriver's interrupt?

HI:
i am writing philps saa7146 video driver. now when i use it in the
graph edit it work ok,i can pause stop and restart the video.but when i
close the graph edit ,my driver will receive an interrupt,here is my
interrupt function:
BOOLEAN fMyIRQ = FALSE;
ULONG isrstatus = 0;
isrstaqtus = READ_REGISTER_ULONG((****));
KdPrint((“Testcap:isrstatuse = %1x\n”,isrstatus));
if(isrstatus ==0)
return FALSE;
else
{
WRITE_REGISTER_ULONG(***);
return TRUE;
}

i trace the source code, the KdPrint output
“Testcap: isrstatus = 0”
and then return FALSE;
when interrupt return FALSE;
the softice report:
Break due to Page Fault (0Eh) Fault=0002
MSR LastExceptionFromIp=80461F9E
MSR LastExceptionToIp=F7BBC07E

Rule of thumb - enable/disable interrupts during state transition of corresponding stream. There’s
no point DMAing (thus wasting system resources) if the data is getting lost anyway.

Generic guideline is

  1. to acquire resources such as DMA channel during state transition from STOP to ACQUIRE and
    release them going from ACQUIRE back to STOP.
  2. to enable DMA making state transition from PAUSE to RUN and disable it while switching back to
    PAUSE from RUN.

I don’t know what Philips 7146 driver is doing in its ISR, however streaming drivers typically
access stream extension of corresponding pin (for example, to remove pending SRB from pin’s
queue.)
When you shut GraphEdit down, pin gets closed and its extension gets recycled. My guess is that
part of your code touches already freed stream extension, which causes BSOD.
Try to disconnect pin without closing GraphEdit. If the theory above is true, you’ll see the very
same crash.

– Max.

— BitBug wrote:
> HI:
> i am writing philps saa7146 video driver. now when i use it in the
> graph edit it work ok,i can pause stop and restart the video.but when i
> close the graph edit ,my driver will receive an interrupt,here is my
> interrupt function:
> BOOLEAN fMyIRQ = FALSE;
> ULONG isrstatus = 0;
> isrstaqtus = READ_REGISTER_ULONG((*));
> KdPrint((“Testcap:isrstatuse = %1x\n”,isrstatus));
> if(isrstatus ==0)
> return FALSE;
> else
> {
> WRITE_REGISTER_ULONG(
);
> return TRUE;
> }
>
> i trace the source code, the KdPrint output
> “Testcap: isrstatus = 0”
> and then return FALSE;
> when interrupt return FALSE;
> the softice report:
> Break due to Page Fault (0Eh) Fault=0002
> MSR LastExceptionFromIp=80461F9E
> MSR LastExceptionToIp=F7BBC07E
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to %%email.unsub%%

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world’s greatest free email!
http://mail.yahoo.com/