documentation on intel driver behavior?
Eric Anholt
eric at anholt.net
Wed Feb 27 16:55:31 PST 2008
On Wed, 2008-02-27 at 19:44 -0500, Dan B. Phung wrote:
> Where can I find documentation on the intel drivers? I've started to
> browse the immense hardware documentation from the
> intellinuxgraphics.org website, but trying to go from that documentation
> to reading the driver code is somewhat daunting...
The documentation is the code and the comments in the code. Some places
are lacking in useful comments, but I regard that as a bug.
> a more immediate/concrete question I have is, how does the driver know
> when a frame has finished rendering and has displayed that frame on the
> screen (e.g. when glFinish() returns)? Is it assumed that when the
> driver returns from i915_driver_vblank_do_wait(), the frame has been
> rendered? It's these expectations of driver/hardware behavior that I'm
> trying to understand.
>
> I've tried tracing the code with printk's, but as you can
> imagine...that's somewhat tedious. I've also loaded the module with
> 'drm debug=1' and set
> #define DRM_DEBUG_CODE 2
>
> but...some pointers would really help...
If vblank syncing is not enabled, we just flush the batchbuffer and drop
a fence in copybuffers. Before emitting another copy, we wait on an
existing frame fence so that we don't get too far ahead of the hardware.
For vblank syncing, we wait for vblank before emitting that copy. Note
that we're not doing anything about guaranteeing that that copy happens
in any set amount of time. We just assume that the hardware will get to
it fast enough (and that we were woken up to do this soon enough) that
no tearing occurs.
If you wanted to know when that copy actually landed, you would glFinish
after glXSwapBuffers (and glFinish would wait on the last rendering
which you had done, i.e. the copy). But glFinish isn't about frame
finishing, it's about all outstanding hardware rendering.
--
Eric Anholt anholt at FreeBSD.org
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080227/7674e13e/attachment.pgp>
More information about the xorg
mailing list