From: Imre Deak Date: Tue, 3 Aug 2010 10:40:32 +0000 (+0300) Subject: gpu: pvr: fix locking around HWRecoveryResetSGX X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ed13d8b566ff2499529cbcbfb3d77b262911f82;p=sgx.git gpu: pvr: fix locking around HWRecoveryResetSGX On the MISR / HW recovery path the pvr_dev_lock was taken twice leading to a dead-lock. This regression was introduced by commit ec53aaa940a4e40786eb7512b6a46ce347c95303. Spotted-by: Luc Verhaegen Signed-off-by: Imre Deak --- diff --git a/pvr/sgxinit.c b/pvr/sgxinit.c index 35f3d5f..10dbc5a 100644 --- a/pvr/sgxinit.c +++ b/pvr/sgxinit.c @@ -678,8 +678,6 @@ void HWRecoveryResetSGX(struct PVRSRV_DEVICE_NODE *psDeviceNode) BUG_ON(!pvr_is_locked()); - pvr_dev_lock(); - l = readl(&psSGXHostCtl->ui32InterruptClearFlags); l |= PVRSRV_USSE_EDM_INTERRUPT_HWR; writel(l, &psSGXHostCtl->ui32InterruptClearFlags); @@ -713,8 +711,6 @@ void HWRecoveryResetSGX(struct PVRSRV_DEVICE_NODE *psDeviceNode) SGXScheduleProcessQueues(psDeviceNode); - pvr_dev_unlock(); - PVRSRVProcessQueues(IMG_TRUE); } @@ -789,9 +785,9 @@ static void SGXOSTimer(struct work_struct *work) l = readl(&psSGXHostCtl->ui32HostDetectedLockups); l++; writel(l, &psSGXHostCtl->ui32HostDetectedLockups); - pvr_dev_unlock(); HWRecoveryResetSGX(psDeviceNode); + pvr_dev_unlock(); } queue_delayed_work(data->work_queue, &data->work,