aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-19 08:58:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-19 12:39:45 +0100
commita1e37b0259e77b1db2ff2636059cd513971ca7fa (patch)
tree1031bb4e5953dbabf9a0783ca197788615673e1c /drivers
parentdrm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe (diff)
downloadlinux-dev-a1e37b0259e77b1db2ff2636059cd513971ca7fa.tar.xz
linux-dev-a1e37b0259e77b1db2ff2636059cd513971ca7fa.zip
drm/i915: Only emit the 'send bug report' once for a GPU hang
Use a locked xchg to ensure that the global log message giving instructions on how to send a bug report is emitted precisely once. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190819075835.20065-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_gpu_error.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 0c1995c66dde..52f22e88402e 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1764,7 +1764,7 @@ void i915_capture_error_state(struct drm_i915_private *i915,
return;
}
- if (!warned &&
+ if (!xchg(&warned, true) &&
ktime_get_real_seconds() - DRIVER_TIMESTAMP < DAY_AS_SECONDS(180)) {
pr_info("GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.\n");
pr_info("Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel\n");
@@ -1772,7 +1772,6 @@ void i915_capture_error_state(struct drm_i915_private *i915,
pr_info("The GPU crash dump is required to analyze GPU hangs, so please always attach it.\n");
pr_info("GPU crash dump saved to /sys/class/drm/card%d/error\n",
i915->drm.primary->index);
- warned = true;
}
}