gpu: pvr: acquire the pvr lock on the SGX HW recovery path
authorImre Deak <imre.deak@nokia.com>
Wed, 31 Mar 2010 12:50:28 +0000 (15:50 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:09:40 +0000 (21:09 +0300)
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 <imre.deak@nokia.com>
pvr/sgxinit.c

index c4a19c3..b945216 100644 (file)
@@ -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 *