summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_perf.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-01-18 09:02:28 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-03-13 17:08:06 +1000
commit085028ce3bf7136c5ab2eeb8bf012024d88905c8 (patch)
tree95d9a304926158b075401c541afec3c17dc8acf6 /drivers/gpu/drm/nouveau/nouveau_perf.c
parentfd99fd6100d3b7aaa8dc76888a38bbb15e8041bc (diff)
drm/nouveau/pm: embed timings into perflvl structs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_perf.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_perf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c
index 150ff415a17..bd6071f1000 100644
--- a/drivers/gpu/drm/nouveau/nouveau_perf.c
+++ b/drivers/gpu/drm/nouveau/nouveau_perf.c
@@ -293,7 +293,7 @@ nouveau_perf_init(struct drm_device *dev)
struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
struct nvbios *bios = &dev_priv->vbios;
u8 *perf, ver, hdr, cnt, len;
- int vid, i = -1;
+ int ret, vid, i = -1;
if (bios->type == NVBIOS_BMP && bios->data[bios->offset + 6] < 0x25) {
legacy_perf_init(dev);
@@ -384,7 +384,12 @@ nouveau_perf_init(struct drm_device *dev)
}
/* get the corresponding memory timings */
- perflvl->timing = nouveau_mem_timing(dev, perflvl->memory);
+ ret = nouveau_mem_timing_calc(dev, perflvl->memory,
+ &perflvl->timing);
+ if (ret) {
+ NV_DEBUG(dev, "perflvl %d, bad timing: %d\n", i, ret);
+ continue;
+ }
snprintf(perflvl->name, sizeof(perflvl->name),
"performance_level_%d", i);