interim work untested: added the register base for graphics and some custom pointer modifications from jani graphics-phase-3
authorFaisal Memon <faisal.memon@nokia.com>
Thu, 26 Aug 2010 19:04:50 +0100
branchgraphics-phase-3
changeset 96 c7e943dbf70f
parent 77 b3dcdc7f8f12
child 97 23e14cbcf117
interim work untested: added the register base for graphics and some custom pointer modifications from jani
baseport/syborg/bootstrap/syborg.inc
baseport/syborg/bootstrap/syborg.s
baseport/syborg/pointer/syborg_pointer.cpp
--- a/baseport/syborg/bootstrap/syborg.inc	Wed Jun 02 11:02:14 2010 +0300
+++ b/baseport/syborg/bootstrap/syborg.inc	Thu Aug 26 19:04:50 2010 +0100
@@ -53,6 +53,7 @@
 KHwBaseAudio		EQU     KHwBaseRegisters + 0x0e000
 KHwBaseWebcamera	EQU     KHwBaseRegisters + 0x0f000
 KHwBasePlatform		EQU     KHwBaseRegisters + 0x10000
+KHwGraphicsRegBase	EQU	KHwBaseRegisters + 0x11000
 
 ;-----------------------------------------------------------------------------
 ; Module linear bases
@@ -80,5 +81,6 @@
 KHwLinBaseAudio		EQU	KHwLinBaseRegisters + 0x0e*KHwLinSeparation
 KHwLinBaseWebcameraDevice	EQU	KHwLinBaseRegisters + 0x0f*KHwLinSeparation
 KHwLinBasePlatform	EQU	KHwLinBaseRegisters + 0x10*KHwLinSeparation;
+KHwLinBaseGraphics	EQU	KHwLinBaseRegisters + 0x11*KHwLinSeparation;
 	
 	END
--- a/baseport/syborg/bootstrap/syborg.s	Wed Jun 02 11:02:14 2010 +0300
+++ b/baseport/syborg/bootstrap/syborg.s	Thu Aug 26 19:04:50 2010 +0100
@@ -184,6 +184,8 @@
 		HW_MAPPING		KHwBaseAudio,    		1,	HW_MULT_4K
 		HW_MAPPING		KHwBaseWebcamera,    		1,	HW_MULT_4K
 		HW_MAPPING		KHwBasePlatform,    		8,	HW_MULT_4K
+                HW_MAPPING              KHwGraphicsRegBase,             1,      HW_MULT_4K
+
 	
 		DCD     0   ; terminator
 
--- a/baseport/syborg/pointer/syborg_pointer.cpp	Wed Jun 02 11:02:14 2010 +0300
+++ b/baseport/syborg/pointer/syborg_pointer.cpp	Thu Aug 26 19:04:50 2010 +0100
@@ -108,10 +108,14 @@
 
   iScreenWidth  = videoInfo.iSizeInPixels.iWidth;
   iScreenHeight = videoInfo.iSizeInPixels.iHeight;
+  Kern::Printf("TPointerRv::Init3(): width: %d height: %d", iScreenWidth, iScreenHeight);
+
   iDisplayMode  = videoInfo.iDisplayMode;
 
+
   iVideoMem = videoInfo.iVideoAddress + videoInfo.iOffsetToFirstPixel;
   iOffSetBetweenEachLine = iScreenWidth;
+  Kern::Printf("TPointerRv::Init3(): iOffsetToFirstPixel: %d", iVideoMem);
 
   ix = iy = 0;
 
@@ -198,11 +202,18 @@
 TUint32 *pMem =0;
 TInt k=0;
 
+	TLinAddr activeFrameLin = ReadReg( KHwBaseClcd, 14 /*FB_VBASE*/ ); 
+	Kern::Printf("activeFrameLin: 0x%08x", activeFrameLin);
+	if( activeFrameLin == 0 )
+		{
+		return;
+		}
+
 	if(!iFirstTime)
 	{
 
 	//restore old pointer position
-	pMem = (TUint32 *)iVideoMem;
+	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
 
 	pMem+= iYtop* iOffSetBetweenEachLine;
 	pMem+= iXleft;
@@ -246,7 +257,7 @@
 	if(iYbottom> iScreenHeight)
 		iYbottom=iScreenHeight;
 
-	pMem = (TUint32 *)iVideoMem;
+	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
 	k=0;
 
 	pMem+= iYtop* iOffSetBetweenEachLine;