My Xserver (kdrive, Xfbdev) driver loops too quickly
Adam Jackson
ajax at nwnk.net
Mon Jun 26 08:18:39 PDT 2006
On Sunday 25 June 2006 19:39, Orkie wrote:
> I do have a theory as to why this may be the case. Xserver as far as I can
> tell, is designed to sit and wait for mouse data (since most mice only send
> data when there is something to send) from the device file. However, since
> GPIO (the device file you read GP2X control data from) always has data, it
> keeps looping too quickly when normally, it would be waiting for data,
> casuing the server to take over the CPU (it runs at 99% CPU usage when
> nothing else is doing anything, but can only get down to around 40% even if
> other programs need the processor time more). I could be completely wrong
> about the cause of the problem of course.
No, I think you're right. If there's no way to get an interrupt out of the
hardware when the buttons are pressed, then you'll probably want to change
your driver to just poll periodically. Check out the timer code in
os/WaitFor.c, and pick a polling frequency that you can live with.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060626/58beb6dc/attachment.pgp>
More information about the xorg
mailing list