public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Marin Mitov <mitov@issp.bas.bg>
To: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	"Discussion of the Amstrad E3 emailer hardware/software"
	<e3-hacking@earth.li>
Subject: Re: [RFC] [PATCH 1/6] SoC Camera: add driver for OMAP1 camera interface
Date: Sat, 14 Aug 2010 07:47:56 +0300	[thread overview]
Message-ID: <201008140747.57140.mitov@issp.bas.bg> (raw)
In-Reply-To: <201008132113.10147.jkrzyszt@tis.icnet.pl>

On Friday, August 13, 2010 10:13:08 pm Janusz Krzysztofik wrote:
> Friday 13 August 2010 11:11:52 Marin Mitov napisał(a):
> > On Friday, August 13, 2010 11:52:41 am Guennadi Liakhovetski wrote:
> > > On Fri, 13 Aug 2010, Janusz Krzysztofik wrote:
> > > > Thursday 12 August 2010 23:38:17 Guennadi Liakhovetski napisał(a):
> > > > > 1. We've discussed this dynamic switching a bit on IRC today. The
> > > > > first reaction was - you probably should concentrate on getting the
> > > > > contiguous version to work reliably. I.e., to reserve the memory in
> > > > > the board init code similar, how other contig users currently do it.
> > > >
> > > > I already tried before to find out how I could allocate memory at init
> > > > without reinventing a new videobuf-dma-contig implementation. Since in
> > > > the Documentation/video4linux/videobuf I've read that videobuf does not
> > > > currently play well with drivers that play tricks by allocating DMA
> > > > space at system boot time, I've implemented the alternate sg path.
> > > >
> > > > If it's not quite true what the documentation says and you can give me
> > > > a hint how this could be done, I might try again.
> > >
> > > For an example look at
> > > arch/arm/mach-mx3/mach-pcm037.c::pcm037_camera_alloc_dma().
> 
> Yes, this is the solution that suffers from the already discussed limitation 
> of not being able to remap a memory with different attributes, which affects 
> OMAP1 as well.
> 
> > For preallocating dma-coherent memory for device personal use during device
> > probe() time (when the memory is less fragmented compared to open() time)
> > see also dt3155_alloc_coherent/dt3155_free_coherent in
> > drivers/staging/dt3155v4l/dt3155vfl.c (for x86 arch, I do not know if it
> > works for arm arch)
> 
> With this workaround applied, I get much better results, thank you Marin. 
> However, it seems not bullet proof, since mmap still happens to fail for a 
> reason not quite clear to me:
> 

This is just a preallocation of coherent memory kept for further private driver use, 
should not be connected to mmap problem.

> 
> Maybe I should preallocate a few more pages than will be actually used by the 
> driver?
> 
> Anyways, I'm not sure if this piece of code could be accepted for inclusion 
> into the mainline tree, perhaps only under drivers/staging.

The idea for the piece of code I have proposed to you is taken from the functions
dma_declare_coherent_memory()/dma_release_declared_memory() in mainline 
drivers/base/dma-coherent.c

> 
> Thanks,
> Janusz
> 

  reply	other threads:[~2010-08-14  4:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18  4:18 [RFC] [PATCH 0/6] Add camera support to the OMAP1 Amstrad Delta videophone Janusz Krzysztofik
2010-07-18  4:21 ` [RFC] [PATCH 1/6] SoC Camera: add driver for OMAP1 camera interface Janusz Krzysztofik
2010-07-30 11:07   ` Guennadi Liakhovetski
2010-07-30 18:49     ` Janusz Krzysztofik
2010-08-01 15:51       ` Janusz Krzysztofik
2010-08-12 21:38         ` Guennadi Liakhovetski
2010-08-13  7:24           ` Janusz Krzysztofik
2010-08-13  8:52             ` Guennadi Liakhovetski
2010-08-13  9:11               ` Marin Mitov
2010-08-13 19:13                 ` Janusz Krzysztofik
2010-08-14  4:47                   ` Marin Mitov [this message]
2010-08-14 10:28                     ` Janusz Krzysztofik
2010-08-14 17:33                   ` Guennadi Liakhovetski
2010-08-15 11:25                     ` Janusz Krzysztofik
2010-08-16 10:17                     ` Marin Mitov
2010-08-19 11:08                       ` Janusz Krzysztofik
2010-08-19 11:39                         ` Guennadi Liakhovetski
2010-08-19 12:16                           ` Marin Mitov
2010-08-19 17:09                             ` Janusz Krzysztofik
2010-08-19 17:25                               ` Marin Mitov
2010-07-18  4:23 ` [RFC] [PATCH 2/6] OMAP1: Add support for SoC " Janusz Krzysztofik
2010-07-18  4:24 ` [RFC] [PATCH 3/6] SoC Camera: add driver for OV6650 sensor Janusz Krzysztofik
2010-08-22 16:40   ` Guennadi Liakhovetski
2010-08-22 19:45     ` Janusz Krzysztofik
2010-08-22 20:30       ` Guennadi Liakhovetski
2010-08-23  0:03         ` Marek Vasut
2010-07-18  4:26 ` [RFC] [PATCH 4/6] SoC Camera: add support for g_parm / s_parm operations Janusz Krzysztofik
2010-07-18  4:27 ` [RFC] [PATCH 5/6] OMAP1: Amstrad Delta: add support for camera Janusz Krzysztofik
2010-07-18  4:29 ` [RFC] [PATCH 6/6] OMAP1: Amstrad Delta: add camera controlled LEDS trigger Janusz Krzysztofik
2010-07-20  9:49 ` [RFC] [PATCH 0/6] Add camera support to the OMAP1 Amstrad Delta videophone Guennadi Liakhovetski
2010-07-20 17:38   ` 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=201008140747.57140.mitov@issp.bas.bg \
    --to=mitov@issp.bas.bg \
    --cc=e3-hacking@earth.li \
    --cc=g.liakhovetski@gmx.de \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox