Example #1
0
static DWORD MFC_IntrThread(void)
{
    unsigned int intr_reason;

    while (1)
    {
        // Wait for MFC Interrupt
        WaitForSingleObject(gMfcIntrEvent, INFINITE);

        // Only SEQ_INIT, SEQ_END, PIC_RUN and BUFFER EMPTY/FULL interrupts
        // will be processed.
        intr_reason = MfcIntrReason();
        RETAILMSG(0, (L"(( MFC Interrupt ) reason = 0x%X\n", intr_reason));

        if (intr_reason & MFC_INTR_ENABLE_RESET) {
            // On the MFC Interrupt,
            // MFC command completion event will be sent.
            // This event wakes up the task in WaitInterruptNotification() function.
            SendInterruptNotification(intr_reason);
        }

        // Clearing MFC interrupt bit
        MfcClearIntr();

        // Notify to Kernel that MFC Interrupt processing is completed.
        InterruptDone(g_MfcSysIntr);
    }

}
Example #2
0
static irqreturn_t s3c_mfc_irq(int irq, void *dev_id, struct pt_regs *regs)
{
	unsigned int	intReason;
	MFCInstCtx		*pMfcInst;

	pMfcInst = (MFCInstCtx *)dev_id;
	
	intReason	= MfcIntrReason();

	if (intReason & 0xC00E) {	// if PIC_RUN, buffer full and buffer empty interrupt
		SendInterruptNotification(intReason);
	}
	
	MfcClearIntr();

	return IRQ_HANDLED;
}