linux/include/video/pm3fb.h

/*
 *  linux/drivers/video/pm3fb.h -- 3DLabs Permedia3 frame buffer device
 *
 *  Copyright (C) 2001 Romain Dolbeau <[email protected]>
 *  Copyright (C) 2001 Sven Luther, <[email protected]>
 *
 *  This file is subject to the terms and conditions of the GNU General Public
 *  License. See the file COPYING in the main directory of this archive for
 *  more details.
 */

#ifndef PM3FB_H
#define PM3FB_H

/**********************************************
*  GLINT Permedia3 Control Status registers   *
***********************************************/
/* Control Status Registers */
#define PM3ResetStatus
#define PM3IntEnable
#define PM3IntFlags
#define PM3InFIFOSpace
#define PM3OutFIFOWords
#define PM3DMAAddress
#define PM3DMACount
#define PM3ErrorFlags
#define PM3VClkCtl
#define PM3TestRegister
#define PM3Aperture0
#define PM3Aperture1
#define PM3DMAControl
#define PM3FIFODis
#define PM3ChipConfig
#define PM3AGPControl

#define PM3GPOutDMAAddress
#define PM3PCIFeedbackCount
#define PM3PCIAbortStatus
#define PM3PCIAbortAddress

#define PM3PCIPLLStatus

#define PM3HostTextureAddress
#define PM3TextureDownloadControl
#define PM3TextureOperation
#define PM3LogicalTexturePage
#define PM3TexDMAAddress
#define PM3TexFIFOSpace

/**********************************************
*  GLINT Permedia3 Region 0 Bypass Controls   *
***********************************************/
#define PM3ByAperture1Mode
	#define PM3ByApertureMode_BYTESWAP_ABCD
	#define PM3ByApertureMode_BYTESWAP_BADC
	#define PM3ByApertureMode_BYTESWAP_CDAB
	#define PM3ByApertureMode_BYTESWAP_DCBA
	#define PM3ByApertureMode_PATCH_ENABLE
	#define PM3ByApertureMode_FORMAT_RAW
	#define PM3ByApertureMode_FORMAT_YUYV
	#define PM3ByApertureMode_FORMAT_UYVY
	#define PM3ByApertureMode_PIXELSIZE_8BIT
	#define PM3ByApertureMode_PIXELSIZE_16BIT
	#define PM3ByApertureMode_PIXELSIZE_32BIT
		#define PM3ByApertureMode_PIXELSIZE_MASK
	#define PM3ByApertureMode_EFFECTIVE_STRIDE_1024
	#define PM3ByApertureMode_EFFECTIVE_STRIDE_2048
	#define PM3ByApertureMode_EFFECTIVE_STRIDE_4096
	#define PM3ByApertureMode_EFFECTIVE_STRIDE_8192
	#define PM3ByApertureMode_PATCH_OFFSET_X(off)
	#define PM3ByApertureMode_PATCH_OFFSET_Y(off)
	#define PM3ByApertureMode_FRAMEBUFFER
	#define PM3ByApertureMode_LOCALBUFFER
	#define PM3ByApertureMode_DOUBLE_WRITE_OFF
	#define PM3ByApertureMode_DOUBLE_WRITE_1MB
	#define PM3ByApertureMode_DOUBLE_WRITE_2MB
	#define PM3ByApertureMode_DOUBLE_WRITE_4MB
	#define PM3ByApertureMode_DOUBLE_WRITE_8MB
	#define PM3ByApertureMode_DOUBLE_WRITE_16MB
	#define PM3ByApertureMode_DOUBLE_WRITE_32MB

#define PM3ByAperture2Mode

/**********************************************
*  GLINT Permedia3 Memory Control (0x1000)    *
***********************************************/
#define PM3MemCounter
#define PM3MemBypassWriteMask
#define PM3MemScratch
#define PM3LocalMemCaps
	#define PM3LocalMemCaps_NoWriteMask
#define PM3LocalMemTimings
#define PM3LocalMemControl
#define PM3LocalMemRefresh
#define PM3LocalMemPowerDown
#define PM3RemoteMemControl

/**********************************************
*  GLINT Permedia3 Video Control (0x3000)     *
***********************************************/

#define PM3ScreenBase
#define PM3ScreenStride
#define PM3HTotal
#define PM3HgEnd
#define PM3HbEnd
#define PM3HsStart
#define PM3HsEnd
#define PM3VTotal
#define PM3VbEnd
#define PM3VsStart
#define PM3VsEnd
#define PM3VideoControl
	#define PM3VideoControl_ENABLE
	#define PM3VideoControl_BLANK_ACTIVE_HIGH
	#define PM3VideoControl_BLANK_ACTIVE_LOW
	#define PM3VideoControl_LINE_DOUBLE_OFF
	#define PM3VideoControl_LINE_DOUBLE_ON
	#define PM3VideoControl_HSYNC_FORCE_HIGH
	#define PM3VideoControl_HSYNC_ACTIVE_HIGH
	#define PM3VideoControl_HSYNC_FORCE_LOW
	#define PM3VideoControl_HSYNC_ACTIVE_LOW
	#define PM3VideoControl_HSYNC_MASK
	#define PM3VideoControl_VSYNC_FORCE_HIGH
	#define PM3VideoControl_VSYNC_ACTIVE_HIGH
	#define PM3VideoControl_VSYNC_FORCE_LOW
	#define PM3VideoControl_VSYNC_ACTIVE_LOW
	#define PM3VideoControl_VSYNC_MASK
	#define PM3VideoControl_BYTE_DOUBLE_OFF
	#define PM3VideoControl_BYTE_DOUBLE_ON
	#define PM3VideoControl_BUFFER_SWAP_SYNCON_FRAMEBLANK
	#define PM3VideoControl_BUFFER_SWAP_FREE_RUNNING
	#define PM3VideoControl_BUFFER_SWAP_LIMITETO_FRAMERATE
	#define PM3VideoControl_STEREO_ENABLE
	#define PM3VideoControl_RIGHT_EYE_ACTIVE_HIGH
	#define PM3VideoControl_RIGHT_EYE_ACTIVE_LOW
	#define PM3VideoControl_VIDEO_EXT_LOW
	#define PM3VideoControl_VIDEO_EXT_HIGH
	#define PM3VideoControl_SYNC_MODE_INDEPENDENT
	#define PM3VideoControl_SYNC_MODE_SYNCTO_VSA
	#define PM3VideoControl_SYNC_MODE_SYNCTO_VSB
	#define PM3VideoControl_PATCH_ENABLE
	#define PM3VideoControl_PIXELSIZE_8BIT
	#define PM3VideoControl_PIXELSIZE_16BIT
	#define PM3VideoControl_PIXELSIZE_32BIT
	#define PM3VideoControl_DISPLAY_ENABLE
	#define PM3VideoControl_PATCH_OFFSET_X(off)
	#define PM3VideoControl_PATCH_OFFSET_Y(off)
