Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: <John.C.Harrison@Intel.com>, <Intel-Xe@Lists.FreeDesktop.Org>
Cc: Julia Filipchuk <julia.filipchuk@intel.com>
Subject: Re: [PATCH v4 2/4] drm/xe/guc: Bump minimum required GuC version to v70.29.2
Date: Fri, 2 Aug 2024 15:41:23 -0700	[thread overview]
Message-ID: <52943f77-9e1b-4f25-a95c-8bb32b6b2c93@intel.com> (raw)
In-Reply-To: <20240802222129.3976212-3-John.C.Harrison@Intel.com>



On 8/2/2024 3:21 PM, John.C.Harrison@Intel.com wrote:
> From: Julia Filipchuk <julia.filipchuk@intel.com>
>
> The VF API version for this release is 1.13.4.
>
> Bumping the minimum required GuC version just before force-probe
> removal allows us to set a baseline for what API features are expected
> to be available. I.e., at this point there is no need for any version
> checking in the code before using a feature. Of course, if/when the
> API is extended in future GuC releases, those new features will need
> API version checks in the code.
>
> Bump the recommended GuC versions to match.
>
> Also add numerical comparison helpers to simplify the version number
> checks.
>
> v2: Reword commit message and make comparison helpers GuC specific -
> review feedback from Daniele, done by JohnH
>
> Signed-off-by: Julia Filipchuk <julia.filipchuk@intel.com>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> ---
>   drivers/gpu/drm/xe/xe_guc.h   | 10 ++++++++++
>   drivers/gpu/drm/xe/xe_uc_fw.c | 27 ++++++++++++++-------------
>   2 files changed, 24 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.h b/drivers/gpu/drm/xe/xe_guc.h
> index e0bbf98f849d..c3e6b51f7a09 100644
> --- a/drivers/gpu/drm/xe/xe_guc.h
> +++ b/drivers/gpu/drm/xe/xe_guc.h
> @@ -11,6 +11,16 @@
>   #include "xe_hw_engine_types.h"
>   #include "xe_macros.h"
>   
> +/*
> + * GuC version number components are defined to be only 8-bit size,
> + * so converting to a 32bit 8.8.8 integer allows simple (and safe)
> + * numerical comparisons.
> + */
> +#define MAKE_GUC_VER(maj, min, pat)	(((maj) << 16) | ((min) << 8) | (pat))
> +#define MAKE_GUC_VER_STRUCT(ver)	MAKE_GUC_VER((ver).major, (ver).minor, (ver).patch)
> +#define GUC_SUBMIT_VER(guc)		MAKE_VER_STRUCT((guc)->fw.versions.found[XE_UC_FW_VER_COMPATIBILITY])
> +#define GUC_FIRMWARE_VER(guc)		MAKE_VER_STRUCT((guc)->fw.versions.found[XE_UC_FW_VER_RELEASE])
> +
>   struct drm_printer;
>   
>   void xe_guc_comm_init_early(struct xe_guc *guc);
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 5b70d23724c4..6bd1962bce36 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -15,6 +15,7 @@
>   #include "xe_gsc.h"
>   #include "xe_gt.h"
>   #include "xe_gt_printk.h"
> +#include "xe_guc.h"
>   #include "xe_map.h"
>   #include "xe_mmio.h"
>   #include "xe_module.h"
> @@ -105,15 +106,15 @@ struct fw_blobs_by_type {
>   };
>   
>   #define XE_GUC_FIRMWARE_DEFS(fw_def, mmp_ver, major_ver)			\
> -	fw_def(LUNARLAKE,	major_ver(xe,	guc,	lnl,	70, 19, 2))	\
> -	fw_def(METEORLAKE,	major_ver(i915,	guc,	mtl,	70, 19, 2))	\
> -	fw_def(DG2,		major_ver(i915,	guc,	dg2,	70, 19, 2))	\
> -	fw_def(DG1,		major_ver(i915,	guc,	dg1,	70, 19, 2))	\
> -	fw_def(ALDERLAKE_N,	major_ver(i915,	guc,	tgl,	70, 19, 2))	\
> -	fw_def(ALDERLAKE_P,	major_ver(i915,	guc,	adlp,	70, 19, 2))	\
> -	fw_def(ALDERLAKE_S,	major_ver(i915,	guc,	tgl,	70, 19, 2))	\
> -	fw_def(ROCKETLAKE,	major_ver(i915,	guc,	tgl,	70, 19, 2))	\
> -	fw_def(TIGERLAKE,	major_ver(i915,	guc,	tgl,	70, 19, 2))
> +	fw_def(LUNARLAKE,	major_ver(xe,	guc,	lnl,	70, 29, 2))	\
> +	fw_def(METEORLAKE,	major_ver(i915,	guc,	mtl,	70, 29, 2))	\
> +	fw_def(DG2,		major_ver(i915,	guc,	dg2,	70, 29, 2))	\
> +	fw_def(DG1,		major_ver(i915,	guc,	dg1,	70, 29, 2))	\
> +	fw_def(ALDERLAKE_N,	major_ver(i915,	guc,	tgl,	70, 29, 2))	\
> +	fw_def(ALDERLAKE_P,	major_ver(i915,	guc,	adlp,	70, 29, 2))	\
> +	fw_def(ALDERLAKE_S,	major_ver(i915,	guc,	tgl,	70, 29, 2))	\
> +	fw_def(ROCKETLAKE,	major_ver(i915,	guc,	tgl,	70, 29, 2))	\
> +	fw_def(TIGERLAKE,	major_ver(i915,	guc,	tgl,	70, 29, 2))
>   
>   #define XE_HUC_FIRMWARE_DEFS(fw_def, mmp_ver, no_ver)		\
>   	fw_def(BATTLEMAGE,	no_ver(xe,	huc,		bmg))		\
> @@ -309,10 +310,10 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw, struct uc_css_header *css)
>   
>   	xe_gt_assert(gt, uc_fw->type == XE_UC_FW_TYPE_GUC);
>   
> -	/* We don't support GuC releases older than 70.19 */
> -	if (release->major < 70 || (release->major == 70 && release->minor < 19)) {
> -		xe_gt_err(gt, "Unsupported GuC v%u.%u! v70.19 or newer is required\n",
> -			  release->major, release->minor);
> +	/* We don't support GuC releases older than 70.29.2 */
> +	if (MAKE_GUC_VER_STRUCT(*release) < MAKE_GUC_VER(70, 29, 2)) {
> +		xe_gt_err(gt, "Unsupported GuC v%u.%u.%u! v70.29.2 or newer is required\n",
> +			  release->major, release->minor, release->patch);
>   		return -EINVAL;
>   	}
>   


  reply	other threads:[~2024-08-02 22:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 22:21 [PATCH v4 0/4] Update to GuC v70.29.2 as minimum for Xe (support LNL, BMG) John.C.Harrison
2024-08-02 22:21 ` [PATCH v4 1/4] Revert "drm/xe/guc: Pre-release GuC firmware v70.24.0 for LNL/BMG/PVC" John.C.Harrison
2024-08-02 22:43   ` Daniele Ceraolo Spurio
2024-08-02 22:21 ` [PATCH v4 2/4] drm/xe/guc: Bump minimum required GuC version to v70.29.2 John.C.Harrison
2024-08-02 22:41   ` Daniele Ceraolo Spurio [this message]
2024-08-02 22:21 ` [PATCH v4 3/4] drm/xe/guc: Define GuC version v70.29.2 for BMG John.C.Harrison
2024-08-02 22:21 ` [PATCH v4 4/4] drm/xe/guc: Pre-release GuC firmware v70.29.2 for PVC John.C.Harrison
2024-08-02 22:42   ` Daniele Ceraolo Spurio
2024-08-02 22:26 ` ✓ CI.Patch_applied: success for Update to GuC v70.29.2 as minimum for Xe (support LNL, BMG) Patchwork
2024-08-02 22:27 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-02 22:28 ` ✓ CI.KUnit: success " Patchwork
2024-08-02 22:39 ` ✓ CI.Build: " Patchwork
2024-08-02 22:42 ` ✓ CI.Hooks: " Patchwork
2024-08-02 22:43 ` ✓ CI.checksparse: " Patchwork
2024-08-02 23:05 ` ✗ CI.BAT: failure " Patchwork
2024-08-03  0:12 ` ✗ CI.FULL: " Patchwork
2024-08-05 17:49 ` ✓ CI.Patch_applied: success for Update to GuC v70.29.2 as minimum for Xe (support LNL, BMG) (rev2) Patchwork
2024-08-05 17:49 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-05 17:50 ` ✓ CI.KUnit: success " Patchwork
2024-08-05 18:02 ` ✓ CI.Build: " Patchwork
2024-08-05 18:04 ` ✓ CI.Hooks: " Patchwork
2024-08-05 18:06 ` ✓ CI.checksparse: " Patchwork
2024-08-05 18:26 ` ✓ CI.BAT: " Patchwork
2024-08-05 20:24 ` ✗ 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=52943f77-9e1b-4f25-a95c-8bb32b6b2c93@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=Intel-Xe@Lists.FreeDesktop.Org \
    --cc=John.C.Harrison@Intel.com \
    --cc=julia.filipchuk@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