From: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: tim.gardner@canonical.com, platform-driver-x86@vger.kernel.org,
mjg59@redhat.com
Subject: Re: [PATCH 2/2] IPS driver: verify BIOS provided limits
Date: Mon, 27 Sep 2010 10:38:39 -0700 [thread overview]
Message-ID: <20100927103839.797fe6bb@jbarnes-desktop> (raw)
In-Reply-To: <20100923145301.77eaccca@jbarnes-desktop>
On Thu, 23 Sep 2010 14:53:01 -0700
Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Thu, 23 Sep 2010 23:49:29 +0200
> Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>
> > They're optional. If not present or sane, we should use the CPU
> > defaults.
> >
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> > drivers/platform/x86/intel_ips.c | 23 +++++++++++++++++++++++
> > 1 files changed, 23 insertions(+), 0 deletions(-)
>
> Note this patch is necessary but not sufficient. At least on one of my
> test platforms, I see really bad looking chipset power values from the
> i915 driver. That will trigger spurious "power exceeded" messages and
> unnecessarily limit your GPU performance. Working on a fix now.
Already sent this fix to Chris for inclusion, but here it is for
reference and testing in this thread.
--
Jesse Barnes, Intel Open Source Technology Center
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 9d67b48..c74e4e8 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1787,9 +1787,9 @@ unsigned long i915_chipset_val(struct drm_i915_private *dev_priv)
}
}
- div_u64(diff, diff1);
+ diff = div_u64(diff, diff1);
ret = ((m * diff) + c);
- div_u64(ret, 10);
+ ret = div_u64(ret, 10);
dev_priv->last_count1 = total_count;
dev_priv->last_time1 = now;
@@ -1858,7 +1858,7 @@ void i915_update_gfx_val(struct drm_i915_private *dev_priv)
/* More magic constants... */
diff = diff * 1181;
- div_u64(diff, diffms * 10);
+ diff = div_u64(diff, diffms * 10);
dev_priv->gfx_power = diff;
}
next prev parent reply other threads:[~2010-09-27 17:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 21:49 [PATCH 1/2] IPS driver: don't toggle CPU turbo on unsupported CPUs Jesse Barnes
2010-09-23 21:49 ` [PATCH 2/2] IPS driver: verify BIOS provided limits Jesse Barnes
2010-09-23 21:53 ` Jesse Barnes
2010-09-27 17:38 ` Jesse Barnes [this message]
2010-09-23 21:51 ` [PATCH 1/2] IPS driver: don't toggle CPU turbo on unsupported CPUs Jesse Barnes
2010-09-23 21:58 ` Rafael J. Wysocki
2010-09-23 22:18 ` Jesse Barnes
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=20100927103839.797fe6bb@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=mjg59@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tim.gardner@canonical.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