All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/fbc: fix FBC_COMPRESSION_MASK on BDW+
Date: Fri, 21 Oct 2016 19:08:01 +0300	[thread overview]
Message-ID: <20161021160801.GW4329@intel.com> (raw)
In-Reply-To: <1477065346-13736-2-git-send-email-paulo.r.zanoni@intel.com>

On Fri, Oct 21, 2016 at 01:55:46PM -0200, Paulo Zanoni wrote:
> Its size is 11:0 instead of 10:0. Found by inspecting the spec. I'm
> not aware of any real-world IGT failures caused by this.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++----
>  drivers/gpu/drm/i915/i915_reg.h     |  5 +++--
>  2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index dc057c7..b54ff40 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1674,11 +1674,13 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>  		seq_printf(m, "FBC disabled: %s\n",
>  			   dev_priv->fbc.no_fbc_reason);
>  
> -	if (intel_fbc_is_active(dev_priv) &&
> -	    INTEL_GEN(dev_priv) >= 7)
> +	if (intel_fbc_is_active(dev_priv) && INTEL_GEN(dev_priv) >= 7) {
> +		uint32_t mask = INTEL_GEN(dev_priv) >= 8 ?
> +				BDW_FBC_COMPRESSION_MASK :
> +				IVB_FBC_COMPRESSION_MASK;
>  		seq_printf(m, "Compressing: %s\n",
> -			   yesno(I915_READ(FBC_STATUS2) &
> -				 FBC_COMPRESSION_MASK));
> +			   yesno(I915_READ(FBC_STATUS2) & mask));
> +	}
>  
>  	mutex_unlock(&dev_priv->fbc.lock);
>  	intel_runtime_pm_put(dev_priv);
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 00efaa1..a9be3f0 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2188,8 +2188,9 @@ enum skl_disp_power_wells {
>  #define FBC_FENCE_OFF		_MMIO(0x3218) /* BSpec typo has 321Bh */
>  #define FBC_TAG(i)		_MMIO(0x3300 + (i) * 4)
>  
> -#define FBC_STATUS2		_MMIO(0x43214)
> -#define  FBC_COMPRESSION_MASK	0x7ff
> +#define FBC_STATUS2			_MMIO(0x43214)
> +#define  IVB_FBC_COMPRESSION_MASK	0x7ff
> +#define  BDW_FBC_COMPRESSION_MASK	0xfff

I'm not sure this mask is doing us any good since the high bits
are all MBZ anyway.

But this matches the spec so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
>  #define FBC_LL_SIZE		(1536)
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-21 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 15:55 [PATCH 1/2] drm/i915/fbc: fix CFB size calculation for gen8+ Paulo Zanoni
2016-10-21 15:55 ` [PATCH 2/2] drm/i915/fbc: fix FBC_COMPRESSION_MASK on BDW+ Paulo Zanoni
2016-10-21 16:08   ` Ville Syrjälä [this message]
2016-10-21 16:07 ` [PATCH 1/2] drm/i915/fbc: fix CFB size calculation for gen8+ Ville Syrjälä
2016-10-21 17:16 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " 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=20161021160801.GW4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.