On Fri, 2007-05-04 at 14:47 -0700, Jesse Barnes wrote:
> In playing around yesterday, we found that some drivers will 
> unnecessarily enable interrupts for vblank events.  Since these tend to 
> happen frequently (60+ Hz), they'll cause your CPU to wake up a lot, 
> which will waste power if they're not really in use.
> 
> This patch hacks the radeon driver to only enable vblank interrupts when 
> the user is waiting for one, rather than at IRQ setup time.  I couldn't 
> find any code in the DDX that wanted vblank support, so I suppose the 
> real users are in the Mesa driver somewhere, so I haven't tested it 
> other than to see that my interrupt frequency really does decrease.
> 
> Comments?

I suspect doing it like this might break userspace expectations about
the behaviour of the vblank counter. It would be better to do it
similarly to how Eric Anholt did it for i915, i.e. by toggling the
vblank interrupt in the 2D driver TransitionTo2/3D hooks. Or possibly
even better (as this would e.g. still leave it enabled all the time when
using a GLX compositing manager), the 3D driver could tell the DRM
whether it needs the vblank interrupt or not.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to