From 332ef4e9c171f86fb33d58a7dd6c7f08d3217e4c Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 5 Apr 2010 18:08:05 +0300 Subject: [PATCH] gpu: pvr: fix locking on SGX load calculating thread MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit psDeviceNodeList et al is protected by pvr_lock, so we need to acquire it here. Signed-off-by: Imre Deak CC: Mark Underwood CC: Mark Riding Reviewed-by: Topi Pohjolainen Reviewed-by: Ville Syrjälä --- pvr/sysutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pvr/sysutils.c b/pvr/sysutils.c index 52c2584..6aa8ac1 100644 --- a/pvr/sysutils.c +++ b/pvr/sysutils.c @@ -41,6 +41,7 @@ #include "syslocal.h" #include "env_data.h" #include "ocpdefs.h" +#include "pvr_bridge_km.h" #define HZ_TO_MHZ(m) ((m) / 1000000) @@ -265,7 +266,9 @@ static void sgx_lock_perf(struct work_struct *work) struct ENV_DATA *psEnvData = container_of(d_work, struct ENV_DATA, sPerfWork); + pvr_lock(); load = sgx_current_load(); + pvr_unlock(); if (load) { vdd1 = 500000000; vdd2 = 400000; -- 2.39.5