From e5eaff53a81f941e9762641e26d438387acc218d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 9 Mar 2012 17:26:07 +0200 Subject: [PATCH] HACK: gfx: pvr: Don't try to complete SGX commands in atomic context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit SGXCommandComplete() may be called while holding a spinlock. In such cases we want to defer the command completion to the MISR. As a quick non-intrusive hack, add a simple in_atomic() check to SGXCommandComplete() to make that happen. Obviously this only works with CONFIG_PREEMPT kernels. Signed-off-by: Ville Syrjälä Acked-by: Imre Deak Signed-off-by: Kirill A. Shutemov --- drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c b/drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c index f797da5..ee17d04 100644 --- a/drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c +++ b/drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c @@ -86,7 +86,7 @@ PVRSRV_ERROR SGXResetPDump(PVRSRV_DEVICE_NODE *psDeviceNode); static IMG_VOID SGXCommandComplete(PVRSRV_DEVICE_NODE *psDeviceNode) { #if defined(OS_SUPPORTS_IN_LISR) - if (OSInLISR(psDeviceNode->psSysData)) + if (OSInLISR(psDeviceNode->psSysData) || in_atomic()) { psDeviceNode->bReProcessDeviceCommandComplete = IMG_TRUE; -- 2.7.4