From: Imre Deak Date: Mon, 5 Apr 2010 15:08:05 +0000 (+0300) Subject: gpu: pvr: fix locking on SGX load calculating thread X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=332ef4e9c171f86fb33d58a7dd6c7f08d3217e4c;p=sgx.git gpu: pvr: fix locking on SGX load calculating thread 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ä --- 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;