From mboxrd@z Thu Jan 1 00:00:00 1970 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 2BD41C27C55 for ; Mon, 10 Jun 2024 14:18:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7A7810E467; Mon, 10 Jun 2024 14:18:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hGHWr8h0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4565710E189 for ; Mon, 10 Jun 2024 14:18:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718029081; x=1749565081; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=yxiathPUoFfRZu3zsWN6JfGA4A9/KEJObu12rhSvYTI=; b=hGHWr8h0nuoBbcPOop5lS4ajcYu5Bb7CVQydyqIlUfxtnTH4qgsKflFF MIkND3fhfBtQ7u2XVEdl77tQ2pD9hAxDRdvBjJzjs68iyfyQncF4DzFou cZ5j01EkD434B7kP8sES9YCX9zLCm3L1UVgJZXoZQPXQhXDN7YjO4W3al UwvU76W/m01Ln7sBfN7GtDg1pd4/SAozm7EeIENYTlCdGbCX9QFCAJEVB OsOI36HMVDeFHBohMRu7Jj6wrdKozA7AKGGsf767SSszLP5ej8qWLsddm CDgyMPmwq+E/RrF4ueASykDoYg3HZ2M/drNHDdVeYeqcu70JJfaN4tOlq g==; X-CSE-ConnectionGUID: MvAuHUzHQF60B7f1lMzRLw== X-CSE-MsgGUID: GAtZJWiwRFqNzoGhv/9xwQ== X-IronPort-AV: E=McAfee;i="6600,9927,11099"; a="14864869" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="14864869" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 07:17:52 -0700 X-CSE-ConnectionGUID: RhGn48BRSv6Hlg1FBG1LjQ== X-CSE-MsgGUID: Lf7JlbYiTqinluoaD5KOYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="70238692" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 07:17:49 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Subject: [PATCH v5 04/10] drm/xe: Add ctx timestamp to LRC snapshot Date: Mon, 10 Jun 2024 07:18:17 -0700 Message-Id: <20240610141823.2605496-5-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240610141823.2605496-1-matthew.brost@intel.com> References: <20240610141823.2605496-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" The ctx timestamp is useful information, add to LRC snapshot. v2: - s/ctx_timestamp_job/ctx_job_timestamp Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_lrc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c index 0fef354c6489..f3d77aa1750d 100644 --- a/drivers/gpu/drm/xe/xe_lrc.c +++ b/drivers/gpu/drm/xe/xe_lrc.c @@ -49,6 +49,8 @@ struct xe_lrc_snapshot { } tail; u32 start_seqno; u32 seqno; + u32 ctx_timestamp; + u32 ctx_job_timestamp; }; static struct xe_device * @@ -1642,6 +1644,8 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc) snapshot->lrc_offset = xe_lrc_pphwsp_offset(lrc); snapshot->lrc_size = lrc->bo->size - snapshot->lrc_offset; snapshot->lrc_snapshot = NULL; + snapshot->ctx_timestamp = xe_lrc_ctx_timestamp(lrc); + snapshot->ctx_job_timestamp = xe_lrc_ctx_job_timestamp(lrc); return snapshot; } @@ -1690,6 +1694,8 @@ void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer snapshot->tail.internal, snapshot->tail.memory); drm_printf(p, "\tStart seqno: (memory) %d\n", snapshot->start_seqno); drm_printf(p, "\tSeqno: (memory) %d\n", snapshot->seqno); + drm_printf(p, "\tTimestamp: 0x%08x\n", snapshot->ctx_timestamp); + drm_printf(p, "\tJob Timestamp: 0x%08x\n", snapshot->ctx_job_timestamp); if (!snapshot->lrc_snapshot) return; -- 2.34.1