Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-xe@lists.freedesktop.org
Cc: Francois Dugast <francois.dugast@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Mateusz Jablonski <mateusz.jablonski@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH 1/2] drm/xe: Add has_wmtp GT info
Date: Fri, 9 Aug 2024 13:55:52 +0200	[thread overview]
Message-ID: <c61b182f-739e-4b41-803c-123feabc2ab1@linux.intel.com> (raw)
In-Reply-To: <20240809104736.10423-2-nirmoy.das@intel.com>


On 8/9/2024 12:47 PM, Nirmoy Das wrote:
> Add a GT info member to reflect wmtp feature status.
>
> Cc: Francois Dugast <francois.dugast@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Mateusz Jablonski <mateusz.jablonski@intel.com>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt_types.h  |  2 ++
>   drivers/gpu/drm/xe/xe_hw_engine.c | 15 +++++++++++----
>   2 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
> index 631928258d71..bba212924e21 100644
> --- a/drivers/gpu/drm/xe/xe_gt_types.h
> +++ b/drivers/gpu/drm/xe/xe_gt_types.h
> @@ -131,6 +131,8 @@ struct xe_gt {
>   		u8 id;
>   		/** @info.has_indirect_ring_state: GT has indirect ring state support */
>   		u8 has_indirect_ring_state:1;
> +		/** @has_wmtp: gt supports mid-thread preemption */


It should be @info.has_wmtp. I will fix it in future rev.


Thanks,

Nirmoy

> +		bool has_wmtp;
>   	} info;
>   
>   	/**
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
> index 402dfa748e16..7ddffc596dc1 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.c
> @@ -347,14 +347,11 @@ static bool xe_hw_engine_match_fixed_cslice_mode(const struct xe_gt *gt,
>   static bool xe_rtp_cfeg_wmtp_disabled(const struct xe_gt *gt,
>   				      const struct xe_hw_engine *hwe)
>   {
> -	if (GRAPHICS_VER(gt_to_xe(gt)) < 20)
> -		return false;
> -
>   	if (hwe->class != XE_ENGINE_CLASS_COMPUTE &&
>   	    hwe->class != XE_ENGINE_CLASS_RENDER)
>   		return false;
>   
> -	return xe_mmio_read32(hwe->gt, XEHP_FUSE4) & CFEG_WMTP_DISABLE;
> +	return !gt->info.has_wmtp;
>   }
>   
>   void
> @@ -736,6 +733,15 @@ static void read_compute_fuses(struct xe_gt *gt)
>   		read_compute_fuses_from_dss(gt);
>   }
>   
> +static void read_wmtp_fuses(struct xe_gt *gt)
> +{
> +	if (GRAPHICS_VER(gt_to_xe(gt)) < 20)
> +		return;
> +
> +	gt->info.has_wmtp = !(xe_mmio_read32(gt, XEHP_FUSE4) &
> +			    CFEG_WMTP_DISABLE);
> +}
> +
>   static void check_gsc_availability(struct xe_gt *gt)
>   {
>   	struct xe_device *xe = gt_to_xe(gt);
> @@ -766,6 +772,7 @@ int xe_hw_engines_init_early(struct xe_gt *gt)
>   	read_media_fuses(gt);
>   	read_copy_fuses(gt);
>   	read_compute_fuses(gt);
> +	read_wmtp_fuses(gt);
>   	check_gsc_availability(gt);
>   
>   	BUILD_BUG_ON(XE_HW_ENGINE_PREEMPT_TIMEOUT < XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN);

  reply	other threads:[~2024-08-09 11:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 10:47 [PATCH 0/2] Expose wmtp status as engine capability Nirmoy Das
2024-08-09 10:47 ` [PATCH 1/2] drm/xe: Add has_wmtp GT info Nirmoy Das
2024-08-09 11:55   ` Nirmoy Das [this message]
2024-08-09 10:47 ` [PATCH 2/2] drm/xe/uapi: Expose wmtp as engine capability Nirmoy Das
2024-08-14 10:37   ` Jablonski, Mateusz
2024-08-09 11:08 ` ✓ CI.Patch_applied: success for Expose wmtp status " Patchwork
2024-08-09 11:09 ` ✓ CI.checkpatch: " Patchwork
2024-08-09 11:10 ` ✓ CI.KUnit: " Patchwork
2024-08-09 11:22 ` ✓ CI.Build: " Patchwork
2024-08-09 11:24 ` ✗ CI.Hooks: failure " Patchwork
2024-08-09 11:25 ` ✓ CI.checksparse: success " Patchwork
2024-08-09 11:52 ` ✗ CI.BAT: failure " Patchwork
2024-08-09 13:31 ` ✗ CI.FULL: " 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=c61b182f-739e-4b41-803c-123feabc2ab1@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=lionel.g.landwerlin@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=mateusz.jablonski@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=nirmoy.das@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