From: Ville Syrjälä Date: Fri, 9 Mar 2012 15:26:07 +0000 (+0200) Subject: HACK: gfx: pvr: Don't try to complete SGX commands in atomic context X-Git-Tag: 2.1b_release~218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5eaff53a81f941e9762641e26d438387acc218d;p=kernel%2Fkernel-mfld-blackbay.git HACK: gfx: pvr: Don't try to complete SGX commands in atomic context 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 --- 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;