gpu : avoid return OK when use gckOS_WaitSignal timeout.
author杜坤明 <dkm@rockchip.com>
Fri, 3 Feb 2012 10:02:48 +0000 (18:02 +0800)
committer杜坤明 <dkm@rockchip.com>
Fri, 3 Feb 2012 10:02:48 +0000 (18:02 +0800)
drivers/staging/rk29/vivante/hal/inc/gc_hal_options.h
drivers/staging/rk29/vivante/hal/kernel/gc_hal_kernel_mmu.c
drivers/staging/rk29/vivante/hal/os/linux/kernel/gc_hal_kernel_driver.c
drivers/staging/rk29/vivante/hal/os/linux/kernel/gc_hal_kernel_os.c

index e8133d0a60cff77d8d646dae05769777743913c3..21f453f501f2f1bbcf731fdcb91f41759891262c 100644 (file)
           0 - no use,original code
           1 - use
 */
-#define gcdENABLE_MMU_PROTECTING 1
+#define gcdENABLE_MMU_PROTECTING                       1
 
 #endif /* __gc_hal_options_h_ */
 
index d7053961b81ff9c8f9c7a0e39e93cdb73626c61a..cd63265d98deaa30b90574cbf0152e43664a6afb 100644 (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);
index c958e0e8856989960452ecbef12d11ae7165f354..823e5de8b1d3a006bda0ce34b737b4c5ab304f4a 100755 (executable)
@@ -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); 
index 2d6f5dc919283e38019f40894de1ef6ce038806d..1e1b0d4ae36588d079da3f57a96c3d64cbc90827 100755 (executable)
@@ -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();