From patchwork Wed Apr 26 20:57:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13224944 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 25D7CC7EE23 for ; Wed, 26 Apr 2023 20:58:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1666110EA32; Wed, 26 Apr 2023 20:58:05 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1161210E1FD; Wed, 26 Apr 2023 20:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682542679; x=1714078679; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=ZMwmbviybjc8wmkpoL7hmf4i9Gf/cztUam8fqFGFqTk=; b=fN1vLtr8jbfjDCZIgCjj/fi0ORgfGymb/RpLOu7kUsZCHpP8MpqUxmXy FZl67QGdbY9FNrea0PYcgAQTxsKWZaOcnnxhhdOizaeDdAXMI8QjKtkVG VOD1hUXu1qeZ+kV/mMEbtiQT/ih9jNFb4pCmhqayyC2ytnCV3qlcdxscJ CxqbJExTwitnm7Q4w958AXmml9WDc4mkkRP7CbNz5I/OOP/L/BKYzfsKt wZ44W+CuRfm7SQctPEBMF6i6FwjdJib2YmRi9IhrURnhX9mqLU5YSnu6p /39gWq4VcNpbWyn4Tdqcn6YHI+MS2wpqBTRDod66p6R1J5ZJizogFCLdK g==; X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="375203691" X-IronPort-AV: E=Sophos;i="5.99,229,1677571200"; d="scan'208";a="375203691" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 13:57:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="688105228" X-IronPort-AV: E=Sophos;i="5.99,229,1677571200"; d="scan'208";a="688105228" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 26 Apr 2023 13:57:58 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 26 Apr 2023 13:57:57 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 26 Apr 2023 13:57:57 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 26 Apr 2023 13:57:57 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.47) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 26 Apr 2023 13:57:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F7zLPUz+yRgu8phQ9f7jbFrbQZpp5tUSIuzncsbZoJuL6rxcAg013T+zegDriaLnW+HD80rUpYB5uoPxGZ9N9mj7nFiuWhp4I3bpCCup1L1X1QgDbNqnsAEjAMnCd6WCEe1t3BhjYdwQXJ1I5fV59wzPwHzQEK9WsGAINCpso9IpRyDHC70NXBIEJd9ZWsUNpi9X61gQO1v4578Fy/U+IEy58hg2M7cLTUTNJzM/ANsoaqEOQ5laUZkTex6rV7w/UiTETIE9KczzAw0ZwRjItzM3DNR1CiDGbcOMCgOCEics3ki0Vc69fZTBtRboVizL2MNv2hkR1jk+OlLXpUbzkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MGFDCgxRF56vNjOom4nZdt0e97JmY/lRYbx+II7PMlg=; b=cqSpD/0LIBW2MaN3GmN73Qz2vRaGu9qVJOSt7AdNX6DSIoLRUFqIfllg145L3der+VLUKmuaBq+ncIU3n1+sNawqpq4ZNBj658sCp5fLaNVkqDXpe+1UZGbrbRlIt36lf5yLHA+oX6V0iiUevGbsNP49E7v4Iy43Xu0crjifSfx3lIyFHZyMOcsVnHafubZ3x4ymmOZ0WVVAAKAk73CVVkX7ilioM/KNx/V6JXlyFFpLBZ/bAdW4lgIE1DRPSwNyYoiZTLmQlvogG9A8LPwTuky/Y1gTpDkY/+LOidU7mMPi3G1b9QdL+GoNuEtxMmXeupKtHoZm3TYQ2Mv+19LKlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) by CY5PR11MB6343.namprd11.prod.outlook.com (2603:10b6:930:3c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.34; Wed, 26 Apr 2023 20:57:53 +0000 Received: from MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::f7ec:aae9:1e7b:e004]) by MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::f7ec:aae9:1e7b:e004%6]) with mapi id 15.20.6319.033; Wed, 26 Apr 2023 20:57:53 +0000 From: Rodrigo Vivi To: Subject: [PATCH 09/14] drm/xe: Add GuC Submit Engine snapshot to xe_devcoredump. Date: Wed, 26 Apr 2023 16:57:08 -0400 Message-ID: <20230426205713.512695-10-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230426205713.512695-1-rodrigo.vivi@intel.com> References: <20230426205713.512695-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: BY5PR03CA0001.namprd03.prod.outlook.com (2603:10b6:a03:1e0::11) To MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR11MB6059:EE_|CY5PR11MB6343:EE_ X-MS-Office365-Filtering-Correlation-Id: 6cb941d0-6bda-4db1-b6fd-08db4698e710 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8R4NO0FHH9KMdPDOfgZiZ2R/VnzPptQLVS2np56yfRqDrJ+ptO05ma3+yzK87TuYwZhbDs4Sbp0bnsQeUiXkYsIBQhQksomMrInnuhN23iFobOGSE0ntRVDUebtOr0wtXR96ze8r0jOexCiMHy7QtCxr/CPydWLlZ3mlR2yrBYP9R8MwpMoU16sQtP3lfH2bqU3GldhlfISZMjZwLLzGizbVpkTRF9UROzX4otTk+023tBKtFdVgr9Ac5nVOpyjLi0NLT5eZ2F0ttVa60d7jNFa2yr0qb/OJxZGiO4fpcZs52//BTjJzzJE/5R/DT317MsiLeIHbAKi0Mb+vz/J/a6BavgCgO6UAyR/5Qoax7epNxHBBmIlpUd7hxRHF9qmuCvIP9qYT2i2d3ly/vm7QGw7jk30J1QeE0hGP1gUaUNjkAgqx5tS4N6GrZr8FYZpgxmXB/Y6eQLHwJu2CZsRBam88qRdZX2D2Tti09Ex4/33WDObQRHgdgcZ9f3eWOq4tcBV0sNl3kMWlCtokxmSt81+PlUCoCzMAZ76UT8xPdX8BxeLPVo4htlqDvM0UiIvw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR11MB6059.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(376002)(396003)(39860400002)(366004)(136003)(451199021)(83380400001)(450100002)(107886003)(478600001)(2616005)(1076003)(6506007)(26005)(186003)(6512007)(6486002)(5660300002)(44832011)(36756003)(82960400001)(66946007)(2906002)(38100700002)(41300700001)(86362001)(66556008)(66476007)(4326008)(6916009)(8676002)(8936002)(316002)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VM+QZ/ppJ87iqgYVtJIyp24yfKv7ZIIiBFtRUMKeFIHCueSdNI6AYIB/ygQger/YkuKoGNE2RvBjvrRJBGf07Lq37q0KLI+83oaZDChTly0PKDyO94J9XUDFzURmNJp7JJVTk8dB+rF2/sarfxvYfmHnWUejW5g/Dop1kuHqw0jdr9yhA5Nqye/F10iySFpN7w5PvGOi3rUjQ3dQVWVrsspEDcuo1vUzkv7NDcMtt4zkK6qwUkMiBdSVWhv68VWERFG3Q182DPJxeCO1qSxutvWYUU/T/PHsh6PQk4nvH72zDUKeefJxz6WkKuKiJcOfQePmoLIUBXlwCV51Wyn0loH9wPgpJEl1d+wJ3DtzKEyIj9eUAXdKchJeUs6uBYHeQp7Vw+kL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xGe84ty9A0cQTu7+CdbvNM3mmjzZaBObahLJ73QdW/Whu6ucrLFW+wSYPE8GLfSKs5EWSVLw4PK1tKgxFOVukz/A2A5cQ6unEkevYYhfda3o/7vQ0hDZXDZT6wMx+F/ajcRkQXK8cw== X-MS-Exchange-CrossTenant-Network-Message-Id: 6cb941d0-6bda-4db1-b6fd-08db4698e710 X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6059.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 20:57:53.2526 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IrQ2R2blIscY71Uvnr9JpzjUkxC4MTOdF2Qv2w8XX7+riqL3OC4Xub2G8TPh3RvuISKxtH1OTTfl3lPw6TFDkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6343 X-OriginatorOrg: intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Rodrigo Vivi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Let's start to move our existent logs to devcoredump one by one. Any format change should come on follow-up work. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost --- drivers/gpu/drm/xe/xe_devcoredump.c | 7 ++++++- drivers/gpu/drm/xe/xe_devcoredump_types.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c index 795581c58d90..0e7ec654a9f2 100644 --- a/drivers/gpu/drm/xe/xe_devcoredump.c +++ b/drivers/gpu/drm/xe/xe_devcoredump.c @@ -12,6 +12,7 @@ #include "xe_engine.h" #include "xe_gt.h" #include "xe_guc_ct.h" +#include "xe_guc_submit.h" /** * DOC: Xe device coredump @@ -89,6 +90,7 @@ static ssize_t xe_devcoredump_read(char *buffer, loff_t offset, drm_printf(&p, "\n**** GuC CT ****\n"); xe_guc_ct_snapshot_print(coredump->snapshot.ct, &p); + xe_guc_engine_snapshot_print(coredump->snapshot.ge, &p); mutex_unlock(&coredump->lock); @@ -106,6 +108,7 @@ static void xe_devcoredump_free(void *data) mutex_lock(&coredump->lock); xe_guc_ct_snapshot_free(coredump->snapshot.ct); + xe_guc_engine_snapshot_free(coredump->snapshot.ge); coredump->faulty_engine = NULL; drm_info(&coredump_to_xe(coredump)->drm, @@ -117,13 +120,15 @@ static void xe_devcoredump_free(void *data) static void devcoredump_snapshot(struct xe_devcoredump *coredump) { struct xe_devcoredump_snapshot *ss = &coredump->snapshot; - struct xe_guc *guc = engine_to_guc(coredump->faulty_engine); + struct xe_engine *e = coredump->faulty_engine; + struct xe_guc *guc = engine_to_guc(e); lockdep_assert_held(&coredump->lock); ss->snapshot_time = ktime_get_real(); ss->boot_time = ktime_get_boottime(); coredump->snapshot.ct = xe_guc_ct_snapshot_capture(&guc->ct); + coredump->snapshot.ge = xe_guc_engine_snapshot_capture(e); } /** diff --git a/drivers/gpu/drm/xe/xe_devcoredump_types.h b/drivers/gpu/drm/xe/xe_devcoredump_types.h index 1e44d5346364..e055b266af70 100644 --- a/drivers/gpu/drm/xe/xe_devcoredump_types.h +++ b/drivers/gpu/drm/xe/xe_devcoredump_types.h @@ -27,6 +27,8 @@ struct xe_devcoredump_snapshot { /* GuC snapshots */ /** @ct_snapshot: GuC CT snapshot */ struct xe_guc_ct_snapshot *ct; + /** @ge: Guc Engine snapshot */ + struct xe_guc_submit_engine_snapshot *ge; }; /**