Thread (26 messages) 26 messages, 5 authors, 2005-03-16

Re: [patch] radeonfb: FB_WAITFORVSYNC implementation

From: Torgeir Veimo <hidden>
Date: 2005-03-16 01:28:58

On Sun, 2005-03-13 at 10:30 +1100, Benjamin Herrenschmidt wrote:
On Sat, 2005-03-12 at 14:06 +0000, Torgeir Veimo wrote:
quoted
This is an implementation of the FB_WAITFORVSYNC ioctl for the radeonfb.
A small test application is attached at the end. This patch is against
vanilla 2.6.11. 
The patch definitely needs a lot of cleanups. A few things are wrong
too, like using test_and_set_* as a mean of locking. This doesn't work
on relaxed ordering architectures.

Besides, the entire fbdev subsystem is protected by the console
semaphore, so you shouldn't need anything else. You need to acquire it
yourself in the driver ioctl() routine though.

In order to avoid conflicting with other apps, you should probably
"abort" the operation if a console switch happens while you are waiting.
That is, a set_var() and/or a blank(). Return -EINTR or something like
that.
Do you have any example code I can look at for this? From what I can see
neither the atyfb or matroxfb drivers do this. Not that I'm claiming
they're correct, I guess the current vanilla kernel source is a bit
behind the latest and greatest fb development. 

-- 
Torgeir Veimo [off-list ref]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help