[Intel-gfx] [PATCH] drm/i915/rpl-s: Add stepping info

Matt Roper matthew.d.roper at intel.com
Sat Jan 22 01:20:51 UTC 2022


On Fri, Jan 21, 2022 at 11:30:23AM -0800, Anusha Srivatsa wrote:
> Add stepping-substepping info in
> accordance to BSpec changes.
> 
> Bspec: 53655
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_step.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_step.c b/drivers/gpu/drm/i915/intel_step.c
> index a4b16b9e2e55..74cb9dadcab9 100644
> --- a/drivers/gpu/drm/i915/intel_step.c
> +++ b/drivers/gpu/drm/i915/intel_step.c
> @@ -122,6 +122,11 @@ static const struct intel_step_info dg2_g11_revid_step_tbl[] = {
>  	[0x5] = { COMMON_GT_MEDIA_STEP(B1), .display_step = STEP_C0 },
>  };
>  
> +static const struct intel_step_info adls_rpls_revids[] = {
> +	[0x4] = { COMMON_GT_MEDIA_STEP(D0), .display_step = STEP_D0 },
> +	[0xC] = { COMMON_GT_MEDIA_STEP(D0), .display_step = STEP_C0 },
> +};
> +
>  void intel_step_init(struct drm_i915_private *i915)
>  {
>  	const struct intel_step_info *revids = NULL;
> @@ -129,7 +134,11 @@ void intel_step_init(struct drm_i915_private *i915)
>  	int revid = INTEL_REVID(i915);
>  	struct intel_step_info step = {};
>  
> -	if (IS_DG2_G10(i915)) {
> +
> +	if (IS_ADLS_RPLS(i915)) {
> +		revids = adls_rpls_revids;
> +		size = ARRAY_SIZE(adls_rpls_revids);
> +	} else if (IS_DG2_G10(i915)) {

We try to keep if/else ladders sorted by platforms' logical progression,
so this should go right above the 'IS_ALDERLAKE_S' case rather than at
the top.

It looks crazy that the revision ID goes backward for the newer
stepping, but that really is how it's supposed to be on this platform.
You might want to mention that in the commit message just so people
don't wonder if it's some kind of mistake/typo.


Matt

>  		revids = dg2_g10_revid_step_tbl;
>  		size = ARRAY_SIZE(dg2_g10_revid_step_tbl);
>  	} else if (IS_DG2_G11(i915)) {
> -- 
> 2.25.1
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795


More information about the Intel-gfx mailing list