All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: Enable FBC at Haswell.
Date: Wed, 24 Apr 2013 20:36:53 +0300	[thread overview]
Message-ID: <20130424173653.GS4469@intel.com> (raw)
In-Reply-To: <1366739541-4565-5-git-send-email-rodrigo.vivi@gmail.com>

On Tue, Apr 23, 2013 at 02:52:19PM -0300, Rodrigo Vivi wrote:
> This patch introduce Frame Buffer Compression (FBC) support for HSW.
> FBC is tied to primary plane A in HSW.

The docs say FBC must be disabled before disabling the plane on HSW.
We're doing these steps in the opposite order on ILK+. Although maybe
it's not a big deal when were disabling the pipe too.

But I'd just change the order of these operations in both
ironlake_crtc_disable() and haswell_crtc_disable(). Otherwise people
will get confused every time they try to figure out why the order of
operations is different.

> ---
>  drivers/gpu/drm/i915/i915_drv.c |  1 +
>  drivers/gpu/drm/i915/intel_pm.c | 15 +++++++++------
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index a073b4c..6bf7ab4 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -315,6 +315,7 @@ static const struct intel_device_info intel_haswell_m_info = {
>  	GEN7_FEATURES,
>  	.is_haswell = 1,
>  	.is_mobile = 1,
> +	.has_fbc = 1,
>  };
>  
>  static const struct pci_device_id pciidlist[] = {		/* aka */
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index a33490c..972a1a3 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -275,10 +275,12 @@ static void gen7_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
>  		   IVB_DPFC_CTL_FENCE_EN |
>  		   intel_crtc->plane << IVB_DPFC_CTL_PLANE_SHIFT);
>  
> -	/* WaFbcAsynchFlipDisableFbcQueue */
> -	I915_WRITE(ILK_DISPLAY_CHICKEN1, ILK_FBCQ_DIS);
> -	/* WaFbcDisableDpfcClockGating */
> -	I915_WRITE(ILK_DSPCLK_GATE_D, ILK_DPFCUNIT_CLOCK_GATE_DISABLE);
> +	if (IS_IVYBRIDGE(dev)) {
> +		/* WaFbcAsynchFlipDisableFbcQueue */
> +		I915_WRITE(ILK_DISPLAY_CHICKEN1, ILK_FBCQ_DIS);
> +		/* WaFbcDisableDpfcClockGating */
> +		I915_WRITE(ILK_DSPCLK_GATE_D, ILK_DPFCUNIT_CLOCK_GATE_DISABLE);
> +	}
>  
>  	I915_WRITE(SNB_DPFC_CTL_SA,
>  		   SNB_CPU_FENCE_ENABLE | obj->fence_reg);
> @@ -496,7 +498,8 @@ void intel_update_fbc(struct drm_device *dev)
>  		dev_priv->no_fbc_reason = FBC_MODE_TOO_LARGE;
>  		goto out_disable;
>  	}
> -	if ((IS_I915GM(dev) || IS_I945GM(dev)) && intel_crtc->plane != 0) {
> +	if ((IS_I915GM(dev) || IS_I945GM(dev) || IS_HASWELL(dev)) &&
> +	    intel_crtc->plane != 0) {
>  		DRM_DEBUG_KMS("plane not 0, disabling compression\n");
>  		dev_priv->no_fbc_reason = FBC_BAD_PLANE;
>  		goto out_disable;
> @@ -4216,7 +4219,7 @@ void intel_init_pm(struct drm_device *dev)
>  	if (I915_HAS_FBC(dev)) {
>  		if (HAS_PCH_SPLIT(dev)) {
>  			dev_priv->display.fbc_enabled = ironlake_fbc_enabled;
> -			if (IS_IVYBRIDGE(dev))
> +			if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev))
>  				dev_priv->display.enable_fbc =
>  					gen7_enable_fbc;
>  			else
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-04-24 17:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 17:52 [PATCH 0/6] Enabling Frame Buffer Compression (FBC) for IVB and HSW Rodrigo Vivi
2013-04-23 17:52 ` [PATCH 1/6] drm/i915: Enable FBC at Ivybridge Rodrigo Vivi
2013-04-23 19:04   ` Matt Turner
2013-04-23 19:57     ` Rodrigo Vivi
2013-04-23 20:55     ` [PATCH] drm/i915: Add support for FBC on Ivybridge Rodrigo Vivi
2013-04-24 16:47       ` Ville Syrjälä
2013-04-25 19:15         ` Rodrigo Vivi
2013-04-23 17:52 ` [PATCH 2/6] drm/i915: IVB FBC WaFbcAsynchFlipDisableFbcQueue Rodrigo Vivi
2013-04-24 17:00   ` Ville Syrjälä
2013-04-23 17:52 ` [PATCH 3/6] drm/i915: IVB FBC WaFbcDisableDpfcClockGating Rodrigo Vivi
2013-04-24 17:15   ` Ville Syrjälä
2013-04-23 17:52 ` [PATCH 4/6] drm/i915: Enable FBC at Haswell Rodrigo Vivi
2013-04-24 17:36   ` Ville Syrjälä [this message]
2013-04-23 17:52 ` [PATCH 5/6] drm/i915: HSW FBC WaFbcAsynchFlipDisableFbcQueue Rodrigo Vivi
2013-04-24 17:38   ` Ville Syrjälä
2013-04-23 17:52 ` [PATCH 6/6] drm/i915: HSW FBC WaFbcDisableDpfcClockGating Rodrigo Vivi
2013-04-24 17:41   ` Ville Syrjälä
  -- strict thread matches above, loose matches on Subject: below --
2013-04-25 17:15 [PATCH 1/6] drm/i915: Add support for FBC on Ivybridge Rodrigo Vivi
2013-04-25 17:15 ` [PATCH 4/6] drm/i915: Enable FBC at Haswell Rodrigo Vivi
2013-05-06 22:37 [PATCH 1/6] drm/i915: Add support for FBC on Ivybridge Rodrigo Vivi
2013-05-06 22:37 ` [PATCH 4/6] drm/i915: Enable FBC at Haswell Rodrigo Vivi

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=20130424173653.GS4469@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.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.