⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 services.h

📁 Lido PXA270平台开发板的最新BSP,包括源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/*!
 *****************************************************************************
 * Flip command structure enetered into a command queue.
 * Flip commands have "to" and "from" Syncs - the new surface to display and the 
 * old (currently on display) surface.
 * Flips are "read" operations only.
 *****************************************************************************/
typedef struct _PVRSRV_FLIP_CMD_INFO_
{

	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
											
	IMG_UINT32			ui32FlipPhysAddr	;	/*!< Address of new surface to display in display driver address space */
											
	IMG_BOOL			bFlipOnVsync;			/*!< If true - flip during vertical blanking, if false, flip immediately */
	IMG_UINT32			ui32FlipInterval;
												/*!< Minimum number of vsyncs to display the new surface for 
												     (if bFlipOnVsync is true) */ 

	IMG_UINT32 			ui32ToNextOpVal;		/*!< Pre condition for cmd execution. To->NextOp = ui32ToNextOpVal-1 */
	PVRSRV_SYNC_INFO 	*psToSyncInfoKM;		/*!< pointer to "to"s Sync info structre */
												
	IMG_UINT32 			ui32FromNextOpVal;		/*!< Pre condition for cmd execution. From->NextOp = ui32FromNextOpVal-1 */
	PVRSRV_SYNC_INFO	*psFromSyncInfoKM;		/*!< pointer to "From"s Sync info structre */

}PVRSRV_FLIP_CMD_INFO;

/*!
 *****************************************************************************
 * Flip command structure enetered into a command queue.
 * Flip commands have "to" and "from" Syncs - the new surface to display and the 
 * old (currently on display) surface.
 * Flips are "read" operations only.
 *****************************************************************************/
typedef struct _PVRSRV_FLIP_OVERLAY_CMD_INFO_
{

	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
											
	IMG_UINT32			ui32FlipPhysAddr	;	/*!< Address of new surface to display in display driver address space */
											
	IMG_BOOL			bFlipOnVsync;			/*!< If true - flip during vertical blanking, if false, flip immediately */
	IMG_UINT32			ui32FlipInterval;
												/*!< Minimum number of vsyncs to display the new surface for 
												     (if bFlipOnVsync is true) */ 

	IMG_UINT32 			ui32ToNextOpVal;		/*!< Pre condition for cmd execution. To->NextOp = ui32ToNextOpVal-1 */
	PVRSRV_SYNC_INFO 	*psToSyncInfoKM;		/*!< pointer to "to"s Sync info structre */
												
	IMG_UINT32 			ui32FromNextOpVal;		/*!< Pre condition for cmd execution. From->NextOp = ui32FromNextOpVal-1 */
	PVRSRV_SYNC_INFO	*psFromSyncInfoKM;		/*!< pointer to "From"s Sync info structre */
	IMG_UINT32*			pui32OverlayConfig;     /*!< Pointer to buffer containing overlay register configuration data.
	                                                 Format is: register ADDRESS followed by DATA to be written. */
	IMG_UINT32			ui32OverlayConfigSize;  /*!< Size of the overlay configuration (number of DWORDS). */

}PVRSRV_FLIP_OVERLAY_CMD_INFO;

/*!
 *****************************************************************************
 * Render command structure enetered into a command queue.
 *****************************************************************************/
typedef struct _PVRSRV_RENDER_CMD_INFO_
{

	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
												
	IMG_UINT32 ui32DstNextWriteOpVal;			/*!< Pre condition for cmd execution  dest->ReadsCompleted = ui32DstReadOpsPending */
	PVRSRV_SYNC_INFO 	*psDstSyncInfoKM;		/*!< pointer to the Dest's Sync info structre */	

	IMG_UINT32			ui32DstReadOpsPending;	/*!< Pre condition for cmd execution  
														dest->ReadsCompleted == ui32DstReadOpsPending */
												
	IMG_BOOL 			bUpdatePrimary;			/*!< Single shot display support - Hint for implementation */

	IMG_BOOL 			bExternalDepthBuffer;	/*!< Is an external depth buffer attched to the render target */
												
	PVRSRV_TARENDERINFO *psTARenderInfo;		/*!< Parameter buffer information struct*/
	IMG_UINT32 			ui32CurrentRenderData;	/*!< Region header index into Region headers and assoc'd state */

	IMG_UINT32 			ui32TexFormatStride;	/* this is required in processrender() */
	IMG_UINT32 			ui32TexAddrStride;		/* this is required in processrender() */

	IMG_UINT32 			ui32NumSrcSyncInfos;	/*!< How many sources are we synchronising with. In this case we embed the
												     PVRSRV_SRCSYNC_INFOs into the data stream "aui32Data" followed by the registers.*/
												
	IMG_UINT32 			ui32RegCount;			/*!< Number of register (address:value) pairs in the data stream following
												     source sync objects */
												
	IMG_UINT32 			aui32Data[1];			/*!< Consists of ui32NumSrcSyncInfos*PVRSRV_SRCSYNC_INFO structures
												     followed by ui32RegCount*PVRIF_REGENTRY structs */
}PVRSRV_RENDER_CMD_INFO;

