diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 17:16:40 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 17:16:40 +0900 |
commit | 20733d59d5763ecd96276f868c1f39e677b3b4e2 (patch) | |
tree | 89177676a2a45afa97595ce1827630aa131c51e2 /drivers/gpu/drm/nouveau/nouveau_perf.c | |
parent | 75e1b6a84f7e2186e843da94751b6d175caf9209 (diff) | |
parent | 17e8c4e1ebf139743e3830439fa65fd906af4a43 (diff) |
Merge branch 'fbdev/stable-updates'
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_perf.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_perf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c index 922fb6b664e..ef9dec0e6f8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_perf.c +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c @@ -182,6 +182,11 @@ nouveau_perf_init(struct drm_device *dev) entries = perf[2]; } + if (entries > NOUVEAU_PM_MAX_LEVEL) { + NV_DEBUG(dev, "perf table has too many entries - buggy vbios?\n"); + entries = NOUVEAU_PM_MAX_LEVEL; + } + entry = perf + headerlen; for (i = 0; i < entries; i++) { struct nouveau_pm_level *perflvl = &pm->perflvl[pm->nr_perflvl]; |