gpu : avoid return OK when use gckOS_WaitSignal timeout.

This commit is contained in:
杜坤明
2012-02-03 18:02:48 +08:00
parent 5a5e390ea9
commit e92241844c
4 changed files with 12 additions and 7 deletions

View File

@@ -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_ */

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();