All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grigori Goronzy <greg@chown.ath.cx>
To: dri-devel@lists.freedesktop.org
Subject: P-state switching on Lenovo X121e / AMD E-450
Date: Sun, 15 Jul 2012 23:02:48 +0200	[thread overview]
Message-ID: <50032FF8.7020100@chown.ath.cx> (raw)

Hi,

I have a Lenovo X121e notebook, and the model variant in question uses
the E-450 APU. I have various problems with the GPU part of it. The most
severe seems to be that switching between power states does not work
correctly.

First off, the PowerPlay table looks rather strange. Here's what the
Linux kernel (3.5.0rc5) tells me about it:

> [    2.447536] [drm:radeon_pm_print_states], 6 Power State(s)
> [    2.447540] [drm:radeon_pm_print_states], State 0: Default
> [    2.447544] [drm:radeon_pm_print_states],    1 Clock Mode(s)
> [    2.447547] [drm:radeon_pm_print_states],            0 e: 275000
> [    2.447551] [drm:radeon_pm_print_states], State 1: Default
> [    2.447595] [drm:radeon_pm_print_states],    1 Clock Mode(s)
> [    2.447598] [drm:radeon_pm_print_states],            0 e: 507700
> [    2.447601] [drm:radeon_pm_print_states], State 2: Battery
> [    2.447604] [drm:radeon_pm_print_states],    1 Clock Mode(s)
> [    2.447607] [drm:radeon_pm_print_states],            0 e: 275000
> [    2.447611] [drm:radeon_pm_print_states], State 3: Performance
> [    2.447614] [drm:radeon_pm_print_states],    2 Clock Mode(s)
> [    2.447616] [drm:radeon_pm_print_states],            0 e: 275000     No display only
> [    2.447620] [drm:radeon_pm_print_states],            1 e: 507700
> [    2.447623] [drm:radeon_pm_print_states], State 4: Default
> [    2.447626] [drm:radeon_pm_print_states],    Default
> [    2.447629] [drm:radeon_pm_print_states], 
> [    2.447631]  2 Clock Mode(s)
> [    2.447633] [drm:radeon_pm_print_states],            0 e: 200000     No display only
> [    2.447636] [drm:radeon_pm_print_states],            1 e: 200000
> [    2.447639] [drm:radeon_pm_print_states], State 5: Default
> [    2.447642] [drm:radeon_pm_print_states],    1 Clock Mode(s)
> [    2.447645] [drm:radeon_pm_print_states],            0 e: 173690

I don't understand why there are so many different "default" states, and
why there are so many states altogether. I wonder, does the driver
actually parse the table correctly?

Nonetheless, the frequencies the power management code picks from that
for profile-based power management make some sense. low/mid use 275 MHz,
high uses 507 MHz, and default is 200 MHz. However, the default clock
reported by another of the AtomBIOS tables (I forgot its name) is 200
MHz, and that is exactly where the trouble is: radeon_set_power_state in
radeon_pm.c [1] restricts the maximum clock to the default clock! So
essentially, I am limited to just 200 MHz. I removed the checks and can
now use up to 507 MHz without any problems.

IMHO, this limitation makes little sense, and it is fine to have a
default clock that is lower than the maximum clock. The driver should
limit the maximum clock to the maximum encountered in the PowerPlay tables.

Best regards,
Grigori

[1]
http://lxr.free-electrons.com/source/drivers/gpu/drm/radeon/radeon_pm.c#L194

                 reply	other threads:[~2012-07-15 21:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=50032FF8.7020100@chown.ath.cx \
    --to=greg@chown.ath.cx \
    --cc=dri-devel@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 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.