From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/9] drm: Don't clear vblank timestamps when vblank interrupt is disabled Date: Mon, 26 May 2014 15:24:23 +0200 Message-ID: <20140526132423.GK14357@phenom.ffwll.local> References: <1401104792-26560-1-git-send-email-ville.syrjala@linux.intel.com> <1401104792-26560-4-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 8439D6E4CB for ; Mon, 26 May 2014 06:24:29 -0700 (PDT) Received: by mail-wg0-f45.google.com with SMTP id m15so7849795wgh.28 for ; Mon, 26 May 2014 06:24:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1401104792-26560-4-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, May 26, 2014 at 02:46:26PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > Clearing the timestamps causes us to send zeroed timestamps to userspace > if they get sent out in response to the drm_vblank_off(). It's better > to send the very latest timestamp and count instead. > = > Signed-off-by: Ville Syrj=E4l=E4 Do we have a kms_flip testcase which hunts for this? I guess a vblank event with a vblank sufficiently far into the future would be useful. Maybe call it vblank_cancel-vs-* or so. Besides the lack of testcase the patch is Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_irq.c | 11 ----------- > 1 file changed, 11 deletions(-) > = > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > index 7b1e08c..6fa7474 100644 > --- a/drivers/gpu/drm/drm_irq.c > +++ b/drivers/gpu/drm/drm_irq.c > @@ -56,14 +56,6 @@ > #define DRM_REDUNDANT_VBLIRQ_THRESH_NS 1000000 > = > /* > - * Clear vblank timestamp buffer for a crtc. > - */ > -static void clear_vblank_timestamps(struct drm_device *dev, int crtc) > -{ > - memset(dev->vblank[crtc].time, 0, sizeof(dev->vblank[crtc].time)); > -} > - > -/* > * Disable vblank irq's on crtc, make sure that last vblank count > * of hardware and corresponding consistent software vblank counter > * are preserved, even if there are any spurious vblank irq's after > @@ -131,9 +123,6 @@ static void vblank_disable_and_save(struct drm_device= *dev, int crtc) > smp_mb__after_atomic_inc(); > } > = > - /* Invalidate all timestamps while vblank irq's are off. */ > - clear_vblank_timestamps(dev, crtc); > - > spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); > } > = > -- = > 1.8.5.5 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch