]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c
gpu: vivante: Update driver from Freescale 3.10.53-1.1-ga BSP
[karo-tx-linux.git] / drivers / mxc / gpu-viv / hal / kernel / gc_hal_kernel_mmu_vg.c
index 0c20290166a01a41b051aadc0f8f9b2dab9c5845..58c33b1b301d9389262ea19ed25cf1201f1795e5 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 *
-*    Copyright (C) 2005 - 2013 by Vivante Corp.
+*    Copyright (C) 2005 - 2014 by Vivante Corp.
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@
 */
 gceSTATUS gckVGMMU_Construct(
     IN gckVGKERNEL Kernel,
-    IN gctSIZE_T MmuSize,
+    IN gctUINT32 MmuSize,
     OUT gckVGMMU * Mmu
     )
 {
@@ -107,7 +107,7 @@ gceSTATUS gckVGMMU_Construct(
     }
 
     /* Allocate the page table. */
-    mmu->pageTableSize = MmuSize;
+    mmu->pageTableSize = (gctUINT32)MmuSize;
     status = gckOS_AllocateContiguous(os,
                                       gcvFALSE,
                                       &mmu->pageTableSize,
@@ -133,7 +133,7 @@ gceSTATUS gckVGMMU_Construct(
     }
 
     /* Compute number of entries in page table. */
-    mmu->entryCount = mmu->pageTableSize / sizeof(gctUINT32);
+    mmu->entryCount = (gctUINT32)mmu->pageTableSize / sizeof(gctUINT32);
     mmu->entry = 0;
 
     /* Mark the entire page table as available. */
@@ -313,7 +313,7 @@ gceSTATUS gckVGMMU_AllocatePages(
     }
 
     /* Compute the tail for this allocation. */
-    tail = Mmu->entryCount - PageCount;
+    tail = Mmu->entryCount - (gctUINT32)PageCount;
 
     /* Walk all entries until we find enough slots. */
     for (index = Mmu->entry; index <= tail;)
@@ -395,7 +395,7 @@ gceSTATUS gckVGMMU_AllocatePages(
         if (status >= 0)
         {
             /* Update current entry into page table. */
-            Mmu->entry = index + PageCount;
+            Mmu->entry = index + (gctUINT32)PageCount;
 
             /* Return pointer to page table. */
             *PageTable = (gctUINT32 *)  Mmu->pageTableLogical + index;