All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH] drm/i915: update FBC maximum fb sizes
Date: Tue, 4 Jun 2013 20:57:52 +0300	[thread overview]
Message-ID: <20130604175752.GF5004@intel.com> (raw)
In-Reply-To: <CA+gsUGSZj-h=VvWLzv6zKYsmh_ty1ma54jn+vh8v_cFY7o+-rw@mail.gmail.com>

On Tue, Jun 04, 2013 at 02:46:14PM -0300, Paulo Zanoni wrote:
> 2013/6/4 Daniel Vetter <daniel@ffwll.ch>:
> > On Mon, Jun 3, 2013 at 11:15 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> >> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >>
> >> CTG/ILK/SNB/IVB support 4kx2k surfaces. HSW supports 4kx4k, but
> >> without proper front buffer invalidation on the last 2k lines, so
> >> don't enable FBC on these cases for now.
> >>
> >> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++++++---
> >>  1 file changed, 12 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> >> index 49a1887..cf123c1 100644
> >> --- a/drivers/gpu/drm/i915/intel_pm.c
> >> +++ b/drivers/gpu/drm/i915/intel_pm.c
> >> @@ -431,7 +431,7 @@ void intel_disable_fbc(struct drm_device *dev)
> >>   *   - no pixel mulitply/line duplication
> >>   *   - no alpha buffer discard
> >>   *   - no dual wide
> >> - *   - framebuffer <= 2048 in width, 1536 in height
> >> + *   - framebuffer <= max_hdisplay in width, max_vdisplay in height
> >>   *
> >>   * We can't assume that any compression will take place (worst case),
> >>   * so the compressed buffer has to be the same size as the uncompressed
> >> @@ -449,6 +449,7 @@ void intel_update_fbc(struct drm_device *dev)
> >>         struct intel_framebuffer *intel_fb;
> >>         struct drm_i915_gem_object *obj;
> >>         int enable_fbc;
> >> +       unsigned int max_hdisplay, max_vdisplay;
> >>
> >>         if (!i915_powersave)
> >>                 return;
> >> @@ -507,8 +508,16 @@ void intel_update_fbc(struct drm_device *dev)
> >>                 dev_priv->no_fbc_reason = FBC_UNSUPPORTED_MODE;
> >>                 goto out_disable;
> >>         }
> >> -       if ((crtc->mode.hdisplay > 2048) ||
> >> -           (crtc->mode.vdisplay > 1536)) {
> >> +
> >> +       if (IS_G4X(dev) || INTEL_INFO(dev)->gen > 4) {
> >
> > Bikeshed-time: I prefer gen checks to be of the form gen >= x or gen <
> > y because:
> > - It looks more like C code should look like.
> > - We we talk about platform ranges we tend to use e.g. ilk+ and
> > pre-gen6, so would fit more naturally with the written word.
> >
> > Patch looks good otherwise, but for a bit I was thinking "wait, g4x is
> > gen4, what's going on here?" ...
> 
> Yeah, you're right. I was trying to find out "how do I check for
> Cantiga+?" and basically copied the line I found inside
> intel_crtc_compute_config. We could really have a map between these
> older codenames and our checks somewhere.

We should maybe also have some feature macro for ctg+ display. Much
of the north display changed already for ctg rather than ilk.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-06-04 17:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 21:30 [PATCH] drm/i915: Haswell FBC supports up to 4096x4096 Paulo Zanoni
2013-05-23 23:41 ` Daniel Vetter
2013-05-24 11:09   ` Ville Syrjälä
2013-06-03 21:15   ` [PATCH] drm/i915: update FBC maximum fb sizes Paulo Zanoni
2013-06-04 17:40     ` Daniel Vetter
2013-06-04 17:46       ` Paulo Zanoni
2013-06-04 17:57         ` Ville Syrjälä [this message]
2013-06-04 19:53       ` Paulo Zanoni
2013-06-06 13:19         ` Daniel Vetter

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=20130604175752.GF5004@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@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.