From 3560d8052a1db94199795deac3641c9431211b53 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Wed, 31 Mar 2010 15:50:28 +0300 Subject: [PATCH] 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 --- pvr/sgxinit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 * -- 2.47.2