gfx: pvr: Split 3D paramter heap to shared and per context
authorImre Deak <imre.deak@intel.com>
Fri, 4 Nov 2011 12:27:46 +0000 (14:27 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:28:24 +0000 (12:28 +0300)
1.7 user space assumes that 3D paramter heap is split to shared and per
context heaps. We have to add that to kernel heap setup to support the
new DDK.

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/include4/sgxapi_km.h
drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c

index 6d84e12..518ef10 100644 (file)
@@ -51,18 +51,19 @@ extern "C" {
 #define SGX_PDSPIXEL_CODEDATA_HEAP_ID                  6
 #define SGX_PDSVERTEX_CODEDATA_HEAP_ID                 7
 #define SGX_SYNCINFO_HEAP_ID                                   8
-#define SGX_3DPARAMETERS_HEAP_ID                               9
+#define SGX_SHARED_3DPARAMETERS_HEAP_ID                         9
+#define SGX_PERCONTEXT_3DPARAMETERS_HEAP_ID                     10
 #if defined(SUPPORT_SGX_GENERAL_MAPPING_HEAP)
-#define SGX_GENERAL_MAPPING_HEAP_ID                            10
+#define SGX_GENERAL_MAPPING_HEAP_ID                            11
 #endif
 #if defined(SGX_FEATURE_2D_HARDWARE)
-#define SGX_2D_HEAP_ID                                                 11
+#define SGX_2D_HEAP_ID                                                 12
 #else
 #if defined(FIX_HW_BRN_26915)
-#define SGX_CGBUFFER_HEAP_ID                                   12
+#define SGX_CGBUFFER_HEAP_ID                                   13
 #endif
 #endif
-#define SGX_MAX_HEAP_ID                                                        13
+#define SGX_MAX_HEAP_ID                                                        14
 
 #if defined(SGX543) || defined(SGX544) || defined(SGX554)
 #define SGX_USE_CODE_SEGMENT_RANGE_BITS                23
index c3080ad..7d6dd1c 100644 (file)
@@ -1864,28 +1864,33 @@ PVRSRV_ERROR SGXRegisterDevice (PVRSRV_DEVICE_NODE *psDeviceNode)
        psDeviceMemoryHeap++;
 
 
-       
-       psDeviceMemoryHeap->ui32HeapID = HEAP_ID( PVRSRV_DEVICE_TYPE_SGX, SGX_3DPARAMETERS_HEAP_ID);
-       psDeviceMemoryHeap->sDevVAddrBase.uiAddr = SGX_3DPARAMETERS_HEAP_BASE;
-       psDeviceMemoryHeap->ui32HeapSize = SGX_3DPARAMETERS_HEAP_SIZE;
-       psDeviceMemoryHeap->pszName = "3DParameters";
-       psDeviceMemoryHeap->pszBSName = "3DParameters BS";
-#if defined(SUPPORT_PERCONTEXT_PB)
+       psDeviceMemoryHeap->ui32HeapID = HEAP_ID(PVRSRV_DEVICE_TYPE_SGX, SGX_SHARED_3DPARAMETERS_HEAP_ID);
+       psDeviceMemoryHeap->sDevVAddrBase.uiAddr = SGX_SHARED_3DPARAMETERS_HEAP_BASE;
+       psDeviceMemoryHeap->ui32HeapSize = SGX_SHARED_3DPARAMETERS_HEAP_SIZE;
+       psDeviceMemoryHeap->pszName = "Shared 3DParameters";
+       psDeviceMemoryHeap->pszBSName = "Shared 3DParameters BS";
        psDeviceMemoryHeap->ui32Attribs = PVRSRV_HAP_WRITECOMBINE
-                                                                                                                       | PVRSRV_MEM_RAM_BACKED_ALLOCATION
-                                                                                                                       | PVRSRV_HAP_SINGLE_PROCESS;
-       psDeviceMemoryHeap->DevMemHeapType = DEVICE_MEMORY_HEAP_PERCONTEXT;
-#else
-       psDeviceMemoryHeap->ui32Attribs = PVRSRV_HAP_WRITECOMBINE
-                                                                                                       | PVRSRV_MEM_RAM_BACKED_ALLOCATION
-                                                                                                       | PVRSRV_HAP_MULTI_PROCESS;
+                                               | PVRSRV_MEM_RAM_BACKED_ALLOCATION
+                                               | PVRSRV_HAP_MULTI_PROCESS;
        psDeviceMemoryHeap->DevMemHeapType = DEVICE_MEMORY_HEAP_SHARED_EXPORTED;
-#endif
-       
+
        psDeviceMemoryHeap->ui32DataPageSize = SGX_MMU_PAGE_SIZE;
        psDeviceMemoryHeap++;
 
 
+       psDeviceMemoryHeap->ui32HeapID = HEAP_ID(PVRSRV_DEVICE_TYPE_SGX, SGX_PERCONTEXT_3DPARAMETERS_HEAP_ID);
+       psDeviceMemoryHeap->sDevVAddrBase.uiAddr = SGX_PERCONTEXT_3DPARAMETERS_HEAP_BASE;
+       psDeviceMemoryHeap->ui32HeapSize = SGX_PERCONTEXT_3DPARAMETERS_HEAP_SIZE;
+       psDeviceMemoryHeap->pszName = "Percontext 3DParameters";
+       psDeviceMemoryHeap->pszBSName = "Percontext 3DParameters BS";
+       psDeviceMemoryHeap->ui32Attribs = PVRSRV_HAP_WRITECOMBINE
+                                               | PVRSRV_MEM_RAM_BACKED_ALLOCATION
+                                               | PVRSRV_HAP_SINGLE_PROCESS;
+       psDeviceMemoryHeap->DevMemHeapType = DEVICE_MEMORY_HEAP_PERCONTEXT;
+
+       psDeviceMemoryHeap->ui32DataPageSize = SGX_MMU_PAGE_SIZE;
+       psDeviceMemoryHeap++;
+
 #if defined(SUPPORT_SGX_GENERAL_MAPPING_HEAP)
        
        psDeviceMemoryHeap->ui32HeapID = HEAP_ID( PVRSRV_DEVICE_TYPE_SGX, SGX_GENERAL_MAPPING_HEAP_ID);