[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTik53zyXytvuAd5zK0_zExfQT3FmOgTr8BexmGeT@mail.gmail.com>
Date: Fri, 21 Jan 2011 13:03:22 -0800
From: Dima Zavin <dmitriyz@...gle.com>
To: Saravana Kannan <skannan@...eaurora.org>
Cc: Nicolas Pitre <nicolas.pitre@...aro.org>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
linux-sh@...r.kernel.org,
Ben Herrenschmidt <benh@...nel.crashing.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
linux-kernel@...r.kernel.org, Paul Mundt <lethal@...ux-sh.org>,
Ben Dooks <ben-linux@...ff.org>,
"Uwe Kleine-K??nig" <u.kleine-koenig@...gutronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Jeremy Kerr <jeremy.kerr@...onical.com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: Locking in the clk API
On Thu, Jan 20, 2011 at 8:12 PM, Saravana Kannan <skannan@...eaurora.org> wrote:
> On 01/20/2011 06:06 PM, Dima Zavin wrote:
>> Here's a better one.
>>
>> Many devices use serial display panels sitting on either MDDI or MIPI
>> links. The interface clocks need to be on, but they stay in low-power
>> mode while the display is on. The display controller however does not
>> need to be on since the serial panels typically have a local
>> framebuffer that does the idle panel refresh on it's own. When a new
>> frame comes in to be displayed, you need to clock on the display
>> controller, DMA the data to the panel, and when it's done turn the
>> controller off. The clk_enable may or may not happen at irq context,
>> depending on whether or not you are starting the DMA from a
>> vsync/tear-effect irq or simply from the screen_update() function. The
>> clk_disable will most certainly happen from the DMA_DONE irq.
>
> Why do we need to turn on the clock in the IRQ? Why not defer it to a
> workqueue (or whatever is the method of the day to defer work from an IRQ)?
> The advantage of doing the clk_enable in the IRQ should be negligible
> compared to the time it takes to do the DMA.
Because in an interactive system running at 60fps, you only have 16ms
budget per frame. During the blanking interval when you receive the
IRQ you need to immediately start the DMA. If you defer to a workqueue
and schedule you are practically guaranteeing to never run at 60fps
(more like 30 if you are consistently late, which you would with that
kind of timing and even a mildly busy system).
--Dima
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists