Skip to content

Commit 3db737a

Browse files
committed
gpu: galcore: Optimize gckEVENT_Notify
Don't bother trying to get the eventQueueMutex unless we have pending events and are going to do something with them. Signed-off-by: Jon Nettleton <[email protected]>
1 parent bf6d377 commit 3db737a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,12 +2332,6 @@ gckEVENT_Notify(
23322332
{
23332333
gcsEVENT_PTR record;
23342334

2335-
/* Grab the mutex queue. */
2336-
gcmkONERROR(gckOS_AcquireMutex(Event->os,
2337-
Event->eventQueueMutex,
2338-
gcvINFINITE));
2339-
acquired = gcvTRUE;
2340-
23412335
gckOS_AtomGet(Event->os, Event->pending, (gctINT32_PTR)&pending);
23422336

23432337
if (pending == 0)
@@ -2385,6 +2379,12 @@ gckEVENT_Notify(
23852379

23862380
queue = gcvNULL;
23872381

2382+
/* Grab the mutex queue. */
2383+
gcmkONERROR(gckOS_AcquireMutex(Event->os,
2384+
Event->eventQueueMutex,
2385+
gcvINFINITE));
2386+
acquired = gcvTRUE;
2387+
23882388
gcmDEBUG_ONLY(
23892389
if (IDs == 0)
23902390
{

0 commit comments

Comments
 (0)