#define PM3InterruptLine
#define PM3DisplayData
#define PM3VerticalLineCount
#define PM3FifoControl
#define PM3ScreenBaseRight
#define PM3MiscControl

#define PM3VideoOverlayUpdate
	#define PM3VideoOverlayUpdate_ENABLE
#define PM3VideoOverlayMode
	#define PM3VideoOverlayMode_ENABLE
	#define PM3VideoOverlayMode_BUFFERSYNC_MANUAL
	#define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMA
	#define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMB
	#define PM3VideoOverlayMode_FIELDPOLARITY_NORMAL
	#define PM3VideoOverlayMode_FIELDPOLARITY_INVERT
	#define PM3VideoOverlayMode_PIXELSIZE_8BIT
	#define PM3VideoOverlayMode_PIXELSIZE_16BIT
	#define PM3VideoOverlayMode_PIXELSIZE_32BIT
	#define PM3VideoOverlayMode_COLORFORMAT_RGB8888
	#define PM3VideoOverlayMode_COLORFORMAT_RGB4444
	#define PM3VideoOverlayMode_COLORFORMAT_RGB5551
	#define PM3VideoOverlayMode_COLORFORMAT_RGB565
	#define PM3VideoOverlayMode_COLORFORMAT_RGB332
	#define PM3VideoOverlayMode_COLORFORMAT_BGR8888
	#define PM3VideoOverlayMode_COLORFORMAT_BGR4444
	#define PM3VideoOverlayMode_COLORFORMAT_BGR5551
	#define PM3VideoOverlayMode_COLORFORMAT_BGR565
	#define PM3VideoOverlayMode_COLORFORMAT_BGR332
	#define PM3VideoOverlayMode_COLORFORMAT_CI8
	#define PM3VideoOverlayMode_COLORFORMAT_VUY444
	#define PM3VideoOverlayMode_COLORFORMAT_YUV444
	#define PM3VideoOverlayMode_COLORFORMAT_VUY422
	#define PM3VideoOverlayMode_COLORFORMAT_YUV422
	#define PM3VideoOverlayMode_COLORORDER_BGR
	#define PM3VideoOverlayMode_COLORORDER_RGB
	#define PM3VideoOverlayMode_LINEARCOLOREXT_OFF
	#define PM3VideoOverlayMode_LINEARCOLOREXT_ON
	#define PM3VideoOverlayMode_FILTER_MASK
	#define PM3VideoOverlayMode_FILTER_OFF
	#define PM3VideoOverlayMode_FILTER_FULL
	#define PM3VideoOverlayMode_FILTER_PARTIAL
	#define PM3VideoOverlayMode_DEINTERLACE_OFF
	#define PM3VideoOverlayMode_DEINTERLACE_BOB
	#define PM3VideoOverlayMode_PATCHMODE_OFF
	#define PM3VideoOverlayMode_PATCHMODE_ON
	#define PM3VideoOverlayMode_FLIP_VIDEO
	#define PM3VideoOverlayMode_FLIP_VIDEOSTREAMA
	#define PM3VideoOverlayMode_FLIP_VIDEOSTREAMB
	#define PM3VideoOverlayMode_MIRROR_MASK
	#define PM3VideoOverlayMode_MIRRORX_OFF
	#define PM3VideoOverlayMode_MIRRORX_ON
	#define PM3VideoOverlayMode_MIRRORY_OFF
	#define PM3VideoOverlayMode_MIRRORY_ON
#define PM3VideoOverlayFifoControl
#define PM3VideoOverlayIndex
#define PM3VideoOverlayBase0
#define PM3VideoOverlayBase1
#define PM3VideoOverlayBase2
#define PM3VideoOverlayStride
	#define PM3VideoOverlayStride_STRIDE(s)
#define PM3VideoOverlayWidth
	#define PM3VideoOverlayWidth_WIDTH(w)
#define PM3VideoOverlayHeight
	#define PM3VideoOverlayHeight_HEIGHT(h)
#define PM3VideoOverlayOrigin
	#define PM3VideoOverlayOrigin_XORIGIN(x)
	#define PM3VideoOverlayOrigin_YORIGIN(y)
#define PM3VideoOverlayShrinkXDelta
	#define PM3VideoOverlayShrinkXDelta_NONE
	#define PM3VideoOverlayShrinkXDelta_DELTA(s,d)
#define PM3VideoOverlayZoomXDelta
	#define PM3VideoOverlayZoomXDelta_NONE
	#define PM3VideoOverlayZoomXDelta_DELTA(s,d)
#define PM3VideoOverlayYDelta
	#define PM3VideoOverlayYDelta_NONE
	#define PM3VideoOverlayYDelta_DELTA(s,d)
#define PM3VideoOverlayFieldOffset
#define PM3VideoOverlayStatus

/**********************************************
*  GLINT Permedia3 RAMDAC Registers (0x4000)  *
***********************************************/
/* Direct Registers */
#define PM3RD_PaletteWriteAddress
#define PM3RD_PaletteData
#define PM3RD_PixelMask
#define PM3RD_PaletteReadAddress

#define PM3RD_IndexLow
#define PM3RD_IndexHigh
#define PM3RD_IndexedData
#define PM3RD_IndexControl
	#define PM3RD_IndexControl_AUTOINCREMENT_ENABLE