#if defined(SUPPORT_3D_BLIT)

typedef struct _IMG_RECTF_
{
	IMG_FLOAT	fX0;
	IMG_FLOAT	fY0;
	IMG_FLOAT	fX1;
	IMG_FLOAT	fY1;
}IMG_RECTF, *PIMG_RECTF;

typedef struct _IMG_RECT_
{
	IMG_INT32	left;
	IMG_INT32	top;
	IMG_INT32	right;
	IMG_INT32	bottom;
}IMG_RECT, *PIMG_RECT;

/* mbx 3d parameters */
typedef struct _MBX_3DBLIT_PARAMS_
{
	PVRSRV_SYNC_INFO		*psDstSyncInfoKM;
	IMG_DEV_VIRTADDR		sDstDevVAddr;
	IMG_UINT32				ui32DstStride;
	IMG_UINT32				ui32DstPixFormat;
	IMG_RECT				sDstRect;
	IMG_UINT32				bUpdatePrimary;

	PVRSRV_SYNC_INFO		*psSrcSyncInfoKM;
	IMG_DEV_VIRTADDR		sSrcDevVAddr;
	IMG_UINT32				ui32SrcStride;
	IMG_UINT32				ui32SrcPixFormat;
	IMG_RECT				sSrcRect;
	IMG_UINT32				ui32SrcWidth;
	IMG_UINT32				ui32SrcHeight;

	/* Background object */
	PVRSRV_BGOBJ_INFO		sBGObject;

    /* Filter control */
	IMG_BOOL				bFilter;

    /* rotation control */
	IMG_UINT32			 	ui32SourceRotation;

    /* Src twiddle control */
	IMG_BOOL				bSourceTwiddled;

	/* Colourfill control */
	IMG_BOOL				bColourFill;
	IMG_UINT32				ui32ColourFillColour;

	/* Pixel Sampling control */
	IMG_BOOL				bD3DPixelSampling;

	/* CLIP details */	
    IMG_UINT32     			ui32NumClipRects;
    IMG_RECT       			*psClipRect;/* allocated on back of regs */
}MBX_3DBLIT_PARAMS;



typedef struct _PVRSRV_RENDERBLIT_CMD_INFO_
{
	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
	
	/* DST details */
	IMG_UINT32				ui32DstNextWriteOpVal;
	IMG_UINT32				ui32DstReadOpsPending;
	PVRSRV_SYNC_INFO		*psDstSyncInfoKM;
	IMG_DEV_VIRTADDR		sDstDevVAddr;
	IMG_UINT32				ui32DstStride;
	IMG_UINT32				ui32DstPixFormat;
	IMG_RECTF				sDstRect;
	IMG_UINT32				bUpdatePrimary;
	
	/* SRC details */	
	IMG_UINT32				ui32SrcNextWriteOpVal;
	PVRSRV_SYNC_INFO		*psSrcSyncInfoKM;
	IMG_DEV_VIRTADDR		sSrcDevVAddr;
	IMG_UINT32				ui32SrcStride;
	IMG_UINT32				ui32SrcPixFormat;
	IMG_RECTF				sSrcRect;
	IMG_UINT32				ui32SrcWidth;
	IMG_UINT32				ui32SrcHeight;

    /* Src twiddle control */
	IMG_BOOL				bSourceTwiddled;

	/* HW details */	
	IMG_UINT32				ui32TexFormatStride;
	IMG_UINT32			 	ui32TexAddrStride;
	IMG_UINT32			 	ui32HWContextID;
    
    /* Filter control */
	IMG_BOOL				bFilter;

    /* rotation control */
	IMG_UINT32			 	ui32SourceRotation;

	/* Colourfill control */
	IMG_UINT32				ui32ColourFillColour;
	
	/* CLIP details */	
    IMG_UINT32     			ui32NumClipRects;
    IMG_RECTF      			*psClipRect;/* allocated on back of regs */

    /* 3d regs */
    IMG_UINT32				ui32NumRegs;
	PVRSRV_HWREG			s3DReg[1];
}PVRSRV_RENDERBLIT_CMD_INFO;

typedef struct _PVRSRV_OVL_RENDERBLIT_CMD_INFO_
{
	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
	
	/* DST details */
	IMG_UINT32				ui32DstNextWriteOpVal;
	IMG_UINT32				ui32DstReadOpsPending;
	PVRSRV_SYNC_INFO		*psDstSyncInfoKM;
	
	/* SRC details */	
	IMG_UINT32				ui32SrcNextWriteOpVal;
	PVRSRV_SYNC_INFO		*psSrcSyncInfoKM;
	IMG_DEV_VIRTADDR		sSrcDevVAddr;

	/* Rotation code */
    IMG_UINT32				ui32Rotation;

	IMG_UINT32			 	ui32HWContextID;

	PVRSRV_HWREG			asOverlayBlitRegs[2];
	
}PVRSRV_OVL_RENDERBLIT_CMD_INFO;
#endif



