Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [Intel-xe] [PATCH 06/15] drm/xe/xe2: Handle fused-off CCS engines
Date: Mon, 21 Aug 2023 20:12:23 +0530	[thread overview]
Message-ID: <ZON3z2KDdOVGyz96@bvivekan-mobl> (raw)
In-Reply-To: <20230811160618.477297-7-lucas.demarchi@intel.com>

On 11.08.2023 09:06, Lucas De Marchi wrote:
> From: Matt Roper <matthew.d.roper@intel.com>
> 
> On Xe2 platforms, availability of the CCS engines is reflected in the
> FUSE4 register.
> 
> Bspec: 62483
> Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/xe/regs/xe_gt_regs.h |  1 +
>  drivers/gpu/drm/xe/xe_hw_engine.c    | 29 +++++++++++++++++++++++++++-
>  2 files changed, 29 insertions(+), 1 deletion(-)

Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Regards,
Bala

> 
> diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> index 5bc6c7fa4759f..b8dde495b8a32 100644
> --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> @@ -154,6 +154,7 @@
>  
>  /* Fuse readout registers for GT */
>  #define XEHP_FUSE4				XE_REG(0x9114)
> +#define   CCS_EN_MASK				REG_GENMASK(19, 16)
>  #define   GT_L3_EXC_MASK			REG_GENMASK(6, 4)
>  
>  #define GT_VEBOX_VDBOX_DISABLE			XE_REG(0x9140)
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
> index b8fcc6e985cfc..d2c358e711cb6 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.c
> @@ -529,7 +529,7 @@ static void read_copy_fuses(struct xe_gt *gt)
>  	}
>  }
>  
> -static void read_compute_fuses(struct xe_gt *gt)
> +static void read_compute_fuses_from_dss(struct xe_gt *gt)
>  {
>  	struct xe_device *xe = gt_to_xe(gt);
>  
> @@ -556,6 +556,33 @@ static void read_compute_fuses(struct xe_gt *gt)
>  	}
>  }
>  
> +static void read_compute_fuses_from_reg(struct xe_gt *gt)
> +{
> +	struct xe_device *xe = gt_to_xe(gt);
> +	u32 ccs_mask;
> +
> +	ccs_mask = xe_mmio_read32(gt, XEHP_FUSE4);
> +	ccs_mask = REG_FIELD_GET(CCS_EN_MASK, ccs_mask);
> +
> +	for (int i = XE_HW_ENGINE_CCS0, j = 0; i <= XE_HW_ENGINE_CCS3; ++i, ++j) {
> +		if (!(gt->info.engine_mask & BIT(i)))
> +			continue;
> +
> +		if ((ccs_mask & BIT(j)) == 0) {
> +			gt->info.engine_mask &= ~BIT(i);
> +			drm_info(&xe->drm, "ccs%u fused off\n", j);
> +		}
> +	}
> +}
> +
> +static void read_compute_fuses(struct xe_gt *gt)
> +{
> +	if (GRAPHICS_VER(gt_to_xe(gt)) >= 20)
> +		read_compute_fuses_from_reg(gt);
> +	else
> +		read_compute_fuses_from_dss(gt);
> +}
> +
>  int xe_hw_engines_init_early(struct xe_gt *gt)
>  {
>  	int i;
> -- 
> 2.40.1
> 

  parent reply	other threads:[~2023-08-21 14:42 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 16:06 [Intel-xe] [PATCH 00/15] Add Lunar Lake support Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 01/15] drm/xe/xe2: Update render/compute context image sizes Lucas De Marchi
2023-08-16 20:47   ` Matt Atwood
2023-08-11 16:06 ` [Intel-xe] [PATCH 02/15] drm/xe/xe2: Add GT topology readout Lucas De Marchi
2023-08-16 21:25   ` Matt Atwood
2023-08-17 13:51   ` Balasubramani Vivekanandan
2023-08-11 16:06 ` [Intel-xe] [PATCH 03/15] drm/xe/xe2: Add MCR register steering for primary GT Lucas De Marchi
2023-08-16 22:27   ` Matt Atwood
2023-08-17 14:47     ` Lucas De Marchi
2023-08-18  6:11       ` Balasubramani Vivekanandan
2023-08-18 16:30         ` Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 04/15] drm/xe/xe2: Add MCR register steering for media GT Lucas De Marchi
2023-08-17 18:05   ` Matt Atwood
2023-08-11 16:06 ` [Intel-xe] [PATCH 05/15] drm/xe/xe2: Update context image layouts Lucas De Marchi
2023-08-17 20:00   ` Matt Atwood
2023-08-11 16:06 ` [Intel-xe] [PATCH 06/15] drm/xe/xe2: Handle fused-off CCS engines Lucas De Marchi
2023-08-17 22:37   ` Matt Atwood
2023-08-21 14:42   ` Balasubramani Vivekanandan [this message]
2023-08-11 16:06 ` [Intel-xe] [PATCH 07/15] drm/xe/xe2: AuxCCS is no longer used Lucas De Marchi
2023-08-18  7:16   ` Balasubramani Vivekanandan
2023-08-11 16:06 ` [Intel-xe] [PATCH 08/15] drm/xe/xe2: Define Xe2_LPG IP features Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 09/15] drm/xe/xe2: Define Xe2_LPM " Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 10/15] drm/xe/xe2: Track VA bits independently of max page table level Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 11/15] drm/xe/xe2: Add MOCS table Lucas De Marchi
2023-08-11 16:21   ` Matt Roper
2023-08-11 21:44     ` Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 12/15] drm/xe/xe2: Program GuC's MOCS on Xe2 and beyond Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 13/15] drm/xe/lnl: Add LNL platform definition Lucas De Marchi
2023-08-11 16:23   ` Matt Roper
2023-08-11 16:42     ` Lucas De Marchi
2023-08-17 15:15       ` Lucas De Marchi
2023-08-17  8:37   ` Balasubramani Vivekanandan
2023-08-11 16:06 ` [Intel-xe] [PATCH 14/15] drm/xe/lnl: Add GuC firmware definition Lucas De Marchi
2023-08-11 17:15   ` Matthew Brost
2023-08-17 15:07     ` Lucas De Marchi
2023-08-11 16:06 ` [Intel-xe] [PATCH 15/15] drm/xe/lnl: Hook up MOCS table Lucas De Marchi
2023-08-11 16:22   ` Matt Roper
2023-08-11 17:08 ` [Intel-xe] ✓ CI.Patch_applied: success for Add Lunar Lake support Patchwork
2023-08-11 17:08 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-11 17:10 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-11 17:14 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-11 17:14 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-11 17:14 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-11 17:37 ` [Intel-xe] ✗ CI.BAT: 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=ZON3z2KDdOVGyz96@bvivekan-mobl \
    --to=balasubramani.vivekanandan@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