diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-06-13 13:23:42 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 05:11:08 +1000 |
commit | 7e1ee6333c32a4b83aad430a4bcb8a7057f36194 (patch) | |
tree | e3f921e98245fe9f7c2582fdf8c2e21a795ba25f /drivers/gpu/drm/nouveau/core/engine/device | |
parent | d5d7a0fa742383406c84e5292d00eccdbf74d91a (diff) | |
download | op-kernel-dev-7e1ee6333c32a4b83aad430a4bcb8a7057f36194.zip op-kernel-dev-7e1ee6333c32a4b83aad430a4bcb8a7057f36194.tar.gz |
drm/nouveau/clk: allow selection of different power state for ac vs battery
v2:
- s/init/fini/ typo, reported by Alex
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/device')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/ctrl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/ctrl.c b/drivers/gpu/drm/nouveau/core/engine/device/ctrl.c index 4b69bf5..754fc1d 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/ctrl.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/ctrl.c @@ -41,7 +41,10 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object, u32 mthd, if (clk) { args->count = clk->state_nr; - args->ustate = clk->ustate; + if (clk->pwrsrc) + args->ustate = clk->ustate_ac; + else + args->ustate = clk->ustate_dc; args->pstate = clk->pstate; } else { args->count = 0; @@ -123,7 +126,7 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object, u32 mthd, if (size < sizeof(*args) || !clk) return -EINVAL; - return nouveau_clock_ustate(clk, args->state); + return nouveau_clock_ustate(clk, args->state, clk->pwrsrc); } struct nouveau_oclass |