public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: "Runyan, Arthur J" <arthur.j.runyan@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>,
	"Widawsky, Benjamin" <benjamin.widawsky@intel.com>
Subject: Re: [PATCH 3/4] drm/i915: Try harder to get FBC
Date: Fri, 20 Jun 2014 09:55:34 -0700	[thread overview]
Message-ID: <20140620165533.GC23411@bwidawsk.net> (raw)
In-Reply-To: <C7E999358BBE9E45938BA940F5F511087490D710@fmsmsx116.amr.corp.intel.com>

Rodrigo, when you're ready, can you pull in Art's requests?

On Fri, Jun 20, 2014 at 03:56:08PM +0000, Runyan, Arthur J wrote:
> You give me too much credit.  I just gave you an explanation of what the hardware does, then you ran with it.
> 
> On Thu, Jun 19, 2014 at 12:06:13PM -0700, Ben Widawsky wrote:
> +		DRM_INFO("Reducing the compressed framebuffer size. This may lead to increased power. Try to increase stolen memory size if available in BIOS.\n");
> 
> I prefer "This may lead to less power savings than a non-reduced size." since FBC is still going to save power.

Got it.

> 
>  	dpfc_ctl = DPFC_CTL_PLANE(intel_crtc->plane);
>  	if (drm_format_plane_cpp(fb->pixel_format, 0) == 2)
> +		dev_priv->fbc.threshold++;
> +
> +	switch (dev_priv->fbc.threshold) {
> +	case 4:
> +		dpfc_ctl |= DPFC_CTL_LIMIT_4X;
> +		break;
> +	case 2:
>  		dpfc_ctl |= DPFC_CTL_LIMIT_2X;
> -	else
> +		break;
> +	case 1:
>  		dpfc_ctl |= DPFC_CTL_LIMIT_1X;
> +		break;
> +	}
> 
> I Am Not A Coder, but at a glance it looks like the ++ could lead to undefined case 3 when you want case 4.
> 
Thanks for your feedback. 3 is an invalid value, but a default case
should be added here. I'd do a BUG_ON, but that's strictly forbidden.

-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2014-06-20 16:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 19:06 [PATCH 1/4] drm/i915: Move compressed_fb to static allocation Ben Widawsky
2014-06-19 19:06 ` [PATCH 2/4] drm/i915: Extract CFB threshold calculation Ben Widawsky
2014-07-01  0:16   ` Rodrigo Vivi
2014-06-19 19:06 ` [PATCH 3/4] drm/i915: Try harder to get FBC Ben Widawsky
2014-06-20 15:56   ` Runyan, Arthur J
2014-06-20 16:55     ` Ben Widawsky [this message]
2014-06-30 17:41       ` [PATCH] " Rodrigo Vivi
2014-07-01 16:09         ` Rodrigo Vivi
2014-07-03 11:52           ` Jani Nikula
2014-06-19 19:06 ` [PATCH 4/4] drm/i915: Reserve space for FBC (fbcon) Ben Widawsky
2014-06-19 19:28   ` Chris Wilson
2014-06-19 19:41     ` Ben Widawsky
2014-07-01  3:34     ` Ben Widawsky
2014-07-01  0:15 ` [PATCH 1/4] drm/i915: Move compressed_fb to static allocation 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=20140620165533.GC23411@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=arthur.j.runyan@intel.com \
    --cc=benjamin.widawsky@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox