On Tuesday, June 12, 2007 10:58:24 Keith Packard wrote: > On Tue, 2007-06-12 at 19:23 +0200, Michel Dänzer wrote: > > That would mean one register read sequence per waiter per interrupt > > whereas otherwise it's one read sequence per CRTC (which is enabled > > and has waiters) per interrupt. Looks like the latter can be made > > to be more efficient. > > So, just so I understand the basic control flow: > > wait_for_vblank (crtc, seq) > { > enable_irq (crtc) > while ((seq - crtc->current_seq) < 0) > block (); > disable_irq (crtc) > } > > enable_irq (crtc) > { > if (enable_count++ == 0) { > set_interrupts_enabled (crtc); > crtc->current_seq = read_frame_count (crtc) > } > } > > disable_irq (crtc) > { > if (--enable_count == 0) > set_interrupts_disabled (crtc); > } > > irq () > { > if (status & interrupt_crtc0) > crtc0->current_seq = read_frame_count (crtc0); > if (status & interrupt_crtc1) > crtc1->current_seq = read_frame_count (crtc1); > wakeup (); > }
This looks good, but like Michel said, if only one pipe's vblank is enabled, only the primary vblank counter should be updated (regardless of *which* vblank count is enabled). But maybe that can be done at a higher level, or maybe we can change that behavior and just make things per-crtc as I've done with most of the code. Jesse ------------------------------------------------------------------------- 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