From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
Jani Nikula <jani.nikula@linux.intel.com>,
Dave Airlie <airlied@redhat.com>, Jens Axboe <axboe@kernel.dk>,
Linus Torvalds <torvalds@linux-foundation.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH] drm/i915: Make vblank evade warnings optional
Date: Mon, 8 May 2017 09:26:00 +0200 [thread overview]
Message-ID: <20170508072600.ebvt2jbstf366dab@phenom.ffwll.local> (raw)
In-Reply-To: <20170507171252.5149-1-ville.syrjala@linux.intel.com>
On Sun, May 07, 2017 at 08:12:52PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add a new Kconfig option to enable/disable the extra warnings
> from the vblank evade code. For now we'll keep the warning
> about an actually missed vblank always enabled as that can have
> an actual user visible impact. But if we miss the deadline
> othrwise there's no real need to bother the user with that.
> We'll want these warnings enabled during development however
> so that we can catch regressions.
>
> Based on the reports it looks like this is still very easy
> to hit on SKL, so we have more work ahead of us to optimize
> the crtiical section further.
>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reported-by: Jens Axboe <axboe@kernel.dk>
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Fixes: e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 13 +++++++++++++
> drivers/gpu/drm/i915/intel_sprite.c | 7 +++++--
> 2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index e091809a9a9e..49db32fa6524 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -87,3 +87,16 @@ config DRM_I915_LOW_LEVEL_TRACEPOINTS
> and also analyze the request dependency resolving timeline.
>
> If in doubt, say "N".
> +
> +config DRM_I915_DEBUG_VBLANK_EVADE
> + bool "Enable extra debug warnings for vblank evasion"
> + depends on DRM_I915
> + default n
> + help
> + Choose this option to turn on extra debug warnings for the
> + vblank evade mechanism. This gives a warning every time the
> + the deadline allotted for the vblank evade critical section
> + is exceeded, even if there isn't an actual risk of missing
> + the vblank.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index f7d431427115..8c87c717c7cd 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -198,12 +198,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
> ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
> crtc->debug.min_vbl, crtc->debug.max_vbl,
> crtc->debug.scanline_start, scanline_end);
> - } else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
> - VBLANK_EVASION_TIME_US)
> + }
> +#ifdef CONFIG_DRM_I915_DEBUG_VBLANK_EVADE
> + else if (ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time) >
> + VBLANK_EVASION_TIME_US)
> DRM_WARN("Atomic update on pipe (%c) took %lld us, max time under evasion is %u us\n",
> pipe_name(pipe),
> ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
> VBLANK_EVASION_TIME_US);
> +#endif
> }
>
> static void
> --
> 2.10.2
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2017-05-08 7:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 3:44 [git pull] drm pull for v4.12 Dave Airlie
2017-05-06 20:02 ` Linus Torvalds
2017-05-07 12:33 ` Daniel Vetter
2017-05-07 17:12 ` [PATCH] drm/i915: Make vblank evade warnings optional ville.syrjala
2017-05-07 17:46 ` Jens Axboe
2017-05-07 17:56 ` Daniel Vetter
2017-05-08 1:52 ` Jens Axboe
2017-05-08 7:25 ` Daniel Vetter
2017-05-08 15:19 ` Jens Axboe
2017-05-08 7:26 ` Daniel Vetter [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=20170508072600.ebvt2jbstf366dab@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--cc=axboe@kernel.dk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--cc=ville.syrjala@linux.intel.com \
/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).