All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Praveen Paneri <praveen.paneri@intel.com>
Cc: intel-gfx@lists.freedesktop.org, paulo.r.zanoni@intel.com
Subject: Re: [PATCH] drm/i915: Enable FBC for non X-tiled FBs
Date: Thu, 16 Mar 2017 22:13:39 +0200	[thread overview]
Message-ID: <20170316201339.GJ31595@intel.com> (raw)
In-Reply-To: <58CA78F6.7010204@intel.com>

On Thu, Mar 16, 2017 at 05:07:26PM +0530, Praveen Paneri wrote:
> Hi Ville,
> 
> On Wednesday 15 March 2017 03:53 PM, Ville Syrjälä wrote:
> > On Wed, Mar 15, 2017 at 12:29:35PM +0530, Praveen Paneri wrote:
> >> FBC is only enabled for X-tiled framebuffers but there are
> >> quite a few cases where we tend to use Y-tiled framebuffers.
> >> So enabling it for non X-tiled framebuffers.
> >
> > This patch doesn't actuall enable anything. In fact to me it looks like
> > we're already allowing Y tiling + FBC, so the commit message/subject should
> > likely say that you're fixing something.
> >
> I agree! I can rename the patch as
> Fix FBC Stride programming for Y-tiled FBs
> > Unless I'm missing some magic check somewhere that still prevents
> > Y tiled + FBC. But then this patch wouldn't be sufficient either.
> We had a check to activate FBC only for X-tiled buffers but that has 
> been removed by this patch.
> https://patchwork.kernel.org/patch/9546759/
> 
> With this change, we don't know what would happen in case of Y-tiled 
> buffer as it is suggested that Stride for Y-tiled buffers must be 
> programmed by SW (Probably a HW bug/limitation).
> 
> >
> >>
> >> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
> >> ---
> >>   drivers/gpu/drm/i915/i915_reg.h  | 2 ++
> >>   drivers/gpu/drm/i915/intel_fbc.c | 8 ++++++++
> >>   2 files changed, 10 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> >> index cc843f9..9d7a376 100644
> >> --- a/drivers/gpu/drm/i915/i915_reg.h
> >> +++ b/drivers/gpu/drm/i915/i915_reg.h
> >> @@ -2506,6 +2506,8 @@ enum skl_disp_power_wells {
> >>   #define  BDW_FBC_COMPRESSION_MASK	0xfff
> >>
> >>   #define FBC_LL_SIZE		(1536)
> >> +#define FBC_YSTRIDE		_MMIO(0x4208c)
> >> +#define   FBC_STRIDE_OVERRIDE	(1<<13)
> >
> > These defines shouldn't be in the middle of the FBC1 register defines.
> > The register should also be called CHICKEN_MISC_1, so the defines
> > should live next to the other CHICKEN_MISC register defines.
> Will fix this
> >
> >>
> >>   #define FBC_LLC_READ_CTRL	_MMIO(0x9044)
> >>   #define   FBC_LLC_FULLY_OPEN	(1<<30)
> >> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> >> index 17d418b..0ac9889 100644
> >> --- a/drivers/gpu/drm/i915/intel_fbc.c
> >> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> >> @@ -301,6 +301,14 @@ static void gen7_fbc_activate(struct drm_i915_private *dev_priv)
> >>   	u32 dpfc_ctl;
> >>   	int threshold = dev_priv->fbc.threshold;
> >>
> >> +	if (INTEL_GEN(dev_priv) >= 9 &&
> >
> > AFAICS IS_GEN9() would be better.
> Yes!
> >
> >> +	    i915_gem_object_get_tiling(cache->vma->obj) != I915_TILING_X) {
> >> +		struct intel_fbc_state_cache *cache = &dev_priv->fbc.state_cache;
> >> +		int cfb_stride = DIV_ROUND_UP(cache->plane.src_w,
> >> +					      (32 * threshold)) * 8;
> >
> > Are we taking this compressed stride alignment requirement into account
> > when we allocate the cfb?
> cfb size is calculated as (line * cache->fb.stride) but cfb is allocated 
> as per the original FB size (threshold = 1) where stride would be higher 
> than what is calculated here. Would we still need to take care of the 
> alignment?

I don't know. The cfb allocation code is too hard to follow so I've
decided not to even try.

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

  parent reply	other threads:[~2017-03-16 20:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15  6:59 [PATCH] drm/i915: Enable FBC for non X-tiled FBs Praveen Paneri
2017-03-15  7:02 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-03-15  7:43 ` [PATCH v2] " Praveen Paneri
2017-03-15  8:34 ` ✗ Fi.CI.BAT: failure for drm/i915: Enable FBC for non X-tiled FBs (rev2) Patchwork
2017-03-15  8:48 ` ✓ Fi.CI.BAT: success " Patchwork
2017-03-15 10:23 ` [PATCH] drm/i915: Enable FBC for non X-tiled FBs Ville Syrjälä
2017-03-16 11:37   ` Praveen Paneri
2017-03-16 12:08     ` [PATCH v3] drm/i915: Fix FBC cfb stride programming for non X-tiled FB Praveen Paneri
2017-03-16 19:54       ` Paulo Zanoni
2017-03-17 19:12         ` Praveen Paneri
2017-03-24 11:42           ` [PATCH v4] " Praveen Paneri
2017-07-14 19:34             ` Paulo Zanoni
2017-07-18 18:57               ` [PATCH v5] " Praveen Paneri
2017-07-25 18:29                 ` Paulo Zanoni
2017-08-10 18:30                   ` [PATCH v6] " Praveen Paneri
2017-08-26  0:49                     ` Paulo Zanoni
2017-08-28  6:50                       ` Praveen Paneri
2017-03-16 20:13     ` Ville Syrjälä [this message]
2017-03-16 12:28 ` ✓ Fi.CI.BAT: success for drm/i915: Enable FBC for non X-tiled FBs (rev3) Patchwork
2017-03-18  1:35 ` [PATCH] drm/i915: Enable FBC for non X-tiled FBs kbuild test robot
2017-03-24 12:07 ` ✓ Fi.CI.BAT: success for drm/i915: Enable FBC for non X-tiled FBs (rev4) Patchwork
2017-07-18 19:04 ` ✓ Fi.CI.BAT: success for drm/i915: Enable FBC for non X-tiled FBs (rev5) Patchwork
2017-08-11  8:13 ` ✓ Fi.CI.BAT: success for drm/i915: Enable FBC for non X-tiled FBs (rev6) 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=20170316201339.GJ31595@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=praveen.paneri@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.