Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/gt: Use MEDIA_VER() when handling media fuses
Date: Mon, 12 Sep 2022 10:49:25 +0200	[thread overview]
Message-ID: <71c9946b-4ef0-4445-830c-bbe7af4fd9b0@intel.com> (raw)
In-Reply-To: <20220909-media-v2-1-6f20f322b4ef@intel.com>

On 10.09.2022 01:18, Lucas De Marchi wrote:
> Check for media IP version instead of graphics since this is figuring
> out the media engines' configuration. Currently the only platform with
> non-matching graphics/media version is Meteor Lake: update the check in
> gen11_vdbox_has_sfc() so it considers not only version 12, but also any
> later version which then includes that platform.
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index 6e0122b3dca2..b6602439224d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -654,13 +654,12 @@ bool gen11_vdbox_has_sfc(struct intel_gt *gt,
>   	 */
>   	if ((gt->info.sfc_mask & BIT(physical_vdbox / 2)) == 0)
>   		return false;
> -	else if (GRAPHICS_VER(i915) == 12)
> +	else if (MEDIA_VER(i915) >= 12)
>   		return (physical_vdbox % 2 == 0) ||
>   			!(BIT(physical_vdbox - 1) & vdbox_mask);
> -	else if (GRAPHICS_VER(i915) == 11)
> +	else if (MEDIA_VER(i915) == 11)
>   		return logical_vdbox % 2 == 0;
>   
> -	MISSING_CASE(GRAPHICS_VER(i915));
>   	return false;
>   }
>   
> @@ -747,14 +746,14 @@ static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
>   	 * and bits have disable semantices.
>   	 */
>   	media_fuse = intel_uncore_read(uncore, GEN11_GT_VEBOX_VDBOX_DISABLE);
> -	if (GRAPHICS_VER_FULL(i915) < IP_VER(12, 50))
> +	if (MEDIA_VER_FULL(i915) < IP_VER(12, 50))
>   		media_fuse = ~media_fuse;
>   
>   	vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
>   	vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
>   		      GEN11_GT_VEBOX_DISABLE_SHIFT;
>   
> -	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
> +	if (MEDIA_VER_FULL(i915) >= IP_VER(12, 50)) {
>   		fuse1 = intel_uncore_read(uncore, HSW_PAVP_FUSE1);
>   		gt->info.sfc_mask = REG_FIELD_GET(XEHP_SFC_ENABLE_MASK, fuse1);
>   	} else {
> 


  reply	other threads:[~2022-09-12  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 23:18 [Intel-gfx] [PATCH v2 0/2] drm/i915: Media fuses future-proofing Lucas De Marchi
2022-09-09 23:18 ` [Intel-gfx] [PATCH v2 1/2] drm/i915/gt: Use MEDIA_VER() when handling media fuses Lucas De Marchi
2022-09-12  8:49   ` Andrzej Hajda [this message]
2022-09-09 23:18 ` [Intel-gfx] [PATCH v2 2/2] drm/i915/gt: Extract function to apply " Lucas De Marchi
2022-09-12  8:56   ` Andrzej Hajda
2022-09-12 15:32     ` Lucas De Marchi
2022-09-10  0:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Media fuses future-proofing Patchwork
2022-09-10  6:44 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-12 16:14 ` [Intel-gfx] [PATCH v2 0/2] " Lucas De Marchi

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=71c9946b-4ef0-4445-830c-bbe7af4fd9b0@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@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