From: "Michel Dänzer" <michel@tungstengraphics.com>
To: linux-kernel@vger.kernel.org
Cc: dri-devel@lists.sourceforge.net
Subject: Tasklet usage in the DRM
Date: Fri, 29 Jun 2007 09:09:02 +0200 [thread overview]
Message-ID: <1183100942.3289.296.camel@thor.sulgenrain.local> (raw)
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
next reply other threads:[~2007-06-29 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 7:09 Michel Dänzer [this message]
2007-06-29 12:04 ` Daniel Walker
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=1183100942.3289.296.camel@thor.sulgenrain.local \
--to=michel@tungstengraphics.com \
--cc=dri-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®