On Wed, 2007-05-09 at 12:33 +0200, Michel Dänzer wrote:
> 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.

Yeah, I wasn't sure if the 3D driver would be able to know easily when
it might need to wait on an absolute vblank.  Arjan suggested that we
not turn off the vblank when 3d is running until nobody's waited one one
for (for example) a second, and then if someone waits on one after that,
the kernel can re-enable the interrupt and extrapolate the vblank
counter using the system clock.  Hiding vblank enable/disable knowledge
in the kernel sounds nicer than what I did on i915.

Eric Anholt                             [EMAIL PROTECTED]
[EMAIL PROTECTED]                         [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

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.
Dri-devel mailing list

Reply via email to