On Tue, 2007-06-12 at 19:04 +0200, Michel Dänzer wrote: > On Tue, 2007-06-12 at 09:40 -0700, Jesse Barnes wrote: > > On Monday, June 11, 2007 11:59:23 Michel Dänzer wrote: > > > On Mon, 2007-06-11 at 15:20 -0700, Jesse Barnes wrote: > > > > > > > > @@ -313,14 +313,14 @@ irqreturn_t > > > > i915_driver_irq_handler(DRM_IRQ_ARGS) > > > > (DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B)) > > > > == (DRM_I915_VBLANK_PIPE_A | > > > > DRM_I915_VBLANK_PIPE_B)) { > > > > if (temp & VSYNC_PIPEA_FLAG) > > > > - atomic_inc(&dev->vbl_received); > > > > + atomic_inc(&dev->vblank_count[0]); > > > > if (temp & VSYNC_PIPEB_FLAG) > > > > - atomic_inc(&dev->vbl_received2); > > > > + atomic_inc(&dev->vblank_count[1]); > > > > } else if (((temp & VSYNC_PIPEA_FLAG) && > > > > (vblank_pipe & DRM_I915_VBLANK_PIPE_A)) || > > > > ((temp & VSYNC_PIPEB_FLAG) && > > > > (vblank_pipe & DRM_I915_VBLANK_PIPE_B))) > > > > - atomic_inc(&dev->vbl_received); > > > > + atomic_inc(&dev->vblank_count[0]); > > > > > > > > DRM_WAKEUP(&dev->vbl_queue); > > > > drm_vbl_send_signals(dev); > > > > > > Maybe this should use i915_get_vblank_counter() instead of just > > > incrementing, in case e.g. an interrupt is missed. > > > > Yeah, that's a good idea. And I think it could simplify this logic a > > bit? > > Hmm yeah, I guess you could just update both counters unconditionally.
Or maybe not - the purpose of the logic is that when the X driver has only enabled the vblank interrupt for one pipe, it is always treated as primary no matter which pipe it is. Maybe that would need to be handled within i915_get_vblank_counter() though. -- 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