public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: V4L/ARM: videobuf-dma-contig no longer works on my ARM machine
Date: Sat, 09 Apr 2011 18:42:40 +0200	[thread overview]
Message-ID: <4DA08C80.5040205@suse.cz> (raw)
In-Reply-To: <201104091711.00191.jkrzyszt@tis.icnet.pl>

On 04/09/2011 05:10 PM, Janusz Krzysztofik wrote:
> (CC: Jiri Slaby, the author of the problematic change; truncate subject)
> 
> On Sat, 09 Apr 2011, at 09:16:24, Russell King - ARM Linux wrote:
>> On Sat, Apr 09, 2011 at 03:33:39AM +0200, Janusz Krzysztofik wrote:
>>> Since there were no actual problems reported before, I suppose the
>>> old code, which was passing to remap_pfn_range() a physical page
>>> number calculated from dma_alloc_coherent() privided dma_handle,
>>> worked correctly on all platforms actually using
>>> videobud-dma-config.

No, it didn't when IOMMU was used. Because remap_pfn_range didn't get a
physical page address.

>>> Now, on my ARM machine, a completely
>>> different, then completely wrong physical address, calculated as
>>> virt_to_phys(dma_alloc_coherent()), is used instead of the
>>> dma_handle, which causes the machine to hang.
>>
>> virt_to_phys(dma_alloc_coherent()) is and always has been invalid,
>> and will break on several architectures apart from ARM.

Yes, the fix is broken for some archs. Feel free to revert it until it
is fixed properly.

Sound pcm mmap had a similar problem and solved that by a bit hackish
way (see snd_pcm_default_mmap).

I saw a discussion about how to sort it out in the sound subsystem and
do that in a clean manner. Maybe somebody else remembers where it was.

thanks,
-- 
js
suse labs

  reply	other threads:[~2011-04-09 16:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 11:35 [PATCH v3] SoC Camera: add driver for OMAP1 camera interface Janusz Krzysztofik
2010-10-02  6:07 ` Guennadi Liakhovetski
2010-10-02 12:45   ` Janusz Krzysztofik
2010-10-03  2:42     ` Guennadi Liakhovetski
2010-10-04 15:35       ` Janusz Krzysztofik
2011-03-23 10:00 ` Guennadi Liakhovetski
2011-03-23 16:13   ` Janusz Krzysztofik
2011-04-09  1:33   ` V4L/ARM: videobuf-dma-contig no longer works on my ARM machine (was: [PATCH v3] SoC Camera: add driver for OMAP1 camera interface) Janusz Krzysztofik
2011-04-09  7:16     ` Russell King - ARM Linux
2011-04-09 15:10       ` V4L/ARM: videobuf-dma-contig no longer works on my ARM machine Janusz Krzysztofik
2011-04-09 16:42         ` Jiri Slaby [this message]
2011-04-13 10:20           ` Janusz Krzysztofik

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=4DA08C80.5040205@suse.cz \
    --to=jslaby@suse.cz \
    --cc=g.liakhovetski@gmx.de \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox