Fixes while parsing perf tables on GF5
Subsystems (3)
PATCH 1/1 Fixes while parsing perf tables on GF5
From 3dcc41d053357a93e523f0bcca593ed061fdac57 Mon Sep 17 00:00:00 2001
From: Emil Velikov <eeydev-QabDm/[email protected]>
Date: Sun, 10 Oct 2010 19:21:30 +0100
Subject: [PATCH] Fixes while parsing perf tables on GF5
Perf tables v1.2 & 1.3 does not store voltage Comment that the fanspeed does not apear to be valid for v1.5
Signed-off-by Emil Velikov <emil.velikov-/[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_perf.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_perf.c +3 -1
@@ -133,8 +133,10 @@ nouveau_perf_init(struct drm_device *dev)case 0x12 :case 0x13 :case 0x15 : +/* XXX: Cant we really trust fanspeed on 0x15 */ perflvl->fanspeed = entry[55 ]; - perflvl->voltage = entry[56 ]; +/* Table v 1.2 and 1.3 does not have big enough recordlen to store the voltage */ + perflvl->voltage = (recordlen >56 ) ? entry[56 ] :0 ; perflvl->core =ROM32 (entry[1 ]) *10 ; perflvl->memory =ROM32 (entry[5 ]) *20 ;break ;
Signature · 1 line
1.7.2.3