ag10e_regs.h revision 98bb403a
1/* 2 * Fujitsu AG-10e framebuffer - hardware registers. 3 * 4 * Copyright (C) 2007 Michael Lorenz 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 * copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 */ 23/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/suncg6/cg6_regs.h,v 1.1 2000/05/23 04:47:43 dawes Exp $ */ 24 25#ifndef AG10E_REGS_H 26#define AG10E_REGS_H 27 28#include "compiler.h" 29 30#define pGlint pAG10E 31#define GLINTPTR(p) ((AG10EPtr)((p)->driverPrivate)) 32#define IOBase regs 33#define FbBase fb 34#define FbMapSize vidmem 35 36#undef MMIO_OUT32 37#define MMIO_OUT32(base, offset, val) \ 38 xf86WriteMmio32Be(base, offset, (CARD32)(val)) 39 40#undef MMIO_IN32 41#define MMIO_IN32(base, offset) \ 42 xf86ReadMmio32Be(base, offset) 43 44#include "glint_regs.h" 45 46/* AlphaTestMode */ 47#define AlphaTestModeDisable 0x00000000 48#define AlphaTestModeEnable 0x00000001 49#define AT_Never 0x00000000 50#define AT_Less 0x00000002 51#define AT_Equal 0x00000004 52#define AT_LessEqual 0x00000006 53#define AT_Greater 0x00000008 54#define AT_NotEqual 0x0000000a 55#define AT_GreaterEqual 0x0000000c 56#define AT_Always 0x0000000e 57#define AT_CompareMask 0x0000000e 58#define AT_RefValueMask 0x00000ff0 59 60/* AlphaBlendMode */ 61#define AlphaBlendModeDisable 0x00000000 62#define AlphaBlendModeEnable 0x00000001 63#define AB_Src_Zero 0x00000000 64#define AB_Src_One 0x00000002 65#define AB_Src_DstColor 0x00000004 66#define AB_Src_OneMinusDstColor 0x00000006 67#define AB_Src_SrcAlpha 0x00000008 68#define AB_Src_OneMinusSrcAlpha 0x0000000a 69#define AB_Src_DstAlpha 0x0000000c 70#define AB_Src_OneMinusDstAlpha 0x0000000e 71#define AB_Src_SrcAlphaSaturate 0x00000010 72#define AB_SrcBlendMask 0x0000001e 73#define AB_Dst_Zero 0x00000000 74#define AB_Dst_One 0x00000020 75#define AB_Dst_SrcColor 0x00000040 76#define AB_Dst_OneMinusSrcColor 0x00000060 77#define AB_Dst_SrcAlpha 0x00000080 78#define AB_Dst_OneMinusSrcAlpha 0x000000a0 79#define AB_Dst_DstAlpha 0x000000c0 80#define AB_Dst_OneMinusDstAlpha 0x000000e0 81#define AB_DstBlendMask 0x000000e0 82#define AB_ColorFmt_8888 0x00000000 83#define AB_ColorFmt_5555 0x00000100 84#define AB_ColorFmt_4444 0x00000200 85#define AB_ColorFmt_4444Front 0x00000300 86#define AB_ColorFmt_4444Back 0x00000400 87#define AB_ColorFmt_332Front 0x00000500 88#define AB_ColorFmt_332Back 0x00000600 89#define AB_ColorFmt_121Front 0x00000700 90#define AB_ColorFmt_121Back 0x00000800 91#define AB_ColorFmt_555Back 0x00000d00 92#define AB_ColorFmt_CI8 0x00000e00 93#define AB_ColorFmt_CI4 0x00000f00 94#define AB_AlphaBufferPresent 0x00000000 95#define AB_NoAlphaBufferPresent 0x00001000 96#define AB_ColorOrder_BGR 0x00000000 97#define AB_ColorOrder_RGB 0x00002000 98#define AB_OpenGLType 0x00000000 99#define AB_QuickDraw3DType 0x00004000 100#define AB_AlphaDst_FBData 0x00000000 101#define AB_AlphaDst_FBSourceData 0x00008000 102#define AB_ColorConversionScale 0x00000000 103#define AB_ColorConversionShift 0x00010000 104#define AB_AlphaConversionScale 0x00000000 105#define AB_AlphaConversionShift 0x00020000 106 107/* TextureAddressMode */ 108#define TextureAddressModeDisable 0x00000000 109#define TextureAddressModeEnable 0x00000001 110#define TAM_SWrap_Clamp 0x00000000 111#define TAM_SWrap_Repeat 0x00000002 112#define TAM_SWrap_Mirror 0x00000004 113#define TAM_SWrap_Mask 0x00000006 114#define TAM_TWrap_Clamp 0x00000000 115#define TAM_TWrap_Repeat 0x00000008 116#define TAM_TWrap_Mirror 0x00000010 117#define TAM_TWrap_Mask 0x00000018 118#define TAM_Operation_2D 0x00000000 119#define TAM_Operation_3D 0x00000020 120#define TAM_InhibitDDAInit 0x00000040 121#define TAM_LODDisable 0x00000000 122#define TAM_LODEnable 0x00000080 123#define TAM_DY_Disable 0x00000000 124#define TAM_DY_Enable 0x00000100 125#define TAM_WidthMask 0x00001e00 126#define TAM_HeightMask 0x0001e000 127#define TAM_TexMapType_1D 0x00000000 128#define TAM_TexMapType_2D 0x00020000 129#define TAM_TexMapType_Mask 0x00020000 130 131/* TextureReadMode */ 132#define TextureReadModeDisable 0x00000000 133#define TextureReadModeEnable 0x00000001 134#define TRM_WidthMask 0x0000001e 135#define TRM_HeightMask 0x000001e0 136#define TRM_Depth1 0x00000000 137#define TRM_Depth2 0x00000200 138#define TRM_Depth4 0x00000400 139#define TRM_Depth8 0x00000600 140#define TRM_Depth16 0x00000800 141#define TRM_Depth32 0x00000a00 142#define TRM_DepthMask 0x00000e00 143#define TRM_Border 0x00001000 144#define TRM_Patch 0x00002000 145#define TRM_Mag_Nearest 0x00000000 146#define TRM_Mag_Linear 0x00004000 147#define TRM_Mag_Mask 0x00004000 148#define TRM_Min_Nearest 0x00000000 149#define TRM_Min_Linear 0x00008000 150#define TRM_Min_NearestMMNearest 0x00010000 151#define TRM_Min_NearestMMLinear 0x00018000 152#define TRM_Min_LinearMMNearest 0x00020000 153#define TRM_Min_LinearMMLinear 0x00028000 154#define TRM_Min_Mask 0x00038000 155#define TRM_UWrap_Clamp 0x00000000 156#define TRM_UWrap_Repeat 0x00040000 157#define TRM_UWrap_Mirror 0x00080000 158#define TRM_UWrap_Mask 0x000c0000 159#define TRM_VWrap_Clamp 0x00000000 160#define TRM_VWrap_Repeat 0x00100000 161#define TRM_VWrap_Mirror 0x00200000 162#define TRM_VWrap_Mask 0x00300000 163#define TRM_TexMapType_1D 0x00000000 164#define TRM_TexMapType_2D 0x00400000 165#define TRM_TexMapType_Mask 0x00400000 166#define TRM_MipMapDisable 0x00000000 167#define TRM_MipMapEnable 0x00800000 168#define TRM_PrimaryCacheDisable 0x00000000 169#define TRM_PrimaryCacheEnable 0x01000000 170#define TRM_FBSourceAddr_None 0x00000000 171#define TRM_FBSourceAddr_Index 0x02000000 172#define TRM_FBSourceAddr_Coord 0x04000000 173#define TRM_BorderClamp 0x08000000 174 175/* TextureColorMode */ 176#define TextureColorModeDisable 0x00000000 177#define TextureColorModeEnable 0x00000001 178#define TCM_Modulate 0x00000000 179#define TCM_Decal 0x00000002 180#define TCM_Blend 0x00000004 181#define TCM_Replace 0x00000006 182#define TCM_ApplicationMask 0x0000000e 183#define TCM_OpenGLType 0x00000000 184#define TCM_QuickDraw3DType 0x00000010 185#define TCM_KdDDA_Disable 0x00000000 186#define TCM_KdDDA_Enable 0x00000020 187#define TCM_KsDDA_Disable 0x00000000 188#define TCM_KsDDA_Enable 0x00000040 189#define TCM_BaseFormat_Alpha 0x00000000 190#define TCM_BaseFormat_Lum 0x00000080 191#define TCM_BaseFormat_LumAlpha 0x00000100 192#define TCM_BaseFormat_Intensity 0x00000180 193#define TCM_BaseFormat_RGB 0x00000200 194#define TCM_BaseFormat_RGBA 0x00000280 195#define TCM_BaseFormatMask 0x00000380 196#define TCM_LoadMode_None 0x00000000 197#define TCM_LoadMode_Ks 0x00000400 198#define TCM_LoadMode_Kd 0x00000800 199 200/* TextureCacheControl */ 201#define TCC_Invalidate 0x00000001 202#define TCC_Disable 0x00000000 203#define TCC_Enable 0x00000002 204 205/* TextureFilterMode */ 206#define TextureFilterModeDisable 0x00000000 207#define TextureFilterModeEnable 0x00000001 208#define TFM_AlphaMapEnable 0x00000002 209#define TFM_AlphaMapSense 0x00000004 210 211/* TextureFormat */ 212#define TF_LittleEndian 0x00000000 213#define TF_BigEndian 0x00000001 214#define TF_16Bit_565 0x00000000 215#define TF_16Bit_555 0x00000002 216#define TF_ColorOrder_BGR 0x00000000 217#define TF_ColorOrder_RGB 0x00000004 218#define TF_Compnents_1 0x00000000 219#define TF_Compnents_2 0x00000008 220#define TF_Compnents_3 0x00000010 221#define TF_Compnents_4 0x00000018 222#define TF_CompnentsMask 0x00000018 223#define TF_OutputFmt_Texel 0x00000000 224#define TF_OutputFmt_Color 0x00000020 225#define TF_OutputFmt_BitMask 0x00000040 226#define TF_OutputFmtMask 0x00000060 227#define TF_MirrorEnable 0x00000080 228#define TF_InvertEnable 0x00000100 229#define TF_ByteSwapEnable 0x00000200 230#define TF_LUTOffsetMask 0x0003fc00 231#define TF_OneCompFmt_Lum 0x00000000 232#define TF_OneCompFmt_Alpha 0x00040000 233#define TF_OneCompFmt_Intensity 0x00080000 234#define TF_OneCompFmt_Mask 0x000c0000 235 236#endif /* AG10E_REGS_H */ 237