lkml.org 
[lkml]   [2011]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Locking in the clk API
From
On Thu, Jan 20, 2011 at 8:12 PM, Saravana Kannan <skannan@codeaurora.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


\
 
 \ /
  Last update: 2011-01-21 22:05    [W:0.113 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site