/* Indirect Registers */
#define PM3RD_MiscControl
	#define PM3RD_MiscControl_HIGHCOLOR_RES_ENABLE
	#define PM3RD_MiscControl_PIXELDOUBLE_ENABLE
	#define PM3RD_MiscControl_LASTREAD_ADDR_ENABLE
	#define PM3RD_MiscControl_DIRECTCOLOR_ENABLE
	#define PM3RD_MiscControl_OVERLAY_ENABLE
	#define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_ENABLE
	#define PM3RD_MiscControl_VSB_OUTPUT_ENABLE
	#define PM3RD_MiscControl_STEREODOUBLE_BUFFER_ENABLE
#define PM3RD_SyncControl
	#define PM3RD_SyncControl_HSYNC_ACTIVE_LOW
	#define PM3RD_SyncControl_HSYNC_ACTIVE_HIGH
	#define PM3RD_SyncControl_HSYNC_FORCE_ACTIVE
	#define PM3RD_SyncControl_HSYNC_FORCE_INACTIVE
	#define PM3RD_SyncControl_HSYNC_TRI_STATE
	#define PM3RD_SyncControl_VSYNC_ACTIVE_LOW
	#define PM3RD_SyncControl_VSYNC_ACTIVE_HIGH
	#define PM3RD_SyncControl_VSYNC_TRI_STATE
	#define PM3RD_SyncControl_VSYNC_FORCE_ACTIVE
	#define PM3RD_SyncControl_VSYNC_FORCE_INACTIVE
	#define PM3RD_SyncControl_HSYNC_OVERRIDE_SETBY_HSYNC
	#define PM3RD_SyncControl_HSYNC_OVERRIDE_FORCE_HIGH
	#define PM3RD_SyncControl_VSYNC_OVERRIDE_SETBY_VSYNC
	#define PM3RD_SyncControl_VSYNC_OVERRIDE_FORCE_HIGH
#define PM3RD_DACControl
	#define PM3RD_DACControl_DAC_POWER_ON
	#define PM3RD_DACControl_DAC_POWER_OFF
	#define PM3RD_DACControl_SYNC_ON_GREEN_ENABLE
	#define PM3RD_DACControl_BLANK_RED_DAC_ENABLE
	#define PM3RD_DACControl_BLANK_GREEN_DAC_ENABLE
	#define PM3RD_DACControl_BLANK_BLUE_DAC_ENABLE
	#define PM3RD_DACControl_BLANK_PEDESTAL_ENABLE
#define PM3RD_PixelSize
	#define PM3RD_PixelSize_24_BIT_PIXELS
	#define PM3RD_PixelSize_32_BIT_PIXELS
	#define PM3RD_PixelSize_16_BIT_PIXELS
	#define PM3RD_PixelSize_8_BIT_PIXELS
#define PM3RD_ColorFormat
	#define PM3RD_ColorFormat_LINEAR_COLOR_EXT_ENABLE
	#define PM3RD_ColorFormat_COLOR_ORDER_BLUE_LOW
	#define PM3RD_ColorFormat_COLOR_ORDER_RED_LOW
	#define PM3RD_ColorFormat_COLOR_FORMAT_MASK
	#define PM3RD_ColorFormat_8888_COLOR
	#define PM3RD_ColorFormat_5551_FRONT_COLOR
	#define PM3RD_ColorFormat_4444_COLOR
	#define PM3RD_ColorFormat_332_FRONT_COLOR
	#define PM3RD_ColorFormat_332_BACK_COLOR
	#define PM3RD_ColorFormat_2321_FRONT_COLOR
	#define PM3RD_ColorFormat_2321_BACK_COLOR
	#define PM3RD_ColorFormat_232_FRONTOFF_COLOR
	#define PM3RD_ColorFormat_232_BACKOFF_COLOR
	#define PM3RD_ColorFormat_5551_BACK_COLOR
	#define PM3RD_ColorFormat_CI8_COLOR
	#define PM3RD_ColorFormat_565_FRONT_COLOR
	#define PM3RD_ColorFormat_565_BACK_COLOR
#define PM3RD_CursorMode
	#define PM3RD_CursorMode_CURSOR_ENABLE
	#define PM3RD_CursorMode_FORMAT_64x64_2BPE_P0123
	#define PM3RD_CursorMode_FORMAT_32x32_2BPE_P0
	#define PM3RD_CursorMode_FORMAT_32x32_2BPE_P1
	#define PM3RD_CursorMode_FORMAT_32x32_2BPE_P2
	#define PM3RD_CursorMode_FORMAT_32x32_2BPE_P3
	#define PM3RD_CursorMode_FORMAT_32x32_4BPE_P01
	#define PM3RD_CursorMode_FORMAT_32x32_4BPE_P23
	#define PM3RD_CursorMode_TYPE_MS
	#define PM3RD_CursorMode_TYPE_X
	#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_ENABLE
	#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_3_COLOR
	#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_15_COLOR
#define PM3RD_CursorControl
	#define PM3RD_CursorControl_DOUBLE_X_ENABLED
	#define PM3RD_CursorControl_DOUBLE_Y_ENABLED
	#define PM3RD_CursorControl_READBACK_POS_ENABLED

#define PM3RD_CursorXLow
#define PM3RD_CursorXHigh
#define PM3RD_CursorYLow
#define PM3RD_CursorYHigh
#define PM3RD_CursorHotSpotX
#define PM3RD_CursorHotSpotY
#define PM3RD_OverlayKey
#define PM3RD_Pan
	#define PM3RD_Pan_ENABLE
	#define PM3RD_Pan_GATE_ENABLE
#define PM3RD_Sense

#define PM3RD_CheckControl
	#define PM3RD_CheckControl_PIXEL_ENABLED
	#define PM3RD_CheckControl_LUT_ENABLED
#define PM3RD_CheckPixelRed
#define PM3RD_CheckPixelGreen
#define PM3RD_CheckPixelBlue
#define PM3RD_CheckLUTRed
#define PM3RD_CheckLUTGreen
#define PM3RD_CheckLUTBlue
#define PM3RD_Scratch

