lkml.org 
[lkml]   [2007]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectTasklet usage in the DRM
FromMichel Dänzer <>
DateFri, 29 Jun 2007 09:09:02 +0200
I just read an article on LWN's kernel page about plans to remove
tasklets, and I thought I'd explain what the DRM is using tasklets for.
Maybe there's other ways to satisfy the requirements equally well or
even better.


The i915 driver uses a tasklet to make sure a GL buffer swap blit or
flip takes effect (or at least starts in the case of a blit) during the
vertical blank period, to avoid tearing. I chose a tasklet for this
purpose because:

      * The traditional method of the vertical blank interrupt waking up
        the user process, which would then emit the buffer swap
        commands, didn't even come close to avoiding tearing. So I
        suspect a workqueue wouldn't cut it either.
      * The processing of scheduled buffer swaps could potentially take
        a long time, so doing it in hardirq context could cause high IRQ
        latency.
      * It requires holding the DRM lock, so the 'each tasklet can only
        run once at a time' restriction is fine.


I'm looking forward to any suggestions what to do with this in case
tasklets disappear, and I'll gladly provide further clarification on the
requirements.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-29 07:11    [from the cache]
©2003-2008