summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2015-09-15 14:19:32 -0700
committerJani Nikula <jani.nikula@intel.com>2015-09-17 10:53:41 +0300
commiteb120ef6a3e18780e7464e7de70221d06dfe5845 (patch)
tree5b72fe3b80092394379adfe44efc4323fa8207e5 /drivers/gpu/drm/i915/intel_sprite.c
parentd9072a3e80bd0f2e95d6a452987899039ba808ed (diff)
downloadop-kernel-dev-eb120ef6a3e18780e7464e7de70221d06dfe5845.zip
op-kernel-dev-eb120ef6a3e18780e7464e7de70221d06dfe5845.tar.gz
drm/i915: add more debug info for when atomic updates fail v3
I used these additional fields to track down the issue I saw on HSW. v2: move debug fields into a substruct (Ville) v3: clean up debug code more (Ville) References: https://bugs.freedesktop.org/show_bug.cgi?id=91579 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 4d27243..7de121d 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -95,7 +95,6 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
max = vblank_start - 1;
local_irq_disable();
- crtc->start_vbl_count = 0;
if (min <= 0 || max <= 0)
return;
@@ -134,11 +133,15 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
drm_crtc_vblank_put(&crtc->base);
- crtc->start_vbl_time = ktime_get();
- crtc->start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
+ crtc->debug.min_vbl = min;
+ crtc->debug.max_vbl = max;
+ crtc->debug.scanline_start = scanline;
+ crtc->debug.start_vbl_time = ktime_get();
+ crtc->debug.start_vbl_count =
+ dev->driver->get_vblank_counter(dev, pipe);
trace_i915_pipe_update_vblank_evaded(crtc, min, max,
- crtc->start_vbl_count);
+ crtc->debug.start_vbl_count);
}
/**
@@ -154,6 +157,7 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
{
struct drm_device *dev = crtc->base.dev;
enum pipe pipe = crtc->pipe;
+ int scanline_end = intel_get_crtc_scanline(crtc);
u32 end_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
ktime_t end_vbl_time = ktime_get();
@@ -161,10 +165,15 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
local_irq_enable();
- if (crtc->start_vbl_count && crtc->start_vbl_count != end_vbl_count)
- DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u) time %lld us\n",
- pipe_name(pipe), crtc->start_vbl_count, end_vbl_count,
- ktime_us_delta(end_vbl_time, crtc->start_vbl_time));
+ if (crtc->debug.start_vbl_count &&
+ crtc->debug.start_vbl_count != end_vbl_count) {
+ DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u) time %lld us, min %d, max %d, scanline start %d, end %d\n",
+ pipe_name(pipe), crtc->debug.start_vbl_count,
+ end_vbl_count,
+ 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);
+ }
}
static void
OpenPOWER on IntegriCloud