#define PM3RD_VideoOverlayControl
	#define PM3RD_VideoOverlayControl_ENABLE
	#define PM3RD_VideoOverlayControl_MODE_MASK
	#define PM3RD_VideoOverlayControl_MODE_MAINKEY
	#define PM3RD_VideoOverlayControl_MODE_OVERLAYKEY
	#define PM3RD_VideoOverlayControl_MODE_ALWAYS
	#define PM3RD_VideoOverlayControl_MODE_BLEND
	#define PM3RD_VideoOverlayControl_DIRECTCOLOR_ENABLED
	#define PM3RD_VideoOverlayControl_BLENDSRC_MAIN
	#define PM3RD_VideoOverlayControl_BLENDSRC_REGISTER
	#define PM3RD_VideoOverlayControl_KEY_COLOR
	#define PM3RD_VideoOverlayControl_KEY_ALPHA
#define PM3RD_VideoOverlayXStartLow
#define PM3RD_VideoOverlayXStartHigh
#define PM3RD_VideoOverlayYStartLow
#define PM3RD_VideoOverlayYStartHigh
#define PM3RD_VideoOverlayXEndLow
#define PM3RD_VideoOverlayXEndHigh
#define PM3RD_VideoOverlayYEndLow
#define PM3RD_VideoOverlayYEndHigh
#define PM3RD_VideoOverlayKeyR
#define PM3RD_VideoOverlayKeyG
#define PM3RD_VideoOverlayKeyB
#define PM3RD_VideoOverlayBlend
	#define PM3RD_VideoOverlayBlend_FACTOR_0_PERCENT
	#define PM3RD_VideoOverlayBlend_FACTOR_25_PERCENT
	#define PM3RD_VideoOverlayBlend_FACTOR_75_PERCENT
	#define PM3RD_VideoOverlayBlend_FACTOR_100_PERCENT

#define PM3RD_DClkSetup1
#define PM3RD_DClkSetup2
#define PM3RD_KClkSetup1
#define PM3RD_KClkSetup2

#define PM3RD_DClkControl
	#define PM3RD_DClkControl_SOURCE_PLL
	#define PM3RD_DClkControl_SOURCE_VSA
	#define PM3RD_DClkControl_SOURCE_VSB
	#define PM3RD_DClkControl_SOURCE_EXT
	#define PM3RD_DClkControl_STATE_RUN
	#define PM3RD_DClkControl_STATE_HIGH
	#define PM3RD_DClkControl_STATE_LOW
	#define PM3RD_DClkControl_LOCKED
	#define PM3RD_DClkControl_NOT_LOCKED
	#define PM3RD_DClkControl_ENABLE
#define PM3RD_DClk0PreScale
#define PM3RD_DClk0FeedbackScale
#define PM3RD_DClk0PostScale
	#define PM3_REF_CLOCK
#define PM3RD_DClk1PreScale
#define PM3RD_DClk1FeedbackScale
#define PM3RD_DClk1PostScale
#define PM3RD_DClk2PreScale
#define PM3RD_DClk2FeedbackScale
#define PM3RD_DClk2PostScale
#define PM3RD_DClk3PreScale
#define PM3RD_DClk3FeedbackScale
#define PM3RD_DClk3PostScale
#define PM3RD_KClkControl
	#define PM3RD_KClkControl_ENABLE
	#define PM3RD_KClkControl_NOT_LOCKED
	#define PM3RD_KClkControl_LOCKED
	#define PM3RD_KClkControl_STATE_LOW
	#define PM3RD_KClkControl_STATE_HIGH
	#define PM3RD_KClkControl_STATE_RUN
	#define PM3RD_KClkControl_STATE_LOW_POWER
	#define PM3RD_KClkControl_SOURCE_PCLK
	#define PM3RD_KClkControl_SOURCE_HALF_PCLK
	#define PM3RD_KClkControl_SOURCE_PLL
#define PM3RD_KClkPreScale
#define PM3RD_KClkFeedbackScale
#define PM3RD_KClkPostScale
#define PM3RD_MClkControl
	#define PM3RD_MClkControl_ENABLE
	#define PM3RD_MClkControl_NOT_LOCKED
	#define PM3RD_MClkControl_LOCKED
	#define PM3RD_MClkControl_STATE_LOW
	#define PM3RD_MClkControl_STATE_HIGH
	#define PM3RD_MClkControl_STATE_RUN
	#define PM3RD_MClkControl_STATE_LOW_POWER
	#define PM3RD_MClkControl_SOURCE_PCLK
	#define PM3RD_MClkControl_SOURCE_HALF_PCLK
	#define PM3RD_MClkControl_SOURCE_HALF_EXT
	#define PM3RD_MClkControl_SOURCE_EXT
	#define PM3RD_MClkControl_SOURCE_HALF_KCLK
	#define PM3RD_MClkControl_SOURCE_KCLK
#define PM3RD_MClkPreScale
#define PM3RD_MClkFeedbackScale
#define PM3RD_MClkPostScale
#define PM3RD_SClkControl
	#define PM3RD_SClkControl_ENABLE
	#define PM3RD_SClkControl_NOT_LOCKED
	#define PM3RD_SClkControl_LOCKED
	#define PM3RD_SClkControl_STATE_LOW
	#define PM3RD_SClkControl_STATE_HIGH
	#define PM3RD_SClkControl_STATE_RUN
	#define PM3RD_SClkControl_STATE_LOW_POWER
	#define PM3RD_SClkControl_SOURCE_PCLK
	#define PM3RD_SClkControl_SOURCE_HALF_PCLK
	#define PM3RD_SClkControl_SOURCE_HALF_EXT
	#define PM3RD_SClkControl_SOURCE_EXT
	#define PM3RD_SClkControl_SOURCE_HALF_KCLK
	#define PM3RD_SClkControl_SOURCE_KCLK
#define PM3RD_SClkPreScale
#define PM3RD_SClkFeedbackScale
#define PM3RD_SClkPostScale

#define PM3RD_CursorPalette(p)
#define PM3RD_CursorPattern(p)
/******************************************************
*  GLINT Permedia3 Video Streaming Registers (0x5000) *
*******************************************************/

#define PM3VSConfiguration

