dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	stable@vger.kernel.org,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Szyprowski, Marek" <m.szyprowski@samsung.com>
Subject: Re: [PATCH] drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug
Date: Thu, 16 Nov 2017 18:14:06 +0200	[thread overview]
Message-ID: <20171116161406.GU10981@intel.com> (raw)
In-Reply-To: <CA+M3ks7qeJPSdvc9CcfJdJMkEVnx7xPpD8xJdhNsEt9nW8LpPg@mail.gmail.com>

On Thu, Nov 16, 2017 at 03:19:35PM +0100, Benjamin Gaignard wrote:
> 2017-10-30 10:19 GMT+01:00 Daniel Vetter <daniel@ffwll.ch>:
> > On Tue, Oct 24, 2017 at 11:01:32AM +0200, Benjamin Gaignard wrote:
> >> 2017-10-23 17:25 GMT+02:00 Ville Syrjala <ville.syrjala@linux.intel.com>:
> >> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> >
> >> > Since commit 632c6e4edef1 ("drm/vblank: Fix flip event vblank count")
> >> > even drivers that don't implement accurate vblank timestamps will end
> >> > up using drm_crtc_accurate_vblank_count(). That leads to a WARN every
> >> > time drm_crtc_arm_vblank_event() gets called. The could be as often
> >> > as every frame for each active crtc.
> >> >
> >> > Considering drm_crtc_accurate_vblank_count() is never any worse than
> >> > the drm_vblank_count() we used previously, let's just skip the WARN
> >> > unless DRM_UT_VBL is enabled. That way people won't be bothered by
> >> > this unless they're debugging vblank code. And let's also change it
> >> > to WARN_ONCE() so that even when you're debugging vblank code you
> >> > won't get drowned by constant WARNs.
> >> >
> >> > Cc: stable@vger.kernel.org
> >> > Cc: Daniel Vetter <daniel@ffwll.ch>
> >> > Cc: "Szyprowski, Marek" <m.szyprowski@samsung.com>
> >> > Cc: Andrzej Hajda <a.hajda@samsung.com>
> >> > Reported-by: Andrzej Hajda <a.hajda@samsung.com>
> >> > Fixes: 632c6e4edef1 ("drm/vblank: Fix flip event vblank count")
> >> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>
> >> I have tested it on sti and stm driver, it fix the problem, thanks.
> >>
> >> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> >>
> >> > ---
> >> >  drivers/gpu/drm/drm_vblank.c | 4 ++--
> >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> >> > index 13722c373a6a..c81c297995c6 100644
> >> > --- a/drivers/gpu/drm/drm_vblank.c
> >> > +++ b/drivers/gpu/drm/drm_vblank.c
> >> > @@ -299,8 +299,8 @@ u32 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
> >> >         u32 vblank;
> >> >         unsigned long flags;
> >> >
> >> > -       WARN(!dev->driver->get_vblank_timestamp,
> >> > -            "This function requires support for accurate vblank timestamps.");
> >> > +       WARN_ONCE(drm_debug & DRM_UT_VBL && !dev->driver->get_vblank_timestamp,
> >> > +                 "This function requires support for accurate vblank timestamps.");
> >
> > Somewhat a bikeshed, but if we e.g. enable debugging in a CI or piglit
> > run, then this could change the results. I'd go with a if ()
> > DRM_DEBUG_VBLANK. Either way:
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> 
> Does something is missing to merge this fix in drm-misc ?
> Without it I got warning at each frame.

Pushed... 9 days ago it seems.

-- 
Ville Syrjälä
Intel OTC

      reply	other threads:[~2017-11-16 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171010133338epcas4p3860854878d180c8fae89d9072fcf76be@epcas4p3.samsung.com>
2017-10-10 13:33 ` [PATCH] drm/vblank: Fix flip event vblank count Ville Syrjala
2017-10-12 15:20   ` Ville Syrjälä
2017-10-18  7:07   ` Andrzej Hajda
2017-10-18 13:50     ` Ville Syrjälä
2017-10-18 14:32       ` Daniel Vetter
2017-10-23 15:25     ` [PATCH] drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug Ville Syrjala
2017-10-24  9:01       ` Benjamin Gaignard
2017-10-30  9:19         ` Daniel Vetter
2017-11-16 14:19           ` Benjamin Gaignard
2017-11-16 16:14             ` Ville Syrjälä [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171116161406.GU10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=m.szyprowski@samsung.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).