From patchwork Thu Jan 19 06:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Harrison X-Patchwork-Id: 13107469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D0E2C00A5A for ; Thu, 19 Jan 2023 06:50:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E06910E8B2; Thu, 19 Jan 2023 06:50:35 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BE6310E8B1; Thu, 19 Jan 2023 06:50:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674111033; x=1705647033; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ApBBVQEaos4a6GRX2pfjG8CAy0S+vGQGh3ubPkQY46g=; b=Ug9MTBVsx028ogDDhSYVOtRQg66cuQvcbbasmR2Cb3SU5DLEFRbh6XRH qjWfl2B3Xn9ZklgU4SyFmDOq4VIsGfF/FpI15hVKraEMLQ6Myr023+hzY 7tBJFyKWp6346Gbpe6jezJDcWcUGJ1qRGt+RYHF6yoMwGYOaly0M7Zmer nXNc4L7pp0jtgrVm2+dXvyxQEXVmkaZvUJP9HjGgbVCoakBsuxdjj5Ndi bEkuR9WzAt7ojCspJKP3qUqGDpVUBevL8GQ4a1VXViQj6M1jv0d1/blnq VsyNYKNn7jItR0uSFqbORwmlbzpKoeMsibvbH+kyQab7HecCAbukK/Jt7 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="323897864" X-IronPort-AV: E=Sophos;i="5.97,228,1669104000"; d="scan'208";a="323897864" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 22:50:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="723385745" X-IronPort-AV: E=Sophos;i="5.97,228,1669104000"; d="scan'208";a="723385745" Received: from relo-linux-5.jf.intel.com ([10.165.21.152]) by fmsmga008.fm.intel.com with ESMTP; 18 Jan 2023 22:50:21 -0800 From: John.C.Harrison@Intel.com To: Intel-GFX@Lists.FreeDesktop.Org Date: Wed, 18 Jan 2023 22:49:58 -0800 Message-Id: <20230119065000.1661857-5-John.C.Harrison@Intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119065000.1661857-1-John.C.Harrison@Intel.com> References: <20230119065000.1661857-1-John.C.Harrison@Intel.com> MIME-Version: 1.0 Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH v3 4/6] drm/i915: Allow error capture of a pending request X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: DRI-Devel@Lists.FreeDesktop.Org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: John Harrison A hang situation has been observed where the only requests on the context were either completed or not yet started according to the breaadcrumbs. However, the register state claimed a batch was (maybe) in progress. So, allow capture of the pending request on the grounds that this might be better than nothing. v2: Reword 'not started' warning message (Tvrtko) Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gpu_error.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 743614fff5472..0d1e68830b75e 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1624,12 +1624,9 @@ capture_engine(struct intel_engine_cs *engine, return NULL; intel_get_hung_entity(engine, &ce, &rq); - if (rq && !i915_request_started(rq)) { - drm_info(&engine->gt->i915->drm, "Got hung context on %s with no active request!\n", - engine->name); - i915_request_put(rq); - rq = NULL; - } + if (rq && !i915_request_started(rq)) + drm_info(&engine->gt->i915->drm, "Got hung context on %s with active request %lld:%lld [0x%04X] not yet started\n", + engine->name, rq->fence.context, rq->fence.seqno, ce->guc_id.id); if (rq) { capture = intel_engine_coredump_add_request(ee, rq, ATOMIC_MAYFAIL);