/**********************************************
*  GLINT Permedia3 Core Registers (0x8000+)   *
***********************************************/
#define PM3AALineWidth
#define PM3AAPointsize
#define PM3AlphaBlendAlphaMode
#define PM3AlphaBlendAlphaModeAnd
#define PM3AlphaBlendAlphaModeOr
#define PM3AlphaBlendColorMode
#define PM3AlphaBlendColorModeAnd
#define PM3AlphaBlendColorModeOr
#define PM3AlphaDestColor
#define PM3AlphaSourceColor
#define PM3AlphaTestMode
#define PM3AlphaTestModeAnd
#define PM3AlphaTestModeOr
#define PM3AntialiasMode
#define PM3AntialiasModeAnd
#define PM3AntialiasModeOr
/* ... */
#define PM3BackgroundColor
/* ... */
#define PM3ColorDDAMode
#define PM3ColorDDAModeAnd
#define PM3ColorDDAModeOr
#define PM3CommandInterrupt
#define PM3ConstantColorDDA
	#define PM3ConstantColorDDA_R(r)
	#define PM3ConstantColorDDA_G(g)
	#define PM3ConstantColorDDA_B(b)
	#define PM3ConstantColorDDA_A(a)
#define PM3ContextData
#define PM3ContextDump
#define PM3ContextRestore
#define PM3Continue
#define PM3ContinueNewDom
#define PM3ContinueNewLine
#define PM3ContinueNewSub
#define PM3Count
/* ... */
#define PM3DeltaControl
#define PM3DeltaControlAnd
#define PM3DeltaControlOr
#define PM3DeltaMode
#define PM3DeltaModeAnd
#define PM3DeltaModeOr
/* ... */
#define PM3DitherMode
#define PM3DitherModeAnd
#define PM3DitherModeOr
/* ... */
#define PM3dXDom
#define PM3dXSub
#define PM3dY
/* ... */
#define PM3FBBlockColor
#define PM3FBBlockColor0
#define PM3FBBlockColor1
#define PM3FBBlockColor2
#define PM3FBBlockColor3
#define PM3FBBlockColorBack
#define PM3FBBlockColorBack0
#define PM3FBBlockColorBack1
#define PM3FBBlockColorBack2
#define PM3FBBlockColorBack3
#define PM3FBColor
#define PM3FBDestReadBufferAddr0
#define PM3FBDestReadBufferAddr1
#define PM3FBDestReadBufferAddr2
#define PM3FBDestReadBufferAddr3
#define PM3FBDestReadBufferOffset0
#define PM3FBDestReadBufferOffset1
#define PM3FBDestReadBufferOffset2
#define PM3FBDestReadBufferOffset3
	#define PM3FBDestReadBufferOffset_XOffset(x)
	#define PM3FBDestReadBufferOffset_YOffset(y)
#define PM3FBDestReadBufferWidth0
#define PM3FBDestReadBufferWidth1
#define PM3FBDestReadBufferWidth2
#define PM3FBDestReadBufferWidth3
	#define PM3FBDestReadBufferWidth_Width(w)

#define PM3FBDestReadEnables
#define PM3FBDestReadEnablesAnd
#define PM3FBDestReadEnablesOr
	#define PM3FBDestReadEnables_E(e)
	#define PM3FBDestReadEnables_E0
	#define PM3FBDestReadEnables_E1
	#define PM3FBDestReadEnables_E2
	#define PM3FBDestReadEnables_E3
	#define PM3FBDestReadEnables_E4
	#define PM3FBDestReadEnables_E5
	#define PM3FBDestReadEnables_E6
	#define PM3FBDestReadEnables_E7
	#define PM3FBDestReadEnables_R(r)
	#define PM3FBDestReadEnables_R0
	#define PM3FBDestReadEnables_R1
	#define PM3FBDestReadEnables_R2
	#define PM3FBDestReadEnables_R3
	#define PM3FBDestReadEnables_R4
	#define PM3FBDestReadEnables_R5
	#define PM3FBDestReadEnables_R6
	#define PM3FBDestReadEnables_R7
	#define PM3FBDestReadEnables_ReferenceAlpha(a)

#define PM3FBDestReadMode
#define PM3FBDestReadModeAnd
#define PM3FBDestReadModeOr
	#define PM3FBDestReadMode_ReadDisable
	#define PM3FBDestReadMode_ReadEnable
	#define PM3FBDestReadMode_StripePitch(sp)
	#define PM3FBDestReadMode_StripeHeight(sh)
	#define PM3FBDestReadMode_Enable0
	#define PM3FBDestReadMode_Enable1
	#define PM3FBDestReadMode_Enable2
	#define PM3FBDestReadMode_Enable3
	#define PM3FBDestReadMode_Layout0(l)
	#define PM3FBDestReadMode_Layout1(l)
	#define PM3FBDestReadMode_Layout2(l)
	#define PM3FBDestReadMode_Layout3(l)
	#define PM3FBDestReadMode_Origin0
	#define PM3FBDestReadMode_Origin1
	#define PM3FBDestReadMode_Origin2
	#define PM3FBDestReadMode_Origin3
	#define PM3FBDestReadMode_Blocking
	#define PM3FBDestReadMode_UseReadEnabled
	#define PM3FBDestReadMode_AlphaFiltering

#define PM3FBHardwareWriteMask
#define PM3FBSoftwareWriteMask
#define PM3FBData
#define PM3FBSourceData
#define PM3FBSourceReadBufferAddr
#define PM3FBSourceReadBufferOffset
	#define PM3FBSourceReadBufferOffset_XOffset(x)
	#define PM3FBSourceReadBufferOffset_YOffset(y)
#define PM3FBSourceReadBufferWidth
	#define PM3FBSourceReadBufferWidth_Width(w)
#define PM3FBSourceReadMode
#define PM3FBSourceReadModeAnd
#define PM3FBSourceReadModeOr
	#define PM3FBSourceReadMode_ReadDisable
	#define PM3FBSourceReadMode_ReadEnable
	#define PM3FBSourceReadMode_StripePitch(sp)
	#define PM3FBSourceReadMode_StripeHeight(sh)
	#define PM3FBSourceReadMode_Layout(l)
	#define PM3FBSourceReadMode_Origin
	#define PM3FBSourceReadMode_Blocking
	#define PM3FBSourceReadMode_UserTexelCoord
	#define PM3FBSourceReadMode_WrapXEnable
	#define PM3FBSourceReadMode_WrapYEnable
	#define PM3FBSourceReadMode_WrapX(w)
	#define PM3FBSourceReadMode_WrapY(w)
	#define PM3FBSourceReadMode_ExternalSourceData
