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>
This commit is contained in:
Ben Skeggs
2012-01-18 09:02:28 +10:00
parent fd99fd6100
commit 085028ce3b
4 changed files with 55 additions and 59 deletions

View File

@@ -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);