From: Imre Deak Date: Wed, 31 Mar 2010 12:50:28 +0000 (+0300) Subject: gpu: pvr: acquire the pvr lock on the SGX HW recovery path X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3560d8052a1db94199795deac3641c9431211b53;p=sgx.git gpu: pvr: acquire the pvr lock on the SGX HW recovery path We need to take the lock protecting all SW and HW state tracking objects on the recovery reset path, since we are accessing objects like the SGX command queue, or the per process memory and resource management contexts. Signed-off-by: Imre Deak --- diff --git a/pvr/sgxinit.c b/pvr/sgxinit.c index c4a19c3..b945216 100644 --- a/pvr/sgxinit.c +++ b/pvr/sgxinit.c @@ -704,8 +704,11 @@ static void SGXOSTimer(struct work_struct *work) IMG_BOOL bPoweredDown; enum PVRSRV_ERROR eError; - if (!data->armed) + pvr_lock(); + if (!data->armed) { + pvr_unlock(); return; + } psDevInfo->ui32TimeStamp++; @@ -772,6 +775,8 @@ static void SGXOSTimer(struct work_struct *work) rearm: queue_delayed_work(data->work_queue, &data->work, msecs_to_jiffies(data->interval)); + + pvr_unlock(); } struct timer_work_data *