All of lore.kernel.org
 help / color / mirror / Atom feed
From: e9hack <e9hack@googlemail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Subject: Re: bug in changeset 13239:54535665f94b ?
Date: Sat, 07 Nov 2009 17:00:10 +0100	[thread overview]
Message-ID: <4AF5998A.6060602@googlemail.com> (raw)
In-Reply-To: <20091107124922.7fbf8445@pedra.chehab.org>

Mauro Carvalho Chehab schrieb:
> Em Sat, 07 Nov 2009 15:05:02 +0100
> e9hack <e9hack@googlemail.com> 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;
> }

In my case, videobuf_queue_cancel() is called previously. videobuf_queue_cancel() wakes up
all buffers, but it doesn't handle the currently by the saa7146 used buffer. queue->curr
points to this buffer. Waiting for an incoming dma transfer in saa7146_dma_free() has no
effect for such a buffer.

Regards,
Hartmut

  reply	other threads:[~2009-11-07 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-01 15:59 bug in changeset 13239:54535665f94b ? e9hack
2009-11-02 20:27 ` e9hack
2009-11-07 12:41 ` Mauro Carvalho Chehab
2009-11-07 14:05   ` e9hack
2009-11-07 14:49     ` Mauro Carvalho Chehab
2009-11-07 16:00       ` e9hack [this message]
2009-11-07 18:35     ` e9hack
2009-11-08 20:48   ` Johann Friedrichs
2009-11-19 21:02   ` e9hack
2009-11-19 21:15     ` e9hack
2009-11-23 19:29       ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AF5998A.6060602@googlemail.com \
    --to=e9hack@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.