/*!
 *****************************************************************************
 * LOCK command info struct, inserted into a command queue
 *****************************************************************************/ 
typedef struct _PVRSRV_LOCK_CMD_INFO_
{
	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
	IMG_UINT32			ui32NextWriteOpVal;		/*!< Pre condition for cmd execution */
	PVRSRV_SYNC_INFO 	*psSyncInfoKM;			/*!< pointer to the Dest's Sync info structre */
	IMG_UINT32			ui32ReadOpsPending;		/*!< Pre condition for cmd execution  
														dest->ReadsCompleted == ui32DstReadOpsPending */

	PVRSRV_MUTEX_HANDLE hWaitEventHandle;		/*!< Event handle that the locking process is waiting on */
	IMG_BOOL			bLockSurface;			/*!< Flag to denote lock/unock operation */
	IMG_BOOL			bPrimary;				/*!< Flag to denote primary surface */
}PVRSRV_LOCK_CMD_INFO;






/*!
 *****************************************************************************
 * Flip command structure enetered into a command queue.
 * Flip commands have "to" and "from" Syncs - the new surface to display and the 
 * old (currently on display) surface.
 * Flips are "read" operations only.
 *****************************************************************************/
typedef struct _PVRSRV_UPDATE_CMD_INFO_
{

	PVRSRV_CMD_HEADER	sCmdInfo;				/*!< Common to all command info structures */
											
	IMG_UINT32 			ui32DestNextOpVal;		/*!< Pre condition for cmd execution. Dest->NextOp = ui32DestNextOpVal-1 */
	PVRSRV_SYNC_INFO	*psDestSyncInfoKM;		/*!< pointer to "Dest"s Sync info structre */

}PVRSRV_UPDATE_CMD_INFO;





/*!
 *****************************************************************************
 * Implementation details for memory handling
 *****************************************************************************/
typedef struct _PVRSRV_MEMBLK_  
{
	IMG_SYS_PHYADDR		sSysPhysAddr;			/*!< Address of the memory in the CPU's physical address map */
	IMG_DEV_VIRTADDR	sDevVirtAddr;			/*!< Address of the memory in the IMG MMUs address space */
	IMG_HANDLE			hBuffer;				/*!< Stores the BM_HANDLE for the underlying memory management */
	PRESMAN_ITEM		psResItem;				/*!< Pointer to resource item for allocate */

} PVRSRV_MEMBLK; 

/*!
 *****************************************************************************
 * Memory Management (externel interface)
 *****************************************************************************/
typedef struct _PVRSRV_MEM_INFO_
{
	struct _PVRSRV_MEM_INFO_ *psMemInfoKM;
	IMG_PVOID				pvLinAddr;			/*!< Address of the memory in the address space of the process that allocated the memory */
	IMG_DEV_VIRTADDR			uiDevAddr;			/*!< Address of the memory in the owning devices */
												/*!<	address space */
	IMG_UINT32				*pui32Flags;		/*!< Flags indicating the uses the memory was allocated with */
										 
	IMG_UINT32				ui32AllocSize;		/*!< Size of the allocated buffer in bytes */
												
	PVRSRV_SYNC_INFO		*psSyncInfo;			/*!< Structure used with the command queue/sync mechanism */
	PVRSRV_MEMBLK			sMemBlk;			/*!< Internal implementation details. Do not use outside services code. */
	IMG_PVOID				pvSysBackupBuffer;	/*!< Address of the backup buffer used in a save/restore of the surface */
	
} PVRSRV_MEM_INFO, *PPVRSRV_MEM_INFO;


/*!
 *****************************************************************************
 * Primary Surface structure
 *****************************************************************************/
typedef struct _PVRSRV_PRIMARY_SURF_
{
	struct _PVRSRV_PRIMARY_SURF_	*psPrimSurfKM;		/*!< kernel pointer to struct. */
	struct _PVRSRV_MEM_INFO_		*psMemInfo; 		/*!< primary memory info. */

	IMG_BOOL						bValid;				/*!< Has this structure been initialised yet? */
	IMG_UINT32						ui32ByteStride;		/*!< Offset in bytes from one line of the primary surface to the next */

	IMG_UINT32 						ui32PixelWidth;		/*!< How many pixels wide is the surface */
	IMG_UINT32 						ui32PixelHeight;	/*!< How many pixels high is the surface */
	PVRSRV_PIXEL_FORMAT				ePixelFormat;		/*!< Format (e.g. rgb888) of the pixels in the surface */
														/*!< Array of pointers to the buffers set up for the flip ring */
	IMG_INT32             			i32RefCountKM;      /*!< Number of references to this primary - when zero,
															 the primary will be destroyed */
} PVRSRV_PRIMARY_SURF;


typedef struct _PVRSRV_PRIMARY_SURF_INFO_
{
	IMG_UINT32			ui32PixelWidth;
	IMG_UINT32			ui32PixelHeight;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -