Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Filipchuk <julia.filipchuk@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm/xe/gsc: Track the platform in the compatibility version
Date: Fri, 23 Aug 2024 17:32:21 -0700	[thread overview]
Message-ID: <0a0f4ca8-224d-4c68-911c-6f2d85953819@intel.com> (raw)
In-Reply-To: <20240813231148.1663731-4-daniele.ceraolospurio@intel.com>

Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>

On 8/13/2024 4:11 PM, Daniele Ceraolo Spurio wrote:
> The GSC compatibility version number is reset for each new platform. To
> indicate this, the version includes a number that identifies the
> platform (102 = MTL, 104 = LNL); this matches what happens for the
> release version, where the major number also identifies a platform.
> 
> To make it clearer in our logs that the compatibility version is
> specific to the platform, it is useful to include this platform number.
> However, given that our binary names already include the platform, it is
> not necessary to add this extra number there.
> 
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gsc.c   |  7 ++++---
>  drivers/gpu/drm/xe/xe_uc_fw.c | 13 +++++++++----
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
> index 85a6a65063c4..0217e05feb70 100644
> --- a/drivers/gpu/drm/xe/xe_gsc.c
> +++ b/drivers/gpu/drm/xe/xe_gsc.c
> @@ -165,10 +165,11 @@ static int query_compatibility_version(struct xe_gsc *gsc)
>  		return err;
>  	}
>  
> -	compat->major = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
> -	compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
> +	compat->major = version_query_rd(xe, &bo->vmap, rd_offset, proj_major);
> +	compat->minor = version_query_rd(xe, &bo->vmap, rd_offset, compat_major);
> +	compat->patch = version_query_rd(xe, &bo->vmap, rd_offset, compat_minor);
>  
> -	xe_gt_info(gt, "found GSC cv%u.%u\n", compat->major, compat->minor);
> +	xe_gt_info(gt, "found GSC cv%u.%u.%u\n", compat->major, compat->minor, compat->patch);
>  
>  out_bo:
>  	xe_bo_unpin_map_no_vm(bo);
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 41c4ac6ba42a..84956bdf635e 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -130,8 +130,8 @@ struct fw_blobs_by_type {
>  
>  /* for the GSC FW we match the compatibility version and not the release one */
>  #define XE_GSC_FIRMWARE_DEFS(fw_def, major_ver)		\
> -	fw_def(LUNARLAKE,	major_ver(xe,	gsc,	lnl,	1, 0, 0)) \
> -	fw_def(METEORLAKE,	major_ver(i915,	gsc,	mtl,	1, 0, 0))
> +	fw_def(LUNARLAKE,	major_ver(xe,	gsc,	lnl,	104, 1, 0)) \
> +	fw_def(METEORLAKE,	major_ver(i915,	gsc,	mtl,	102, 1, 0))
>  
>  #define MAKE_FW_PATH(dir__, uc__, shortname__, version__)			\
>  	__stringify(dir__) "/" __stringify(shortname__) "_" __stringify(uc__) version__ ".bin"
> @@ -142,6 +142,8 @@ struct fw_blobs_by_type {
>  	MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(a))
>  #define fw_filename_no_ver(dir_, uc_, shortname_)				\
>  	MAKE_FW_PATH(dir_, uc_, shortname_, "")
> +#define fw_filename_gsc(dir_, uc_, shortname_, a, b, c)				\
> +	MAKE_FW_PATH(dir_, uc_, shortname_, "_" __stringify(b))
>  
>  #define uc_fw_entry_mmp_ver(dir_, uc_, shortname_, a, b, c)			\
>  	{ fw_filename_mmp_ver(dir_, uc_, shortname_, a, b, c),			\
> @@ -152,6 +154,9 @@ struct fw_blobs_by_type {
>  #define uc_fw_entry_no_ver(dir_, uc_, shortname_)				\
>  	{ fw_filename_no_ver(dir_, uc_, shortname_),				\
>  	  0, 0 }
> +#define uc_fw_entry_gsc(dir_, uc_, shortname_, a, b, c)				\
> +	{ fw_filename_gsc(dir_, uc_, shortname_, a, b, c),			\
> +	  a, b, c }
>  
>  /* All blobs need to be declared via MODULE_FIRMWARE() */
>  #define XE_UC_MODULE_FIRMWARE(platform__, fw_filename)				\
> @@ -167,7 +172,7 @@ XE_GUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
>  		     fw_filename_mmp_ver, fw_filename_major_ver)
>  XE_HUC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE,
>  		     fw_filename_mmp_ver, fw_filename_no_ver)
> -XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_major_ver)
> +XE_GSC_FIRMWARE_DEFS(XE_UC_MODULE_FIRMWARE, fw_filename_gsc)
>  
>  static struct xe_gt *
>  __uc_fw_to_gt(struct xe_uc_fw *uc_fw, enum xe_uc_fw_type type)
> @@ -210,7 +215,7 @@ uc_fw_auto_select(struct xe_device *xe, struct xe_uc_fw *uc_fw)
>  				     uc_fw_entry_no_ver)
>  	};
>  	static const struct uc_fw_entry entries_gsc[] = {
> -		XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_major_ver)
> +		XE_GSC_FIRMWARE_DEFS(XE_UC_FW_ENTRY, uc_fw_entry_gsc)
>  	};
>  	static const struct fw_blobs_by_type blobs_all[XE_UC_FW_NUM_TYPES] = {
>  		[XE_UC_FW_TYPE_GUC] = { entries_guc, ARRAY_SIZE(entries_guc) },


  reply	other threads:[~2024-08-24  0:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 23:11 [PATCH 0/4] drm/xe: fixes and debug improvements for GSC load Daniele Ceraolo Spurio
2024-08-13 23:11 ` [PATCH 1/4] drm/xe/gsc: Do not attempt to load the GSC multiple times Daniele Ceraolo Spurio
2024-08-15 18:24   ` Lucas De Marchi
2024-08-24  0:31   ` Julia Filipchuk
2024-08-13 23:11 ` [PATCH 2/4] drm/xe/gsc: Fix FW status if the firmware is already loaded Daniele Ceraolo Spurio
2024-08-24  0:32   ` Julia Filipchuk
2024-08-13 23:11 ` [PATCH 3/4] drm/xe/gsc: Track the platform in the compatibility version Daniele Ceraolo Spurio
2024-08-24  0:32   ` Julia Filipchuk [this message]
2024-08-13 23:11 ` [PATCH 4/4] drm/xe/gsc: Add debugfs to print GSC info Daniele Ceraolo Spurio
2024-08-24  1:02   ` Julia Filipchuk
2024-08-28 21:25     ` Daniele Ceraolo Spurio
2024-08-13 23:17 ` ✓ CI.Patch_applied: success for drm/xe: fixes and debug improvements for GSC load Patchwork
2024-08-13 23:17 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-13 23:19 ` ✓ CI.KUnit: success " Patchwork
2024-08-13 23:30 ` ✓ CI.Build: " Patchwork
2024-08-13 23:33 ` ✓ CI.Hooks: " Patchwork
2024-08-13 23:34 ` ✓ CI.checksparse: " Patchwork
2024-08-14  0:05 ` ✓ CI.BAT: " Patchwork
2024-08-14  1:10 ` ✗ CI.FULL: failure " Patchwork

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=0a0f4ca8-224d-4c68-911c-6f2d85953819@intel.com \
    --to=julia.filipchuk@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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