mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
gpu : avoid return OK when use gckOS_WaitSignal timeout.
This commit is contained in:
@@ -368,7 +368,7 @@
|
||||
0 - no use,original code
|
||||
1 - use
|
||||
*/
|
||||
#define gcdENABLE_MMU_PROTECTING 1
|
||||
#define gcdENABLE_MMU_PROTECTING 1
|
||||
|
||||
#endif /* __gc_hal_options_h_ */
|
||||
|
||||
|
||||
@@ -325,7 +325,6 @@ gckMMU_Construct(
|
||||
return gcvSTATUS_OK;
|
||||
|
||||
OnError:
|
||||
|
||||
/* Roll back. */
|
||||
if (mmu != gcvNULL)
|
||||
{
|
||||
@@ -509,7 +508,7 @@ gckMMU_AllocatePages(
|
||||
/* Not enough pages avaiable. */
|
||||
gcmkONERROR(gcvSTATUS_OUT_OF_RESOURCES);
|
||||
}
|
||||
|
||||
|
||||
/* Grab the mutex. */
|
||||
gcmkONERROR(gckOS_AcquireMutex(Mmu->os, Mmu->pageTableMutex, gcvINFINITE));
|
||||
mutex = gcvTRUE;
|
||||
@@ -641,7 +640,6 @@ gckMMU_AllocatePages(
|
||||
return gcvSTATUS_OK;
|
||||
|
||||
OnError:
|
||||
|
||||
if (mutex)
|
||||
{
|
||||
/* Release the mutex. */
|
||||
@@ -690,7 +688,6 @@ gckMMU_FreePages(
|
||||
gcmkHEADER_ARG("Mmu=0x%x PageTable=0x%x PageCount=%lu",
|
||||
Mmu, PageTable, PageCount);
|
||||
|
||||
|
||||
/* Verify the arguments. */
|
||||
gcmkVERIFY_OBJECT(Mmu, gcvOBJ_MMU);
|
||||
gcmkVERIFY_ARGUMENT(PageTable != gcvNULL);
|
||||
|
||||
@@ -1003,9 +1003,12 @@ static void drv_exit(void)
|
||||
|
||||
unregister_chrdev(major, DRV_NAME);
|
||||
#endif
|
||||
|
||||
shutdown = 1;
|
||||
|
||||
shutdown = 1;
|
||||
|
||||
//hyh added
|
||||
return;
|
||||
|
||||
mdelay(100);
|
||||
gckGALDEVICE_Stop(galDevice);
|
||||
mdelay(50);
|
||||
|
||||
@@ -4557,8 +4557,13 @@ gckOS_WaitSignal(
|
||||
if (!signal->manualReset && timeout == 0) timeout = 1;
|
||||
|
||||
rc = wait_for_completion_interruptible_timeout(&signal->event, timeout);
|
||||
|
||||
#if 1 // dkm : avoid return OK when timeout in kernel3.0
|
||||
status = (rc == 0) ? gcvSTATUS_TIMEOUT : gcvSTATUS_OK;
|
||||
#else
|
||||
status = ((rc == 0) && !signal->event.done) ? gcvSTATUS_TIMEOUT
|
||||
: gcvSTATUS_OK;
|
||||
#endif
|
||||
|
||||
/* Return status. */
|
||||
gcmkFOOTER();
|
||||
|
||||
Reference in New Issue
Block a user