Skip to contentSkip to conversation

Add a custom power management perflvl

PATCH In review Martin Peres 1 participant 2 messages Nov 21, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add a custom power management perflvl

Hi everyone,

Please comment on this patch allowing you to set all the PM-related clocks on the card. The patch is described in length in the commit log.

There is something some of you will like and some won't. The custom_* files will always contain the values of the current perflvl unless the user changed them after the latest reclock. I may also add all the available voltage in sysfs in the same way Ben added all the available performance levels (performance_level_X).

If you no-one has anything against it, please push it to master.

Martin

From 1df2984f21ba0bf034684b1b1287fb86a255a15c Mon Sep 17 00:00:00 2001
From: Martin Peres <[email protected]>
Date: Sat, 20 Nov 2010 18:29:45 +0100
Subject: [PATCH] Add a custom power management perflvl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is to allow people to tweak their clocks at will.
Marcin asked for something like this to help him REing.
I was personnaly interested to see if openarena fps rate would scale with the GPU clocks (it doesn't ... yet). This patch will also allow overclockers to test their cards (On my NVS 140M: Memory +66%, core: +66%, shader: +25%).

This patch introduces a few sysfs files:
- custom_*: Get/set the current clock/voltage value (kHz or *10mV)

Once you've set all the values you wanted to change, just echo "custom" into performance_level.

WARNINGS:
1) Pay attention to your current temperature, my card's temperature rose by 9°C.
We'll need to use the thermal zones to be able to monitor that and downclock the card automatically (if someone wants to help here, he would be welcome).

2) Changing clocks isn't safe at the moment, I'm working on this but the reclocking process is really different accross the boards. So far, nv84 and nv86 work perfectly (as in no flicker and being able to reclock while playing games).

By the time I get this patch ready, please stop 3D applications, switch to a tty, do the reclock and come back to X.

---
 drivers/gpu/drm/nouveau/nouveau_drv.h |    1 +
 drivers/gpu/drm/nouveau/nouveau_pm.c  |  265 ++++++++++++++++++++++++++++++++-
 2 files changed, 263 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_drv.h +1 -0
index a52b1da..5928301 100644
@@ -463,6 +463,7 @@ struct nouveau_pm_engine {
 	struct nouveau_pm_threshold_temp threshold_temp;
 
 	struct nouveau_pm_level boot;
+	struct nouveau_pm_level custom;
 	struct nouveau_pm_level *cur;
 
 	struct device *hwmon;
drivers/gpu/drm/nouveau/nouveau_pm.c +262 -3

325 lines not on this page · raw message

Signature · 1 line
1.7.3.2

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 10 lines · Martin Peres

Hi everyone,

Please comment on this patch allowing you to set all the PM-related clocks on the card. The patch is described in length in the commit log.

There is something some of you will like and some won't. The custom_* files will always contain the values of the current perflvl unless the user changed them after the latest reclock. I may also add all the available voltage in sysfs in the same way Ben added all the available performance levels (performance_level_X).

If you no-one has anything against it, please push it to master.

Martin

An updated patch taking into account the critics I've got on IRC.

Martin

From 8b29c05beb74060a7441a94b269ccc7a2ecdf250 Mon Sep 17 00:00:00 2001
From: Martin Peres <[email protected]>
Date: Sat, 20 Nov 2010 18:29:45 +0100
Subject: [PATCH] Add a custom power management perflvl v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is to allow people to tweak their clocks at will. Marcin asked for something like this to help him REing.

I was personnaly interested to see if openarena fps rate would scale with the GPU clocks (it doesn't ... yet). This patch will also allow overclockers to test their cards (On my NVS 140M: Memory +66%, core: +66%, shader: +25%).

This patch introduces a few sysfs files:
- custom_*: Get/set the current clock/voltage value (kHz or *10mV)

Once you've set all the values you wanted to change, just echo "custom" into performance_level.

WARNINGS:
1) Pay attention to your current temperature, my card's temperature rose by 9°C.
We'll need to use the thermal zones to be able to monitor that and downclock the card automatically (if someone wants to help here, he would be welcome).

2) Changing clocks isn't safe at the moment, I'm working on this but the reclocking process is really different accross the boards. So far, nv84 and nv86 work perfectly (as in no flicker and being able to reclock while playing games).

By the time I get this patch ready, please stop 3D applications, switch to a tty, do the reclock and come back to X.

---
 drivers/gpu/drm/nouveau/nouveau_drv.h |    1 +
 drivers/gpu/drm/nouveau/nouveau_pm.c  |  207 ++++++++++++++++++++++++++++++++-
 2 files changed, 207 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_drv.h +1 -0
index a52b1da..5928301 100644
@@ -463,6 +463,7 @@ struct nouveau_pm_engine {
 	struct nouveau_pm_threshold_temp threshold_temp;
 
 	struct nouveau_pm_level boot;
+	struct nouveau_pm_level custom;
 	struct nouveau_pm_level *cur;
 
 	struct device *hwmon;
drivers/gpu/drm/nouveau/nouveau_pm.c +206 -1

267 lines not on this page · raw message

Signature · 1 line
1.7.3.2

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau