From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: Geert Uytterhoeven
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux-sh list <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/5] i2c: sh_mobile: add DMA support
Date: Mon, 15 Dec 2014 20:18:04 +0530 [thread overview]
Message-ID: <20141215144804.GR16827@intel.com> (raw)
In-Reply-To: <4201209.QyaBUSHXat@avalon>
On Mon, Dec 15, 2014 at 11:42:46AM +0200, Laurent Pinchart wrote:
> Hi Vinod,
>
> On Monday 15 December 2014 14:43:14 Vinod Koul wrote:
> > On Mon, Dec 15, 2014 at 09:31:01AM +0100, Geert Uytterhoeven wrote:
> > > Please let me summarize...
> >
> > Thanks :)
> >
> > > During probe of a DMA client driver, the DMA engine driver may not be
> > > available, causing dma_request_slave_channel*() to return -EPROBE-DEFER.
> > > There are actually two different reasons that the DMA engine driver may
> > > not be available:
> > >
> > > 1. The DMA engine driver hasn't been initialized yet, due to probe order.
> > > This is more likely to happen with i2c client drivers, as they are
> > > initialized from subsys_initcall() instead of module_init() (E.g. I
> > > never saw it with the spi-rspi driver).
> > > => The DMA client driver wants to return -EPROBE_DEFER too, and
> > > retry later.
> > >
> > > 2. The DMA engine driver is not included in the kernel build.
> > > => The DMA client driver wants to fall back to PIO.
> > >
> > > Now, how to distinguish between the two cases above?
> >
> > Quite right, this is a good question. Today we cannot distinguish between
> > the two. Should we improve the deferred probe to tell us when the init is
> > complete and all the modules have been initialized?
>
> I don't think that's possible, as you can never know when a module will be
> loaded.
In a production system it is quite reasonable to assume that usermode will
find all the modules available for the devices detected and insert them post
boot within a reasonable amount of time.
> > If we ever have such a mechanism to check then we know no modules are to be
> > inserted then we can fall back to PIO mode. Without that we should use some
> > timeout counter to fall back on, say try requesting 5 times and give up and
> > move to PIO after that
>
> That could be a performance improvement, but I wonder whether it's worth it.
> If DT specifies DMA channels for the I2C controller, and the DMA core is
> compiled in, and the DMA engine driver is compiled as a module and never
> loaded, then yes, there will be a small overhead for each I2C transaction, but
> I'd argue that such a combination of conditions is asking for trouble anyway
> :-)
Yes that is quite reasonable. For a proper production system it should be a
fair assumption that drivers for hardware available should be available and if
not possibly a buggy configuration which must be fixed anyway.
--
~Vinod
next prev parent reply other threads:[~2014-12-15 14:48 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 10:11 [PATCH 0/5] i2c: sh_mobile: add DMA support Wolfram Sang
2014-11-07 10:11 ` [PATCH 1/5] i2c: sh_mobile: sort includes alphabetically Wolfram Sang
2014-11-12 16:10 ` Wolfram Sang
2014-11-07 10:11 ` [PATCH 2/5] i2c: sh_mobile: add DMA support Wolfram Sang
2014-11-12 16:11 ` Wolfram Sang
2014-12-09 10:53 ` Geert Uytterhoeven
2014-12-09 14:09 ` Wolfram Sang
2014-12-10 5:44 ` Magnus Damm
2014-12-10 8:01 ` Wolfram Sang
2014-12-10 14:19 ` Laurent Pinchart
2014-12-10 14:23 ` Wolfram Sang
2014-12-11 5:02 ` Vinod Koul
2014-12-11 7:37 ` Wolfram Sang
2014-12-11 7:47 ` Laurent Pinchart
2014-12-11 8:28 ` Wolfram Sang
2014-12-11 21:42 ` Laurent Pinchart
2014-12-11 21:47 ` Wolfram Sang
2014-12-11 21:52 ` Laurent Pinchart
2014-12-12 11:07 ` Wolfram Sang
2014-12-15 6:43 ` Vinod Koul
2014-12-15 8:31 ` Geert Uytterhoeven
2014-12-15 9:06 ` Wolfram Sang
2014-12-15 9:32 ` Geert Uytterhoeven
2014-12-15 9:13 ` Vinod Koul
[not found] ` <20141215091314.GQ16827-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-15 9:42 ` Laurent Pinchart
2014-12-15 14:48 ` Vinod Koul [this message]
2014-12-15 9:45 ` Wolfram Sang
2014-12-15 14:50 ` Vinod Koul
2014-11-07 10:11 ` [PATCH 3/5] i2c: sh_mobile: improve success message Wolfram Sang
2014-11-12 16:12 ` Wolfram Sang
2014-11-13 0:27 ` Simon Horman
2014-11-07 10:11 ` [PATCH 4/5] ARM: shmobile: r8a7790: add DMA nodes for IIC Wolfram Sang
2014-11-13 0:26 ` Simon Horman
2014-11-07 10:11 ` [PATCH 5/5] ARM: shmobile: r8a7791: " Wolfram Sang
2014-11-13 0:26 ` Simon Horman
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=20141215144804.GR16827@intel.com \
--to=vinod.koul-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).