summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
index 94593d8e9968..01f71d8e4176 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
@@ -201,11 +201,9 @@ _TryToIdleGPU(
{
gceSTATUS status;
gctBOOL empty = gcvFALSE, idle = gcvFALSE;
- gctUINT32 process, thread;
gctBOOL powerLocked = gcvFALSE;
gckHARDWARE hardware;
-
gcmkHEADER_ARG("Event=0x%x", Event);
/* Verify the arguments. */
@@ -215,7 +213,6 @@ _TryToIdleGPU(
hardware = Event->kernel->hardware;
gcmkVERIFY_OBJECT(hardware, gcvOBJ_HARDWARE);
-
/* Check whether the event queue is empty. */
gcmkONERROR(gckEVENT_IsEmpty(Event, &empty));
@@ -224,30 +221,17 @@ _TryToIdleGPU(
status = gckOS_AcquireMutex(hardware->os, hardware->powerMutex, 0);
if (status == gcvSTATUS_TIMEOUT)
{
- gcmkONERROR(gckOS_GetProcessID(&process));
- gcmkONERROR(gckOS_GetThreadID(&thread));
-
- /* Just return to prevent deadlock. */
- if ((hardware->powerProcess != process)
- || (hardware->powerThread != thread))
- {
- gcmkFOOTER_NO();
- return gcvSTATUS_OK;
- }
- }
- else
- {
- powerLocked = gcvTRUE;
+ gcmkFOOTER_NO();
+ return gcvSTATUS_OK;
}
+ powerLocked = gcvTRUE;
+
/* Query whether the hardware is idle. */
gcmkONERROR(gckHARDWARE_QueryIdle(Event->kernel->hardware, &idle));
- if (powerLocked)
- {
- gcmkONERROR(gckOS_ReleaseMutex(hardware->os, hardware->powerMutex));
- powerLocked = gcvFALSE;
- }
+ gcmkONERROR(gckOS_ReleaseMutex(hardware->os, hardware->powerMutex));
+ powerLocked = gcvFALSE;
if (idle)
{
@@ -262,7 +246,6 @@ _TryToIdleGPU(
return gcvSTATUS_OK;
OnError:
-
if (powerLocked)
{
gcmkONERROR(gckOS_ReleaseMutex(hardware->os, hardware->powerMutex));