#define PM3FBWriteBufferAddr0
#define PM3FBWriteBufferAddr1
#define PM3FBWriteBufferAddr2
#define PM3FBWriteBufferAddr3

#define PM3FBWriteBufferOffset0
#define PM3FBWriteBufferOffset1
#define PM3FBWriteBufferOffset2
#define PM3FBWriteBufferOffset3
	#define PM3FBWriteBufferOffset_XOffset(x)
	#define PM3FBWriteBufferOffset_YOffset(y)

#define PM3FBWriteBufferWidth0
#define PM3FBWriteBufferWidth1
#define PM3FBWriteBufferWidth2
#define PM3FBWriteBufferWidth3
	#define PM3FBWriteBufferWidth_Width(w)

#define PM3FBWriteMode
#define PM3FBWriteModeAnd
#define PM3FBWriteModeOr
	#define PM3FBWriteMode_WriteDisable
	#define PM3FBWriteMode_WriteEnable
	#define PM3FBWriteMode_Replicate
	#define PM3FBWriteMode_OpaqueSpan
	#define PM3FBWriteMode_StripePitch(p)
	#define PM3FBWriteMode_StripeHeight(h)
	#define PM3FBWriteMode_Enable0
	#define PM3FBWriteMode_Enable1
	#define PM3FBWriteMode_Enable2
	#define PM3FBWriteMode_Enable3
	#define PM3FBWriteMode_Layout0(l)
	#define PM3FBWriteMode_Layout1(l)
	#define PM3FBWriteMode_Layout2(l)
	#define PM3FBWriteMode_Layout3(l)
	#define PM3FBWriteMode_Origin0
	#define PM3FBWriteMode_Origin1
	#define PM3FBWriteMode_Origin2
	#define PM3FBWriteMode_Origin3
#define PM3ForegroundColor
/* ... */
#define PM3GIDMode
#define PM3GIDModeAnd
#define PM3GIDModeOr
/* ... */
#define PM3LBDestReadBufferAddr
#define PM3LBDestReadBufferOffset
#define PM3LBDestReadEnables
#define PM3LBDestReadEnablesAnd
#define PM3LBDestReadEnablesOr
#define PM3LBDestReadMode
#define PM3LBDestReadModeAnd
#define PM3LBDestReadModeOr
	#define PM3LBDestReadMode_Disable
	#define PM3LBDestReadMode_Enable
	#define PM3LBDestReadMode_StripePitch(p)
	#define PM3LBDestReadMode_StripeHeight(h)
	#define PM3LBDestReadMode_Layout
	#define PM3LBDestReadMode_Origin
	#define PM3LBDestReadMode_UserReadEnables
	#define PM3LBDestReadMode_Packed16
	#define PM3LBDestReadMode_Width(w)
#define PM3LBReadFormat
	#define PM3LBReadFormat_DepthWidth(w)
	#define PM3LBReadFormat_StencilWidth(w)
	#define PM3LBReadFormat_StencilPosition(p)
	#define PM3LBReadFormat_FCPWidth(w)
	#define PM3LBReadFormat_FCPPosition(p)
	#define PM3LBReadFormat_GIDWidth(w)
	#define PM3LBReadFormat_GIDPosition(p)
#define PM3LBSourceReadBufferAddr
#define PM3LBSourceReadBufferOffset
#define PM3LBSourceReadMode
#define PM3LBSourceReadModeAnd
#define PM3LBSourceReadModeOr
	#define PM3LBSourceReadMode_Enable
	#define PM3LBSourceReadMode_StripePitch(p)
	#define PM3LBSourceReadMode_StripeHeight(h)
	#define PM3LBSourceReadMode_Layout
	#define PM3LBSourceReadMode_Origin
	#define PM3LBSourceReadMode_Packed16
	#define PM3LBSourceReadMode_Width(w)
#define PM3LBStencil
#define PM3LBWriteBufferAddr
#define PM3LBWriteBufferOffset
#define PM3LBWriteFormat
	#define PM3LBWriteFormat_DepthWidth(w)
	#define PM3LBWriteFormat_StencilWidth(w)
	#define PM3LBWriteFormat_StencilPosition(p)
	#define PM3LBWriteFormat_GIDWidth(w)
	#define PM3LBWriteFormat_GIDPosition(p)
#define PM3LBWriteMode
#define PM3LBWriteModeAnd
#define PM3LBWriteModeOr
	#define PM3LBWriteMode_WriteDisable
	#define PM3LBWriteMode_WriteEnable
	#define PM3LBWriteMode_StripePitch(p)
	#define PM3LBWriteMode_StripeHeight(h)
	#define PM3LBWriteMode_Layout
	#define PM3LBWriteMode_Origin
	#define PM3LBWriteMode_Packed16
	#define PM3LBWriteMode_Width(w)
/* ... */
#define PM3LineStippleMode
#define PM3LineStippleModeAnd
#define PM3LineStippleModeOr
#define PM3LoadLineStippleCounters
/* ... */
#define PM3LogicalOpMode
#define PM3LogicalOpModeAnd
#define PM3LogicalOpModeOr
	#define PM3LogicalOpMode_Disable
	#define PM3LogicalOpMode_Enable
	#define PM3LogicalOpMode_LogicOp(op)
	#define PM3LogicalOpMode_UseConstantWriteData_Disable
	#define PM3LogicalOpMode_UseConstantWriteData_Enable
	#define PM3LogicalOpMode_Background_Disable
	#define PM3LogicalOpMode_Background_Enable
	#define PM3LogicalOpMode_Background_LogicOp(op)
	#define PM3LogicalOpMode_UseConstantSource_Disable
	#define PM3LogicalOpMode_UseConstantSource_Enable
