Re: bug in changeset 13239:54535665f94b ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Sat, 07 Nov 2009 15:05:02 +0100
e9hack <e9hack@xxxxxxxxxxxxxx> escreveu:

> Mauro Carvalho Chehab schrieb:
> 
> > I agree. We need first to stop DMA activity, and then release the page tables.
> > 
> > Could you please test if the enclosed patch fixes the issue?
> 
> Hi Mauro,
> 
> your patch doesn't solve the problem, because saa7146_dma_free() doesn't stop a running
> dma transfer of the saa7146.

Well, it should be stopping it. The logic is to wait for an incoming dma
transfer and then disable dma transfers:

void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
                                                struct saa7146_buf *buf)
{
        struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
        DEB_EE(("dev:%p, buf:%p\n",dev,buf));

        BUG_ON(in_interrupt());

        videobuf_waiton(&buf->vb,0,0);
        videobuf_dma_unmap(q, dma);
        videobuf_dma_free(dma);
        buf->vb.state = VIDEOBUF_NEEDS_INIT;
}

Maybe the code for dma_unmap is incomplete?

> Since last weekend, I'm using the attached patch. I'm not
> sure, if the functionality of video_end() must be split. Maybe the last part of
> video_end() must be execute at the end of vidioc_streamoff().

It is not safe to stop at streamoff(), since applications may close the device
without calling streamoff. The kernel driver should be able to handle such
situations as well.

So, if my patch doesn't work, we'll need to add more bits at saa7146_dma_free().

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux