Message ID | 1400093477-3217-4-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, May 14, 2014 at 08:51:05PM +0200, Daniel Vetter wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > If there's a blocking vblank wait in progress while the vblank interrupt > gets disabled, the current code will just let the vblank wait time out. > Instead make it return immediately when vblank interrupts get disabled. Can this even happen? drm_wait_vblank() takes a vblank reference earlier and drops it right before returning. But perhaps this will become obvious since from a quick peek some of the subsequent patches seem like they will make it possible to force VBLANK off? Thierry
On Wed, May 21, 2014 at 01:20:55PM +0200, Thierry Reding wrote: > On Wed, May 14, 2014 at 08:51:05PM +0200, Daniel Vetter wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > If there's a blocking vblank wait in progress while the vblank interrupt > > gets disabled, the current code will just let the vblank wait time out. > > Instead make it return immediately when vblank interrupts get disabled. > > Can this even happen? drm_wait_vblank() takes a vblank reference earlier > and drops it right before returning. But perhaps this will become > obvious since from a quick peek some of the subsequent patches seem like > they will make it possible to force VBLANK off? Ah, it seems like drm_vblank_off() can already do exactly that, in which case this makes sense: Reviewed-by: Thierry Reding <treding@nvidia.com>
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 90c59a8c820f..13d671ed3421 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1189,6 +1189,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data, DRM_WAIT_ON(ret, dev->vblank[crtc].queue, 3 * HZ, (((drm_vblank_count(dev, crtc) - vblwait->request.sequence) <= (1 << 23)) || + !dev->vblank[crtc].enabled || !dev->irq_enabled)); if (ret != -EINTR) {