/* ... */
#define PM3LUT
#define PM3LUTAddress
#define PM3LUTData
#define PM3LUTIndex
#define PM3LUTMode
#define PM3LUTModeAnd
#define PM3LUTModeOr
#define PM3LUTTransfer
/* ... */
#define PM3PixelSize
	#define PM3PixelSize_GLOBAL_32BIT
	#define PM3PixelSize_GLOBAL_16BIT
	#define PM3PixelSize_GLOBAL_8BIT
	#define PM3PixelSize_RASTERIZER_32BIT
	#define PM3PixelSize_RASTERIZER_16BIT
	#define PM3PixelSize_RASTERIZER_8BIT
	#define PM3PixelSize_SCISSOR_AND_STIPPLE_32BIT
	#define PM3PixelSize_SCISSOR_AND_STIPPLE_16BIT
	#define PM3PixelSize_SCISSOR_AND_STIPPLE_8BIT
	#define PM3PixelSize_TEXTURE_32BIT
	#define PM3PixelSize_TEXTURE_16BIT
	#define PM3PixelSize_TEXTURE_8BIT
	#define PM3PixelSize_LUT_32BIT
	#define PM3PixelSize_LUT_16BIT
	#define PM3PixelSize_LUT_8BIT
	#define PM3PixelSize_FRAMEBUFFER_32BIT
	#define PM3PixelSize_FRAMEBUFFER_16BIT
	#define PM3PixelSize_FRAMEBUFFER_8BIT
	#define PM3PixelSize_LOGICAL_OP_32BIT
	#define PM3PixelSize_LOGICAL_OP_16BIT
	#define PM3PixelSize_LOGICAL_OP_8BIT
	#define PM3PixelSize_LOCALBUFFER_32BIT
	#define PM3PixelSize_LOCALBUFFER_16BIT
	#define PM3PixelSize_LOCALBUFFER_8BIT
	#define PM3PixelSize_SETUP_32BIT
	#define PM3PixelSize_SETUP_16BIT
	#define PM3PixelSize_SETUP_8BIT
	#define PM3PixelSize_GLOBAL
	#define PM3PixelSize_INDIVIDUAL
/* ... */
#define PM3Render
	#define PM3Render_AreaStipple_Disable
	#define PM3Render_AreaStipple_Enable
	#define PM3Render_LineStipple_Disable
	#define PM3Render_LineStipple_Enable
	#define PM3Render_ResetLine_Disable
	#define PM3Render_ResetLine_Enable
	#define PM3Render_FastFill_Disable
	#define PM3Render_FastFill_Enable
	#define PM3Render_Primitive_Line
	#define PM3Render_Primitive_Trapezoid
	#define PM3Render_Primitive_Point
	#define PM3Render_Antialias_Disable
	#define PM3Render_Antialias_Enable
	#define PM3Render_Antialias_SubPixelRes_4x4
	#define PM3Render_Antialias_SubPixelRes_8x8
	#define PM3Render_UsePointTable_Disable
	#define PM3Render_UsePointTable_Enable
	#define PM3Render_SyncOnbitMask_Disable
	#define PM3Render_SyncOnBitMask_Enable
	#define PM3Render_SyncOnHostData_Disable
	#define PM3Render_SyncOnHostData_Enable
	#define PM3Render_Texture_Disable
	#define PM3Render_Texture_Enable
	#define PM3Render_Fog_Disable
	#define PM3Render_Fog_Enable
	#define PM3Render_Coverage_Disable
	#define PM3Render_Coverage_Enable
	#define PM3Render_SubPixelCorrection_Disable
	#define PM3Render_SubPixelCorrection_Enable
	#define PM3Render_SpanOperation_Disable
	#define PM3Render_SpanOperation_Enable
	#define PM3Render_FBSourceRead_Disable
	#define PM3Render_FBSourceRead_Enable
#define PM3RasterizerMode
#define PM3RasterizerModeAnd
#define PM3RasterizerModeOr
#define PM3RectangleHeight
#define PM3RepeatLine
#define PM3ResetPickResult
#define PM3RLEMask
#define PM3RouterMode
#define PM3RStart
#define PM3S1Start
#define PM3aveLineStippleCounters
#define PM3ScissorMaxXY
#define PM3ScissorMinXY
#define PM3ScissorMode
#define PM3ScissorModeAnd
#define PM3ScissorModeOr
#define PM3ScreenSize
#define PM3Security
#define PM3SetLogicalTexturePage
#define PM3SizeOfFramebuffer
#define PM3SStart
#define PM3StartXDom
#define PM3StartXSub
#define PM3StartY
/* ... */
#define PM3SpanColorMask
/* ... */
#define PM3TextureApplicationMode
#define PM3TextureApplicationModeAnd
#define PM3TextureApplicationModeOr
#define PM3TextureBaseAddr
#define PM3TextureCacheControl
#define PM3TextureChromaLower0
#define PM3TextureChromaLower1
#define PM3TextureChromaUpper0
#define PM3TextureChromaUpper1
#define PM3TextureCompositeAlphaMode0
#define PM3TextureCompositeAlphaMode0And
#define PM3TextureCompositeAlphaMode0Or
#define PM3TextureCompositeAlphaMode1
#define PM3TextureCompositeAlphaMode1And
#define PM3TextureCompositeAlphaMode1Or
#define PM3TextureCompositeColorMode0
#define PM3TextureCompositeColorMode0And
#define PM3TextureCompositeColorMode0Or
#define PM3TextureCompositeColorMode1
#define PM3TextureCompositeColorMode1And
#define PM3TextureCompositeColorMode1Or
#define PM3TextureCompositeFactor0
#define PM3TextureCompositeFactor1
#define PM3TextureCompositeMode
#define PM3TextureCoordMode
#define PM3TextureCoordModeAnd
#define PM3TextureCoordModeOr
#define PM3TextureData
/*
#define PM3TextureDownloadControl				0x0108
*/
#define PM3TextureDownloadOffset
#define PM3TextureEnvColor
#define PM3TextureFilterMode
#define PM3TextureFilterModeAnd
#define PM3TextureFilterModeOr
#define PM3TextureIndexMode0
#define PM3TextureIndexMode0And
#define PM3TextureIndexMode0Or
#define PM3TextureIndexMode1
#define PM3TextureIndexMode1And
#define PM3TextureIndexMode1Or
/* ... */
#define PM3TextureMapSize
#define PM3TextureMapWidth0
#define PM3TextureMapWidth1
	#define PM3TextureMapWidth_Width(w)
	#define PM3TextureMapWidth_BorderLayout
	#define PM3TextureMapWidth_Layout_Linear
	#define PM3TextureMapWidth_Layout_Patch64
	#define PM3TextureMapWidth_Layout_Patch32_2
	#define PM3TextureMapWidth_Layout_Patch2
	#define PM3TextureMapWidth_HostTexture
