All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org,
	linux-fbdev-devel@lists.sourceforge.net, adaplas@gmail.com,
	linux-arm-kernel@lists.arm.linux.org.uk,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 2/4 v4] i.MX31: Image Processing Unit DMA and IRQ drivers
Date: Tue, 23 Dec 2008 15:03:20 +0100	[thread overview]
Message-ID: <20081223140320.GH1614@pengutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0812231359030.5188@axis700.grange>

On Tue, Dec 23, 2008 at 02:14:12PM +0100, Guennadi Liakhovetski wrote:
> On Tue, 23 Dec 2008, Sascha Hauer wrote:
> 
> > On Tue, Dec 23, 2008 at 12:21:54PM +0100, Guennadi Liakhovetski wrote:
> > > Hi Sascha
> > > 
> > > On Tue, 23 Dec 2008, Sascha Hauer wrote:
> > > 
> > > > On Mon, Dec 22, 2008 at 09:10:03PM +0100, Guennadi Liakhovetski wrote:
> > > > > 
> > > > > Ok, so, what would we like to have there? We agree that the proper way to 
> > > > > serve them is a irq-chip driver, right?
> > > > 
> > > > In case of the *_EOF interrupts when they can be used outside the idmac
> > > > driver then yes. If not then not for the reasons I explained.
> > > 
> > > Wait a minute, are you suggesting to handle interrupts that are exported 
> > > to client drivers and that are "internal" to ipu_idmac differently? Like 
> > > exported once - properly using the irq chip machinery, and internal once 
> > > just demux in the driver hiding them from the kernel?... Or have I 
> > > misunderstood you? If this is indeed what you mean, then that doesn't 
> > > sound like a good idea to me, sorry. Like you configure a chained handler, 
> > > then when it is called on an IRQ, you check if the reason is bits 0, 1, or 
> > > 2 you call generic_handle_irq(), for other bits you handle them 
> > > internally... grrrr... 
> > 
> > I'm not suggesting that. The *_EOF registers are all 32 bits on the *same*
> > register. And these 32 interrupts are inherently occupied by ipu_idmac.c
> > as you cannot request a idmac channel without requesting this interrupt.
> > So at the moment you are passing 32 bits of the same register through a
> > chained interrupt handler and *all* these interrupts go to the very same
> > interrupt handler.
> > For the corresponding 32 error interrupts it's probably also the idmac
> > engine that has to react to these interrupts, not the drivers using it.
> > Not sure about the remaining assorted interrupts.
> 
> Yes, I understand that. So, you're suggesting to put all EOF interrupts 
> under 1 irq-number. Just for example: now I have
> 
> 167:        351     ipu_irq  idmac
> 174:        752     ipu_irq  idmac
> 175:          0     ipu_irq  idmac
> 230:          1     ipu_irq  csi
> 
> where 167 - camera IRQs, 174 - framebuffer (panning), 175 - overlay (ok, 
> this one will go), 230 - CSI_EOF from IPU_INT_STAT_3 (ok, it is not used 
> ATM, can go too).
> 
> So, there are at least two valid users of EOF interrupts. 

No, there are no two users, there is *one* user, namely idmac, as
the output from /proc/interrupts clearly shows. The users are *not* the
client drivers but the idmac code.

Hm, what else can I say that you understand what I mean?

Why would you dispatch one physical interrupt to 32 interrupts (only
counting the *_EOF irqs) which all lead back to the same interrupt handler?

The client drivers are not interested in the interrupts, only the idmac
code is. Even if they were, you provided a callback function for this
case in your idmac interrupt handling code:

+	if (done && (desc->txd.flags & DMA_PREP_INTERRUPT) && callback)
+		callback(callback_param);



> And you're 
> suggesting to put them on one interrupt, and even not as a shared IRQ with 
> two handlers - one interrupt with one handler with multiple sources / 
> users behind it... What likely will happen someone will add support for 
> YUV / RGB cameras and will want to use hardware processing for them, like 
> encoding and / or rotation, which will add DMA channels DMAIC_0, DMAIC_8, 
> DMAIC_6, DMAIC_10...

Who is going to handle these channels along with the interrupts? Right,
ipu_idmac.c.


> and you want to put them all on one IRQ?... What we 
> could improve in the above /proc/interrupts output is register interrupts 
> with different names to make distinguishing them easier.

No, the output of /proc/interrupts shows the correct situation. You can
take this as a hint for what is going wrong here.

> But I really 
> would not like to put them all together.
> 
> > > This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
> > > displays, overlay support is included but has never been tested.
> > 
> > No, it's not working. The overlay framebuffer maybe there, but it's
> > configured to be invisible.
> 
> Good, will remove it then.
> 
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2008-12-23 14:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 13:26 [PATCH 0/4 v4] i.MX31: dmaengine and framebuffer drivers Guennadi Liakhovetski
2008-12-18 13:26 ` [PATCH 1/4 v4] dmaengine: add async_tx_clear_ack() macro Guennadi Liakhovetski
2008-12-18 13:26 ` [PATCH 2/4 v4] i.MX31: Image Processing Unit DMA and IRQ drivers Guennadi Liakhovetski
2008-12-18 22:58   ` Sascha Hauer
2008-12-22 11:56     ` Guennadi Liakhovetski
2008-12-22 18:37       ` Sascha Hauer
2008-12-22 20:03         ` Robert Schwebel
2008-12-22 20:03           ` Robert Schwebel
2008-12-23 10:09           ` Dmitry Krivoschekov
2008-12-23 10:52             ` Sascha Hauer
2008-12-23 11:32               ` Dmitry Krivoschekov
2008-12-23 12:08                 ` Sascha Hauer
2008-12-23 11:32               ` Dmitry Krivoschekov
2008-12-22 20:10         ` Guennadi Liakhovetski
2008-12-23 10:50           ` Sascha Hauer
2008-12-23 11:21             ` Guennadi Liakhovetski
2008-12-23 12:50               ` Sascha Hauer
2008-12-23 13:14                 ` Guennadi Liakhovetski
2008-12-23 14:03                   ` Sascha Hauer [this message]
2008-12-23 14:55                     ` Guennadi Liakhovetski
2008-12-23 16:09                       ` Sascha Hauer
2008-12-23 16:33                         ` Guennadi Liakhovetski
2008-12-23 17:14                           ` Sascha Hauer
2008-12-23 17:14                             ` Sascha Hauer
2008-12-23 12:13             ` Robert Schwebel
2008-12-23 12:13               ` Robert Schwebel
2008-12-23 12:45               ` Guennadi Liakhovetski
2008-12-23 12:56                 ` Sascha Hauer
2008-12-23 12:56             ` Valentin Longchamp
2008-12-23 12:56               ` Valentin Longchamp
2008-12-18 13:26 ` [PATCH 3/4 v4] i.MX31: framebuffer driver Guennadi Liakhovetski
2008-12-18 13:27 ` [PATCH 4/4 v4] i.MX31: platform bindings and initialisation for IPU and framebuffer drivers Guennadi Liakhovetski

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=20081223140320.GH1614@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=adaplas@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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 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.