gfx: pvr: Implement ioctl return for devinitpart2
authorPauli Nieminen <pauli.nieminen@linux.intel.com>
Fri, 4 Nov 2011 12:28:01 +0000 (14:28 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:28:28 +0000 (12:28 +0300)
1.7 DDK adds build options to sgx device init part2 ioctl.

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

index 10e5919..5611e02 100644 (file)
@@ -239,6 +239,13 @@ typedef struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2_TAG
        SGX_BRIDGE_INIT_INFO    sInitInfo;
 }PVRSRV_BRIDGE_IN_SGXDEVINITPART2;
 
+typedef struct PVRSRV_BRIDGE_OUT_SGXDEVINITPART2_TAG
+{
+       PVRSRV_ERROR    eError;
+       IMG_UINT32              ui32KMBuildOptions;
+
+}PVRSRV_BRIDGE_OUT_SGXDEVINITPART2;
+
  
 typedef struct PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE_TAG
 {
index e02aca8..dd0ec6f 100644 (file)
@@ -40,6 +40,7 @@
 #include "power.h"
 #include "pvr_bridge_km.h"
 #include "sgx_bridge_km.h"
+#include "sgx_options.h"
 
 #if defined(SUPPORT_MSVDX)
        #include "msvdx_bridge.h"
@@ -837,7 +838,7 @@ SGXReadHWPerfCBBW(IMG_UINT32                                                        ui32BridgeID,
 static IMG_INT
 SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
                                  PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *psSGXDevInitPart2IN,
-                                 PVRSRV_BRIDGE_RETURN *psRetOUT,
+                                 PVRSRV_BRIDGE_OUT_SGXDEVINITPART2 *psSGXDevInitPart2OUT,
                                  PVRSRV_PER_PROCESS_DATA *psPerProc)
 {
        IMG_HANDLE hDevCookieInt;
@@ -850,18 +851,20 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
 
        PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_SGX_DEVINITPART2);
 
+       psSGXDevInitPart2OUT->ui32KMBuildOptions = SGX_BUILD_OPTIONS;
+
        if(!psPerProc->bInitProcess)
        {
-               psRetOUT->eError = PVRSRV_ERROR_PROCESS_NOT_INITIALISED;
+               psSGXDevInitPart2OUT->eError = PVRSRV_ERROR_PROCESS_NOT_INITIALISED;
                return 0;
        }
 
-       psRetOUT->eError =
+       psSGXDevInitPart2OUT->eError =
                PVRSRVLookupHandle(psPerProc->psHandleBase,
                                                   &hDevCookieInt,
                                                   psSGXDevInitPart2IN->hDevCookie,
                                                   PVRSRV_HANDLE_TYPE_DEV_NODE);
-       if(psRetOUT->eError != PVRSRV_OK)
+       if(psSGXDevInitPart2OUT->eError != PVRSRV_OK)
        {
                return 0;
        }
@@ -1028,7 +1031,7 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
        if (bLookupFailed)
        {
                PVR_DPF((PVR_DBG_ERROR, "DevInitSGXPart2BW: A handle lookup failed"));
-               psRetOUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
+               psSGXDevInitPart2OUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
                return 0;
        }
 
@@ -1194,7 +1197,7 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
        if (bReleaseFailed)
        {
                PVR_DPF((PVR_DBG_ERROR, "DevInitSGXPart2BW: A handle release failed"));
-               psRetOUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
+               psSGXDevInitPart2OUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
                
                PVR_DBG_BREAK;
                return 0;
@@ -1323,14 +1326,14 @@ SGXDevInitPart2BW(IMG_UINT32 ui32BridgeID,
 
                PVR_DPF((PVR_DBG_ERROR, "DevInitSGXPart2BW: A dissociate failed"));
 
-               psRetOUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
+               psSGXDevInitPart2OUT->eError = PVRSRV_ERROR_INIT2_PHASE_FAILED;
 
                
                PVR_DBG_BREAK;
                return 0;
        }
 
-       psRetOUT->eError =
+       psSGXDevInitPart2OUT->eError =
                DevInitSGXPart2KM(psPerProc,
                                                  hDevCookieInt,
                                                  &psSGXDevInitPart2IN->sInitInfo);