All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state
       [not found] <1266792390-13637-1-git-send-email-zajec5@gmail.com>
@ 2010-02-22 15:38 ` Alex Deucher
  0 siblings, 0 replies; only message in thread
From: Alex Deucher @ 2010-02-22 15:38 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: dri-devel

2010/2/21 Rafał Miłecki <zajec5@gmail.com>:
> AtomBIOS tables on non-mobility GPU do not contain POWERSAVE/BATTERY.
>

Looks good.  At some point we may want to tweak the selection algo a
bit.  It looks like the lowest power states tend to have the
SINGLE_DISPLAY_ONLY flag set (which we'd have to enforce).

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  drivers/gpu/drm/radeon/radeon_pm.c |   22 ++++++++++++++++------
>  1 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index f46d574..97375d3 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -91,14 +91,24 @@ static struct radeon_power_state * radeon_pick_power_state(struct radeon_device
>        default:
>                return rdev->pm.default_power_state;
>        case POWER_STATE_TYPE_POWERSAVE:
> -               wanted_types[0] = POWER_STATE_TYPE_POWERSAVE;
> -               wanted_types[1] = POWER_STATE_TYPE_BATTERY;
> -               wanted_count = 2;
> +               if (rdev->flags & RADEON_IS_MOBILITY) {
> +                       wanted_types[0] = POWER_STATE_TYPE_POWERSAVE;
> +                       wanted_types[1] = POWER_STATE_TYPE_BATTERY;
> +                       wanted_count = 2;
> +               } else {
> +                       wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE;
> +                       wanted_count = 1;
> +               }
>                break;
>        case POWER_STATE_TYPE_BATTERY:
> -               wanted_types[0] = POWER_STATE_TYPE_BATTERY;
> -               wanted_types[1] = POWER_STATE_TYPE_POWERSAVE;
> -               wanted_count = 2;
> +               if (rdev->flags & RADEON_IS_MOBILITY) {
> +                       wanted_types[0] = POWER_STATE_TYPE_BATTERY;
> +                       wanted_types[1] = POWER_STATE_TYPE_POWERSAVE;
> +                       wanted_count = 2;
> +               } else {
> +                       wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE;
> +                       wanted_count = 1;
> +               }
>                break;
>        case POWER_STATE_TYPE_BALANCED:
>        case POWER_STATE_TYPE_PERFORMANCE:
> --
> 1.6.4.2
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-22 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1266792390-13637-1-git-send-email-zajec5@gmail.com>
2010-02-22 15:38 ` [PATCH] drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state Alex Deucher

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.