#define PM3TextureReadMode0
#define PM3TextureReadMode0And
#define PM3TextureReadMode0Or
#define PM3TextureReadMode1
#define PM3TextureReadMode1And
#define PM3TextureReadMode1Or
/* ... */
#define PM3WaitForCompletion
#define PM3Window
	#define PM3Window_ForceLBUpdate
	#define PM3Window_LBUpdateSource
	#define PM3Window_FrameCount(c)
	#define PM3Window_StencilFCP
	#define PM3Window_DepthFCP
	#define PM3Window_OverrideWriteFiltering
#define PM3WindowAnd
#define PM3WindowOr
#define PM3WindowOrigin
#define PM3XBias
#define PM3YBias
#define PM3YLimits
#define PM3UVMode
#define PM3ZFogBias
#define PM3ZStart
#define PM3ZStartL
#define PM3ZStartU


/**********************************************
*  GLINT Permedia3 2D setup Unit	      *
***********************************************/
#define PM3Config2D
	#define PM3Config2D_OpaqueSpan
	#define PM3Config2D_MultiRXBlit
	#define PM3Config2D_UserScissorEnable
	#define PM3Config2D_FBDestReadEnable
	#define PM3Config2D_AlphaBlendEnable
	#define PM3Config2D_DitherEnable
	#define PM3Config2D_ForegroundROPEnable
	#define PM3Config2D_ForegroundROP(rop)
	#define PM3Config2D_BackgroundROPEnable
	#define PM3Config2D_BackgroundROP(rop)
	#define PM3Config2D_UseConstantSource
	#define PM3Config2D_FBWriteEnable
	#define PM3Config2D_Blocking
	#define PM3Config2D_ExternalSourceData
	#define PM3Config2D_LUTModeEnable
#define PM3DownloadGlyphwidth
	#define PM3DownloadGlyphwidth_GlyphWidth(gw)
#define PM3DownloadTarget
	#define PM3DownloadTarget_TagName(tag)
#define PM3GlyphData
#define PM3GlyphPosition
	#define PM3GlyphPosition_XOffset(x)
	#define PM3GlyphPosition_YOffset(y)
#define PM3Packed4Pixels
#define PM3Packed8Pixels
#define PM3Packed16Pixels
#define PM3RectanglePosition
	#define PM3RectanglePosition_XOffset(x)
	#define PM3RectanglePosition_YOffset(y)
#define PM3Render2D
	#define PM3Render2D_Width(w)
	#define PM3Render2D_Operation_Normal
	#define PM3Render2D_Operation_SyncOnHostData
	#define PM3Render2D_Operation_SyncOnBitMask
	#define PM3Render2D_Operation_PatchOrderRendering
	#define PM3Render2D_FBSourceReadEnable
	#define PM3Render2D_SpanOperation
	#define PM3Render2D_Height(h)
	#define PM3Render2D_XPositive
	#define PM3Render2D_YPositive
	#define PM3Render2D_AreaStippleEnable
	#define PM3Render2D_TextureEnable
#define PM3Render2DGlyph
	#define PM3Render2DGlyph_Width(w)
	#define PM3Render2DGlyph_Height(h)
	#define PM3Render2DGlyph_XOffset(x)
	#define PM3Render2DGlyph_YOffset(y)
#define PM3RenderPatchOffset
	#define PM3RenderPatchOffset_XOffset(x)
	#define PM3RenderPatchOffset_YOffset(y)
#define PM3RLCount
	#define PM3RLCount_Count(c)
#define PM3RLData

/**********************************************
*  GLINT Permedia3 Alias Register	     *
***********************************************/
#define PM3FillBackgroundColor
#define PM3FillConfig2D0
#define PM3FillConfig2D1
	#define PM3FillConfig2D_OpaqueSpan
	#define PM3FillConfig2D_MultiRXBlit
	#define PM3FillConfig2D_UserScissorEnable
	#define PM3FillConfig2D_FBDestReadEnable
	#define PM3FillConfig2D_AlphaBlendEnable
	#define PM3FillConfig2D_DitherEnable
	#define PM3FillConfig2D_ForegroundROPEnable
	#define PM3FillConfig2D_ForegroundROP(rop)
	#define PM3FillConfig2D_BackgroundROPEnable
	#define PM3FillConfig2D_BackgroundROP(rop)
	#define PM3FillConfig2D_UseConstantSource
	#define PM3FillConfig2D_FBWriteEnable
	#define PM3FillConfig2D_Blocking
	#define PM3FillConfig2D_ExternalSourceData
	#define PM3FillConfig2D_LUTModeEnable
#define PM3FillFBDestReadBufferAddr
#define PM3FillFBSourceReadBufferAddr
#define PM3FillFBSourceReadBufferOffset
	#define PM3FillFBSourceReadBufferOffset_XOffset(x)
	#define PM3FillFBSourceReadBufferOffset_YOffset(y)
#define PM3FillFBWriteBufferAddr
#define PM3FillForegroundColor0
#define PM3FillForegroundColor1
#define PM3FillGlyphPosition
	#define PM3FillGlyphPosition_XOffset(x)
	#define PM3FillGlyphPosition_YOffset(y)
#define PM3FillRectanglePosition
	#define PM3FillRectanglePosition_XOffset(x)
	#define PM3FillRectanglePosition_YOffset(y)

/* a few more useful registers & regs value... */
#define PM3Sync
	#define PM3Sync_Tag
#define PM3FilterMode
	#define PM3FilterModeSync
#define PM3OutputFifo
#define PM3StatisticMode
#define PM3AreaStippleMode
#define AreaStipplePattern_indexed(i)

#define PM3DepthMode
#define PM3StencilMode
#define PM3StencilData
#define PM3TextureReadMode
#define PM3FogMode
#define PM3ChromaTestMode
#define PM3YUVMode
#define PM3BitMaskPattern

/* ***************************** */
/* ***** pm3fb IOCTL const ***** */
/* ***************************** */
#define PM3FBIO_RESETCHIP

/* ***************************************** */
/* ***** pm3fb useful define and macro ***** */
/* ***************************************** */

/* fifo size in chip */
#define PM3_FIFO_SIZE
#define PM3_REGS_SIZE
#define PM3_MAX_PIXCLOCK

#endif /* PM3FB_H */