Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH 6/9] drm/xe: Stash GMD_ID value in xe_gt
Date: Mon, 22 Jan 2024 09:04:42 -0800	[thread overview]
Message-ID: <20240122170445.108856-6-jose.souza@intel.com> (raw)
In-Reply-To: <20240122170445.108856-1-jose.souza@intel.com>

From: Matt Roper <matthew.d.roper@intel.com>

Although we've stored the major and minor versions for graphics/media in
xe_device, it will be simpler to implement the uapi version query if we
also stash the raw register value in the GT itself.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_gt.c       | 6 ++++++
 drivers/gpu/drm/xe/xe_gt_types.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 1fe4d54409d34..47cb87f599e46 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -399,6 +399,12 @@ static int gt_fw_domain_init(struct xe_gt *gt)
 	/* Initialize CCS mode sysfs after early initialization of HW engines */
 	xe_gt_ccs_mode_sysfs_init(gt);
 
+	/*
+	 * Stash hardware-reported version.  Since this register does not exist
+	 * on pre-MTL platforms, reading it there will (correctly) return 0.
+	 */
+	gt->info.gmdid = xe_mmio_read32(gt, GMD_ID);
+
 	err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 	XE_WARN_ON(err);
 	xe_device_mem_access_put(gt_to_xe(gt));
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
index 047cde6cda107..177b93a96929e 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -117,6 +117,8 @@ struct xe_gt {
 		 * hwconfig blob.
 		 */
 		u64 __engine_mask;
+		/** @gmdid: raw GMD_ID value from hardware */
+		u32 gmdid;
 	} info;
 
 	/**
-- 
2.43.0


  parent reply	other threads:[~2024-01-22 17:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 17:04 [PATCH 1/9] drm/xe: Remove double new line in devcoredump José Roberto de Souza
2024-01-22 17:04 ` [PATCH 2/9] drm/xe: Change devcoredump functions parameters to xe_sched_job José Roberto de Souza
2024-01-22 18:39   ` Summers, Stuart
2024-01-22 17:04 ` [PATCH 3/9] drm/xe: Add functions to convert regular address to canonical address and back José Roberto de Souza
2024-01-22 18:38   ` Summers, Stuart
2024-01-22 18:43     ` Souza, Jose
2024-01-24 15:16       ` Summers, Stuart
2024-01-24 15:20         ` Souza, Jose
2024-01-29 17:54           ` Summers, Stuart
2024-01-23 17:48   ` Jani Nikula
2024-01-22 17:04 ` [PATCH 4/9] drm/xe: Add batch buffer addresses to devcoredump José Roberto de Souza
2024-01-22 20:13   ` Rodrigo Vivi
2024-01-22 17:04 ` [PATCH 5/9] drm/xe: Nuke xe from xe_devcoredump José Roberto de Souza
2024-01-22 20:11   ` Rodrigo Vivi
2024-01-22 20:26     ` Souza, Jose
2024-01-22 20:40       ` Rodrigo Vivi
2024-01-22 17:04 ` José Roberto de Souza [this message]
2024-01-22 17:04 ` [PATCH 7/9] drm/xe: Print more device information in devcoredump José Roberto de Souza
2024-01-22 20:18   ` Rodrigo Vivi
2024-01-22 21:12     ` Souza, Jose
2024-01-22 17:04 ` [PATCH 8/9] drm/xe: Print registers spread in 2 u32 as u64 José Roberto de Souza
2024-01-22 20:14   ` Rodrigo Vivi
2024-01-22 17:04 ` [PATCH 9/9] drm/xe: Remove addional spaces in devcoredump HW Engines section José Roberto de Souza
2024-01-22 20:18   ` Rodrigo Vivi
2024-01-22 17:32 ` ✓ CI.Patch_applied: success for series starting with [1/9] drm/xe: Remove double new line in devcoredump Patchwork
2024-01-22 17:32 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-22 17:33 ` ✓ CI.KUnit: success " Patchwork
2024-01-22 17:40 ` ✓ CI.Build: " Patchwork
2024-01-22 17:41 ` ✗ CI.Hooks: failure " Patchwork
2024-01-22 17:42 ` ✓ CI.checksparse: success " Patchwork
2024-01-22 18:05 ` ✓ CI.BAT: " Patchwork
2024-01-22 18:28 ` [PATCH 1/9] " Summers, Stuart
2024-01-22 18:40   ` Souza, Jose
2024-01-22 20:20     ` Rodrigo Vivi
2024-01-24 15:17       ` Summers, Stuart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240122170445.108856-6-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox