gfx: pvr: Update heap address to match 1.7 DDK
authorImre Deak <imre.deak@intel.com>
Fri, 4 Nov 2011 12:27:47 +0000 (14:27 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:28:24 +0000 (12:28 +0300)
Heap bases and sizes were updated in 1.7 DDK. Adapt changes to the
driver.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxconfig.h

index f46a5c2..9d69087 100644 (file)
@@ -1,6 +1,6 @@
 /**********************************************************************
  *
- * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
+ * Copyright (C) Imagination Technologies Ltd. All rights reserved.
  * 
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
 #define DEV_MAJOR_VERSION              1
 #define DEV_MINOR_VERSION              0
 
+#if defined(SUPPORT_EXTERNAL_SYSTEM_CACHE)
+#define SGX_KERNEL_DATA_HEAP_OFFSET            0x00001000
+#else
+#define SGX_KERNEL_DATA_HEAP_OFFSET            0x00000000
+#endif
+
 #if SGX_FEATURE_ADDRESS_SPACE_SIZE == 32
        #if defined(SGX_FEATURE_2D_HARDWARE)
        #define SGX_2D_HEAP_BASE                                         0x00100000
 
        #if defined(SUPPORT_SGX_GENERAL_MAPPING_HEAP)
        #define SGX_GENERAL_MAPPING_HEAP_BASE            0x08000000
-       #define SGX_GENERAL_MAPPING_HEAP_SIZE           (0x20000000-0x00001000)
+       #define SGX_GENERAL_MAPPING_HEAP_SIZE           (0x08000000-0x00001000)
        #endif
 
-       #define SGX_GENERAL_HEAP_BASE                            0x28000000
-       #define SGX_GENERAL_HEAP_SIZE                           (0xAA000000-0x00001000)
+       #define SGX_GENERAL_HEAP_BASE                            0x10000000
+       #define SGX_GENERAL_HEAP_SIZE                           (0xC2000000-0x00001000)
+
+
+       #define SGX_3DPARAMETERS_HEAP_SIZE                      0x10000000
+
+
+#if !defined(HYBRID_SHARED_PB_SIZE)
+       #define HYBRID_SHARED_PB_SIZE                           (SGX_3DPARAMETERS_HEAP_SIZE >> 1)
+#endif
+#if defined(SUPPORT_HYBRID_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    (HYBRID_SHARED_PB_SIZE)
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               (HYBRID_SHARED_PB_SIZE-0x00001000)
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           (SGX_3DPARAMETERS_HEAP_SIZE - SGX_SHARED_3DPARAMETERS_SIZE - 0x00001000)
+#else
+#if defined(SUPPORT_PERCONTEXT_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    0
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               0
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           (SGX_3DPARAMETERS_HEAP_SIZE - 0x00001000)
+#endif
+#if defined(SUPPORT_SHARED_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    SGX_3DPARAMETERS_HEAP_SIZE
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               (SGX_3DPARAMETERS_HEAP_SIZE - 0x00001000)
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           0
+#endif
+#endif
+
+       #define SGX_SHARED_3DPARAMETERS_HEAP_BASE                0xD2000000
+
+
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_BASE            (SGX_SHARED_3DPARAMETERS_HEAP_BASE + SGX_SHARED_3DPARAMETERS_SIZE)
 
-       #define SGX_3DPARAMETERS_HEAP_BASE                       0xD2000000
-       #define SGX_3DPARAMETERS_HEAP_SIZE                      (0x10000000-0x00001000)
 
        #define SGX_TADATA_HEAP_BASE                             0xE2000000
        #define SGX_TADATA_HEAP_SIZE                            (0x0D000000-0x00001000)
        #define SGX_PDSVERTEX_CODEDATA_HEAP_BASE         0xF2400000
        #define SGX_PDSVERTEX_CODEDATA_HEAP_SIZE        (0x01C00000-0x00001000)
 
-       #define SGX_KERNEL_DATA_HEAP_BASE                       (0xF4000000)
-#if defined(SUPPORT_EXTERNAL_SYSTEM_CACHE)
-   #define SGX_KERNEL_DATA_HEAP_SIZE                   (0x05000000-0x00002000)
-#else
-       #define SGX_KERNEL_DATA_HEAP_SIZE                       (0x05000000-0x00001000)
-#endif
+       #define SGX_KERNEL_DATA_HEAP_BASE                       0xF4000000
+       #define SGX_KERNEL_DATA_HEAP_SIZE                       (0x05000000-(0x00001000+SGX_KERNEL_DATA_HEAP_OFFSET))
 
        #define SGX_PIXELSHADER_HEAP_BASE                        0xF9000000
        #define SGX_PIXELSHADER_HEAP_SIZE                       (0x05000000-0x00001000)
        
        #define SGX_VERTEXSHADER_HEAP_BASE                       0xFE000000
        #define SGX_VERTEXSHADER_HEAP_SIZE                      (0x02000000-0x00001000)
-
        
        #define SGX_CORE_IDENTIFIED
 #endif 
 #if defined(SUPPORT_SGX_GENERAL_MAPPING_HEAP)
        #define SGX_GENERAL_MAPPING_HEAP_BASE            0x00001000
        #define SGX_GENERAL_MAPPING_HEAP_SIZE           (0x01800000-0x00001000-0x00001000)
-               
+
        #define SGX_GENERAL_HEAP_BASE                            0x01800000
        #define SGX_GENERAL_HEAP_SIZE                           (0x07000000-0x00001000)
 
 #else
        #define SGX_GENERAL_HEAP_BASE                            0x00001000
-       #define SGX_GENERAL_HEAP_SIZE                           (0x0C000000-0x00001000-0x00001000)
+       #define SGX_GENERAL_HEAP_SIZE                           (0x08800000-0x00001000-0x00001000)
+#endif
+
+       #define SGX_3DPARAMETERS_HEAP_SIZE                      0x04000000
+
+
+#if !defined(HYBRID_SHARED_PB_SIZE)
+       #define HYBRID_SHARED_PB_SIZE                           (SGX_3DPARAMETERS_HEAP_SIZE >> 1)
+#endif
+#if defined(SUPPORT_HYBRID_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    (HYBRID_SHARED_PB_SIZE)
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               (HYBRID_SHARED_PB_SIZE-0x00001000)
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           (SGX_3DPARAMETERS_HEAP_SIZE - SGX_SHARED_3DPARAMETERS_SIZE - 0x00001000)
+#else
+#if defined(SUPPORT_PERCONTEXT_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    0
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               0
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           (SGX_3DPARAMETERS_HEAP_SIZE - 0x00001000)
+#endif
+#if defined(SUPPORT_SHARED_PB)
+       #define SGX_SHARED_3DPARAMETERS_SIZE                    SGX_3DPARAMETERS_HEAP_SIZE
+       #define SGX_SHARED_3DPARAMETERS_HEAP_SIZE               (SGX_3DPARAMETERS_HEAP_SIZE - 0x00001000)
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE           0
+#endif
 #endif
 
-       #define SGX_3DPARAMETERS_HEAP_BASE                       0x0C000000
-       #define SGX_3DPARAMETERS_HEAP_SIZE                      (0x00800000-0x00001000)
+       #define SGX_SHARED_3DPARAMETERS_HEAP_BASE                0x08800000
+
+
+       #define SGX_PERCONTEXT_3DPARAMETERS_HEAP_BASE            (SGX_SHARED_3DPARAMETERS_HEAP_BASE + SGX_SHARED_3DPARAMETERS_SIZE)
+
 
        #define SGX_TADATA_HEAP_BASE                             0x0C800000
        #define SGX_TADATA_HEAP_SIZE                            (0x01000000-0x00001000)
        #define SGX_PDSVERTEX_CODEDATA_HEAP_BASE         0x0E800000
        #define SGX_PDSVERTEX_CODEDATA_HEAP_SIZE        (0x00800000-0x00001000)
 
-       #define SGX_KERNEL_DATA_HEAP_BASE                       (0x0F000000)
-#if defined(SUPPORT_EXTERNAL_SYSTEM_CACHE)
-       #define SGX_KERNEL_DATA_HEAP_SIZE                       (0x00400000-0x00002000)
-#else
-       #define SGX_KERNEL_DATA_HEAP_SIZE                       (0x00400000-0x00001000)
-#endif
+       #define SGX_KERNEL_DATA_HEAP_BASE                       0x0F000000
+       #define SGX_KERNEL_DATA_HEAP_SIZE                       (0x00400000-(0x00001000+SGX_KERNEL_DATA_HEAP_OFFSET))
 
        #define SGX_PIXELSHADER_HEAP_BASE                        0x0F400000
        #define SGX_PIXELSHADER_HEAP_SIZE                       (0x00500000-0x00001000)
        #endif
 #endif
 
-#if ((SGX_GENERAL_HEAP_BASE + SGX_GENERAL_HEAP_SIZE) >= SGX_3DPARAMETERS_HEAP_BASE)
+#if defined(SUPPORT_HYBRID_PB)
+       #if ((HYBRID_SHARED_PB_SIZE + 0x000001000) > SGX_3DPARAMETERS_HEAP_SIZE)
+               #error "sgxconfig.h: ERROR: HYBRID_SHARED_PB_SIZE too large"
+       #endif
+#endif
+
+#if ((SGX_GENERAL_HEAP_BASE + SGX_GENERAL_HEAP_SIZE) >= SGX_SHARED_3DPARAMETERS_HEAP_BASE)
        #error "sgxconfig.h: ERROR: SGX_GENERAL_HEAP overlaps SGX_3DPARAMETERS_HEAP"
 #endif
 
-#if ((SGX_3DPARAMETERS_HEAP_BASE + SGX_3DPARAMETERS_HEAP_SIZE) >= SGX_TADATA_HEAP_BASE)
-       #error "sgxconfig.h: ERROR: SGX_3DPARAMETERS_HEAP overlaps SGX_TADATA_HEAP"
+#if (((SGX_PERCONTEXT_3DPARAMETERS_HEAP_BASE + SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE) >= SGX_TADATA_HEAP_BASE) && (SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE > 0))
+       #error "sgxconfig.h: ERROR: SGX_PERCONTEXT_3DPARAMETERS_HEAP_BASE overlaps SGX_TADATA_HEAP"
 #endif
 
 #if ((SGX_TADATA_HEAP_BASE + SGX_TADATA_HEAP_SIZE) >= SGX_SYNCINFO_HEAP_BASE)