From patchwork Fri Apr 6 09:54:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10325817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B35D6038F for ; Fri, 6 Apr 2018 09:55:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F050D294C5 for ; Fri, 6 Apr 2018 09:55:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4BB2294C7; Fri, 6 Apr 2018 09:55:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9ED5B294C5 for ; Fri, 6 Apr 2018 09:55:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 863CC6E1EF; Fri, 6 Apr 2018 09:55:09 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 401676E1EF for ; Fri, 6 Apr 2018 09:55:08 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id f125so2118511wme.4 for ; Fri, 06 Apr 2018 02:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ZrvPHWD7NH50pFRlgt7oyQx7y7D7KqNcp4irfu67sBU=; b=HkSUvEhCLijbndmRhPFA6+IqytdDTmGbxT6olRrZOQu2oaUfPVA9k2RT1ylD5QxekJ jFvt6US5VJxYkdCRryW09ZQkKk3f6lMvvZmFF2/Ehgciw0aqdJ4iv+IH1Iq9SWLZ8Xy8 0DhH6WVbp7EplsGJ3kUCVdZQcgl5+UUtk/mNPFsazc0U1IrynFWFwS2g3sm6kAaVh90A u72BEnEnqKbk0NnVezTQRF/K+8/A2AvWhcrLtusogFgKB5hx1UG7Iu/1UUXm7cCYXErS 0sZHakY9P7tLYtzJCTgM6IgabEgyek9LTXQI1W0rwcXcCT3fZOeZ1/figCByjZT//cu8 Wxng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZrvPHWD7NH50pFRlgt7oyQx7y7D7KqNcp4irfu67sBU=; b=VGbGj6Cy7Kr9lyGhzxG6nXWgUxjMz4hrQJ3WQ4oBRfGZ4XbcS1Uiw9uUlQQPyO1eyI 0phTafm7UrdKdrmeVvmKdXg+IlI/p/x2j85m4HFQs40v0Ro/DYwta1tYe1ma6F1DpZ+0 0JFVrTcYZSABhJgxqEum+/EZmr/fPA7lgg9r7UENGxZxUhfOKUhbMQZQbl4MXy6DJnZO 3ct1941/+VfFq40SpyaULnY7jlPxBaHysJ0jmWc0WlnqgizgkG6nDv9dKgnIyO5a5IKg gR3x5Qsb8hqDUTe392AIYS++OxW2xpo/UePh+0dAWqm3Z1k00CNeRv06cP+ZIDFdY0HZ KNtQ== X-Gm-Message-State: ALQs6tAYc56LI6gkkZr+yl1eIkeQHcmofN+6rkJy2EG4lacLy5HUVaxM g2BmRMTvOWR/wtGK90fR4exjw5LV X-Google-Smtp-Source: AIpwx4/FfEn5Nz7f7oKYfUXW4nzI3Lj65sVVO7G1FwQ1+WwiZMMBe4sd0az1TID23xefVQkH3g8G1g== X-Received: by 10.28.184.21 with SMTP id i21mr14259398wmf.94.1523008506466; Fri, 06 Apr 2018 02:55:06 -0700 (PDT) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id e131sm4559760wmg.1.2018.04.06.02.55.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Apr 2018 02:55:06 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 6 Apr 2018 10:54:57 +0100 Message-Id: <20180406095457.14802-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH] drm/i915/execlists: Log fence context & seqno throughout GEM_TRACE X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Include fence context and seqno in low level tracing so it is easier to follow flows of individual requests when things go bad. Also added tracing on the reset side of things. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/intel_lrc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index f6631ff11caf..a5cd698a2e3c 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -468,10 +468,11 @@ static void execlists_submit_ports(struct intel_engine_cs *engine) desc = execlists_update_context(rq); GEM_DEBUG_EXEC(port[n].context_id = upper_32_bits(desc)); - GEM_TRACE("%s in[%d]: ctx=%d.%d, seqno=%d (current %d), prio=%d\n", + GEM_TRACE("%s in[%d]: ctx=%d.%d, seqno=%d (fence %llx:%d) (current %d), prio=%d\n", engine->name, n, port[n].context_id, count, rq->global_seqno, + rq->fence.context, rq->fence.seqno, intel_engine_get_seqno(engine), rq_prio(rq)); } else { @@ -742,6 +743,10 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists) while (num_ports-- && port_isset(port)) { struct i915_request *rq = port_request(port); + GEM_TRACE("%s:port%lu fence %llx:%d (current %d)\n", + rq->engine->name, port - execlists->port, + rq->fence.context, rq->fence.seqno, rq->global_seqno); + GEM_BUG_ON(!execlists->active); intel_engine_context_out(rq->engine); @@ -817,7 +822,8 @@ static void execlists_cancel_requests(struct intel_engine_cs *engine) struct rb_node *rb; unsigned long flags; - GEM_TRACE("%s\n", engine->name); + GEM_TRACE("%s current %d\n", + engine->name, intel_engine_get_seqno(engine)); /* * Before we call engine->cancel_requests(), we should have exclusive @@ -1014,10 +1020,12 @@ static void execlists_submission_tasklet(unsigned long data) EXECLISTS_ACTIVE_USER)); rq = port_unpack(port, &count); - GEM_TRACE("%s out[0]: ctx=%d.%d, seqno=%d (current %d), prio=%d\n", + GEM_TRACE("%s out[0]: ctx=%d.%d, seqno=%d (fence %llx:%d) (current %d), prio=%d\n", engine->name, port->context_id, count, rq ? rq->global_seqno : 0, + rq ? rq->fence.context : 0, + rq ? rq->fence.seqno : 0, intel_engine_get_seqno(engine), rq ? rq_prio(rq) : 0); @@ -1745,8 +1753,9 @@ static void reset_common_ring(struct intel_engine_cs *engine, struct intel_context *ce; unsigned long flags; - GEM_TRACE("%s seqno=%x\n", - engine->name, request ? request->global_seqno : 0); + GEM_TRACE("%s seqno=%x current=%d\n", + engine->name, request ? request->global_seqno : 0, + intel_engine_get_seqno(engine)); /* See execlists_cancel_requests() for the irq/spinlock split. */ local_irq_save(flags);