From 6ed13d8b566ff2499529cbcbfb3d77b262911f82 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Tue, 3 Aug 2010 13:40:32 +0300 Subject: [PATCH] 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 --- pvr/sgxinit.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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, -- 2.39.5