From: Vincent Abriou Subject: [PATCH 1/1] drm: fix drm_update_vblank_count for software vblank counter Date: Wed, 30 Sep 2015 14:29:49 +0200 Message-ID: <1443616189-8286-1-git-send-email-vincent.abriou@st.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0555326141==" Return-path: Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6B116EB91 for ; Wed, 30 Sep 2015 05:31:01 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Fabien Dessenne , Benjamin Gaignard List-Id: dri-devel@lists.freedesktop.org --===============0555326141== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Drivers with software vblank counter relies on the on drm core to update vblank counter and they should not be concern about the warning that check hardware counter coherency. Further, the generic message that tracks the current and last counter values must be counter type (hardware or software) agnostic. Cc: Ville Syrj=E4l=E4 Signed-off-by: Vincent Abriou --- drivers/gpu/drm/drm_irq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 88fbee4..88041b4 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -219,11 +219,12 @@ static void drm_update_vblank_count(struct drm_devi= ce *dev, unsigned int pipe, } else { /* some kind of default for drivers w/o accurate vbl timestamping */ diff =3D (flags & DRM_CALLED_FROM_VBLIRQ) !=3D 0; + if (diff =3D=3D 0) + return; } =20 - DRM_DEBUG("updating vblank count on crtc %u:" - " current=3D%u, diff=3D%u, hw=3D%u hw_last=3D%u\n", - pipe, vblank->count, diff, cur_vblank, vblank->last); + DRM_DEBUG("updating vblank count on crtc %u: diff=3D%u cur=3D%u last=3D= %u\n", + pipe, diff, cur_vblank, vblank->last); =20 if (diff =3D=3D 0) { WARN_ON_ONCE(cur_vblank !=3D vblank->last); --=20 1.9.1 --===============0555326141== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0555326141==--