public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 05/10] drm/i915: Use 1/2 compression ratio limit for 16bpp on FBC2
Date: Mon, 27 Jan 2014 11:41:19 +0200	[thread overview]
Message-ID: <20140127094119.GO9454@intel.com> (raw)
In-Reply-To: <20140125195734.GH9772@phenom.ffwll.local>

On Sat, Jan 25, 2014 at 08:57:34PM +0100, Daniel Vetter wrote:
> On Thu, Jan 23, 2014 at 04:49:12PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Hm, running the fbc tests with a 16bpp fb would be neat ...

Indeed. I'll put it on the list.

> -Daniel
> 
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++++++-----
> >  1 file changed, 19 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index c6e047e..a7af5b4 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -155,7 +155,11 @@ static void g4x_enable_fbc(struct drm_crtc *crtc)
> >  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> >  	u32 dpfc_ctl;
> >  
> > -	dpfc_ctl = DPFC_CTL_PLANE(intel_crtc->plane) | DPFC_SR_EN | DPFC_CTL_LIMIT_1X;
> > +	dpfc_ctl = DPFC_CTL_PLANE(intel_crtc->plane) | DPFC_SR_EN;
> > +	if (drm_format_plane_cpp(fb->pixel_format, 0) == 2)
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_2X;
> > +	else
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_1X;
> >  	dpfc_ctl |= DPFC_CTL_FENCE_EN | obj->fence_reg;
> >  
> >  	I915_WRITE(DPFC_FENCE_YOFF, crtc->y);
> > @@ -225,7 +229,11 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc)
> >  
> >  	dpfc_ctl = I915_READ(ILK_DPFC_CONTROL);
> >  	dpfc_ctl &= DPFC_RESERVED;
> > -	dpfc_ctl |= DPFC_CTL_PLANE(intel_crtc->plane) | DPFC_CTL_LIMIT_1X;
> > +	dpfc_ctl |= DPFC_CTL_PLANE(intel_crtc->plane);
> > +	if (drm_format_plane_cpp(fb->pixel_format, 0) == 2)
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_2X;
> > +	else
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_1X;
> >  	dpfc_ctl |= DPFC_CTL_FENCE_EN;
> >  	if (IS_GEN5(dev))
> >  		dpfc_ctl |= obj->fence_reg;
> > @@ -275,10 +283,16 @@ static void gen7_enable_fbc(struct drm_crtc *crtc)
> >  	struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
> >  	struct drm_i915_gem_object *obj = intel_fb->obj;
> >  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> > +	u32 dpfc_ctl;
> >  
> > -	I915_WRITE(ILK_DPFC_CONTROL, DPFC_CTL_EN | DPFC_CTL_LIMIT_1X |
> > -		   IVB_DPFC_CTL_FENCE_EN |
> > -		   IVB_DPFC_CTL_PLANE(intel_crtc->plane));
> > +	dpfc_ctl = IVB_DPFC_CTL_PLANE(intel_crtc->plane);
> > +	if (drm_format_plane_cpp(fb->pixel_format, 0) == 2)
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_2X;
> > +	else
> > +		dpfc_ctl |= DPFC_CTL_LIMIT_1X;
> > +	dpfc_ctl |= IVB_DPFC_CTL_FENCE_EN;
> > +
> > +	I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN);
> >  
> >  	if (IS_IVYBRIDGE(dev)) {
> >  		/* WaFbcAsynchFlipDisableFbcQueue:ivb */
> > -- 
> > 1.8.3.2
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-01-27  9:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 14:49 [PATCH 00/10] drm/i915: Some less complex FBC fixes ville.syrjala
2014-01-23 14:49 ` [PATCH v3 01/10] drm/i915: Don't write IVB_FBC_RT_BASE ville.syrjala
2014-01-23 14:49 ` [PATCH 02/10] drm/i915: Don't set persistent FBC mode on ILK/SNB ville.syrjala
2014-01-23 14:49 ` [PATCH 03/10] drm/i915: Don't set DPFC_HT_MODIFY bit on CTG/ILK/SNB ville.syrjala
2014-01-23 14:49 ` [PATCH 04/10] drm/i915: Improve FBC plane defines a bit ville.syrjala
2014-01-23 14:49 ` [PATCH 05/10] drm/i915: Use 1/2 compression ratio limit for 16bpp on FBC2 ville.syrjala
2014-01-25 19:57   ` Daniel Vetter
2014-01-27  9:41     ` Ville Syrjälä [this message]
2014-01-23 14:49 ` [PATCH 06/10] drm/i915: Actually write the correct bits to DPFC_CONTROL on CTG ville.syrjala
2014-01-23 14:49 ` [PATCH 07/10] drm/i915: Don't preserve DPFC_CONTROL bits ILK/SNB ville.syrjala
2014-01-23 14:49 ` [PATCH v2 08/10] drm/i915: Kill most of the FBC register save/restore ville.syrjala
2014-01-23 14:49 ` [PATCH 09/10] drm/i915: Fix FBC1 enable message ville.syrjala
2014-01-23 14:49 ` [PATCH 10/10] drm/i915: Fix FBC_FENCE_OFF ville.syrjala
2014-01-23 19:47 ` [PATCH 00/10] drm/i915: Some less complex FBC fixes Chris Wilson
2014-01-25 19:59   ` Daniel Vetter
2014-01-26 14:33     ` Daniel Vetter
2014-01-26 14:35       ` Daniel Vetter
2014-01-27  9:40         ` Ville Syrjälä
2014-01-27  9:36       ` Ville Syrjälä

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=20140127094119.GO9454@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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