Add mapping fix to guestegl and debugging (temporary) bug235_bringup_0
authorFaisal Memon <faisal.memon@nokia.com>
Fri, 22 Oct 2010 10:16:29 +0100
branchbug235_bringup_0
changeset 59 d9b81aebba7b
parent 58 021dd2b9ee6a
child 60 dfe4593146ee
Add mapping fix to guestegl and debugging (temporary)
guestrendering/guestegl/inc/eglapi.h
guestrendering/guestegl/src/guestegl.cpp
guestrendering/guestopenvg/inc/vgstate.h
vghwinterface/vghwutils/inc/vghwutils.h
--- a/guestrendering/guestegl/inc/eglapi.h	Thu Oct 07 18:48:18 2010 +0100
+++ b/guestrendering/guestegl/inc/eglapi.h	Fri Oct 22 10:16:29 2010 +0100
@@ -16,6 +16,8 @@
 #ifndef EGLAPI_H_
 #define EGLAPI_H_
 
+#define _DEBUG // FAISALMEMON temporary
+
 // INCLUDES
 #include <e32std.h>
 #include <e32base.h>
--- a/guestrendering/guestegl/src/guestegl.cpp	Thu Oct 07 18:48:18 2010 +0100
+++ b/guestrendering/guestegl/src/guestegl.cpp	Fri Oct 22 10:16:29 2010 +0100
@@ -265,6 +265,7 @@
     attributes.iOffsetBetweenBuffers = 0;
     attributes.iContiguous = ETrue;
     attributes.iCacheAttrib = RSurfaceManager::ENotCached;      // Cache attributes
+    attributes.iMappable = ETrue;
 
 	iDisplayMapLock.WriteLock();
 	CEglDisplayInfo** pDispInfo;
@@ -281,7 +282,8 @@
 				surfaceInfo->iConfigId = aConfig;
 				surfaceInfo->iSurfaceManager.Open();
 				surfaceInfo->iSurfaceManager.CreateSurface(buf, surfaceId);
-				(void) surfaceInfo->iSurfaceManager.MapSurface(surfaceId, surfaceInfo->iChunk);
+				TInt err = surfaceInfo->iSurfaceManager.MapSurface(surfaceId, surfaceInfo->iChunk);
+				EGL_TRACE("CGuestEGL::eglCreateWindowSurface surface manager returned chunk %x and ret val %d", surfaceInfo->iChunk, err);
 				RemoteFunctionCallData rfcdata;
 				EglRFC eglApiData( rfcdata );
 				eglApiData.Init( EglRFC::EeglCreateWindowSurface);
@@ -1264,14 +1266,15 @@
     // FAISALMEMON END OF STUB CODE
     
     TUint32 chunkHWBase = 0;
-    (void)CVghwUtils::MapToHWAddress(aSurfaceInfo.iChunk.Handle(), chunkHWBase);
+    TInt err = CVghwUtils::MapToHWAddress(aSurfaceInfo.iChunk.Handle(), chunkHWBase);
+    EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface MapToHWAddress returned %d", err);
     // FAISALMEMON write code to handle errors in the above function
     EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface AFTER VGHWUtils::MapToHWAddress");
 
 	TUint32 surfaceBufferBaseAddress(0);
 	(void)CVghwUtils::GetSurfaceBufferBaseAddress(surfaceBufferBaseAddress);
-	EGL_TRACE("CPlatsimEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress");
-
+	EGL_TRACE("CGuestEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress");
+	EGL_TRACE("CGuestEGL::egliCreateSurface aSurfaceInfo.iChunk.Base() is %x", aSurfaceInfo.iChunk.Base());
     /* Store the pointer to the pixel data */
     aSurfaceInfo.iBuffer0 = aSurfaceInfo.iChunk.Base() + offsetToFirstBuffer;
     aSurfaceInfo.iBuffer1 = aSurfaceInfo.iChunk.Base() + offsetToSecondBuffer;
--- a/guestrendering/guestopenvg/inc/vgstate.h	Thu Oct 07 18:48:18 2010 +0100
+++ b/guestrendering/guestopenvg/inc/vgstate.h	Fri Oct 22 10:16:29 2010 +0100
@@ -21,9 +21,10 @@
 #include <e32hashtab.h>
 #include "vghwutils.h"
 
-
+#define _DEBUG // FAISALMEMON temporary
 
 // tracing
+
 #include <e32debug.h>
 #ifdef _DEBUG
 	#define OPENVG_TRACE(fmt, args...) RDebug::Printf(fmt, ##args)
--- a/vghwinterface/vghwutils/inc/vghwutils.h	Thu Oct 07 18:48:18 2010 +0100
+++ b/vghwinterface/vghwutils/inc/vghwutils.h	Fri Oct 22 10:16:29 2010 +0100
@@ -16,6 +16,7 @@
 #ifndef __VGHWUTILS_H__
 #define __VGHWUTILS_H__
 
+#define _DEBUG // FAISALMEMON temporary
 //  Include Files
 #include <e32base.h>	// CBase
 #include <EGL/egl.h>