On 28/02/2017 08:35, Chris Wilson wrote:
On Tue, Feb 28, 2017 at 07:42:50AM +0000, Tvrtko Ursulin wrote:
On 27/02/2017 23:41, Chris Wilson wrote:
Move the setting of gpu_error->missed_irq_ring bit to a common function
so that we can get the debug logging for either path.
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
drivers/gpu/drm/i915/intel_breadcrumbs.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index 7c7867d65a39..695ecec52d50 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -59,6 +59,16 @@ static unsigned long wait_timeout(void)
return round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES);
}
+static void missed_breadcrumb(struct intel_engine_cs *engine)
+{
+ DRM_DEBUG_DRIVER("%s missed breadcrumb, irq posted? %s\n",
+ engine->name,
+ yesno(test_bit(ENGINE_IRQ_BREADCRUMB,
+ &engine->irq_posted)));
+
+ set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
+}
+
static void intel_breadcrumbs_hangcheck(unsigned long data)
{
struct intel_engine_cs *engine = (struct intel_engine_cs *)data;
@@ -86,8 +96,7 @@ static void intel_breadcrumbs_hangcheck(unsigned long data)
* DRM_I915_HANGCHECK_JIFFIES [1.5s]!
*/
if (intel_engine_wakeup(engine) & ENGINE_WAKEUP_ASLEEP) {
- DRM_DEBUG("Hangcheck timer elapsed... %s idle\n", engine->name);
- set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
+ missed_breadcrumb(engine);
mod_timer(&engine->breadcrumbs.fake_irq, jiffies + 1);
} else {
mod_timer(&b->hangcheck, wait_timeout());
@@ -180,7 +189,7 @@ void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
* completion.
*/
if (__intel_breadcrumbs_wakeup(b) & ENGINE_WAKEUP_ASLEEP)
- set_bit(engine->id, &engine->i915->gpu_error.missed_irq_rings);
+ missed_breadcrumb(engine);
__intel_engine_disarm_breadcrumbs(engine);
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Would you mind if I added a noinline "%pF", __builtin_return_address(0)?
Wouldn't mind. Was thinking along those lines myself but thought the
source will be inferable from the preceding messages. But even better if
it is explicit.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx