198bb403aSmacallan/* 298bb403aSmacallan * Fujitsu AG-10e framebuffer - hardware registers. 398bb403aSmacallan * 498bb403aSmacallan * Copyright (C) 2007 Michael Lorenz 598bb403aSmacallan * 698bb403aSmacallan * Permission is hereby granted, free of charge, to any person obtaining a copy 798bb403aSmacallan * of this software and associated documentation files (the "Software"), to deal 898bb403aSmacallan * in the Software without restriction, including without limitation the rights 998bb403aSmacallan * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1098bb403aSmacallan * copies of the Software, and to permit persons to whom the Software is 1198bb403aSmacallan * furnished to do so, subject to the following conditions: 1298bb403aSmacallan * 1398bb403aSmacallan * The above copyright notice and this permission notice shall be included in 1498bb403aSmacallan * all copies or substantial portions of the Software. 1598bb403aSmacallan * 1698bb403aSmacallan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1798bb403aSmacallan * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1898bb403aSmacallan * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1998bb403aSmacallan * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 2098bb403aSmacallan * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2198bb403aSmacallan * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2298bb403aSmacallan */ 2398bb403aSmacallan/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/suncg6/cg6_regs.h,v 1.1 2000/05/23 04:47:43 dawes Exp $ */ 2498bb403aSmacallan 2598bb403aSmacallan#ifndef AG10E_REGS_H 2698bb403aSmacallan#define AG10E_REGS_H 2798bb403aSmacallan 2898bb403aSmacallan#include "compiler.h" 2998bb403aSmacallan 3098bb403aSmacallan#define pGlint pAG10E 3198bb403aSmacallan#define GLINTPTR(p) ((AG10EPtr)((p)->driverPrivate)) 3298bb403aSmacallan#define IOBase regs 3398bb403aSmacallan#define FbBase fb 3498bb403aSmacallan#define FbMapSize vidmem 3598bb403aSmacallan 3698bb403aSmacallan#undef MMIO_OUT32 3798bb403aSmacallan#define MMIO_OUT32(base, offset, val) \ 3898bb403aSmacallan xf86WriteMmio32Be(base, offset, (CARD32)(val)) 3998bb403aSmacallan 4098bb403aSmacallan#undef MMIO_IN32 4198bb403aSmacallan#define MMIO_IN32(base, offset) \ 4298bb403aSmacallan xf86ReadMmio32Be(base, offset) 4398bb403aSmacallan 4498bb403aSmacallan#include "glint_regs.h" 4598bb403aSmacallan 4698bb403aSmacallan/* AlphaTestMode */ 4798bb403aSmacallan#define AlphaTestModeDisable 0x00000000 4898bb403aSmacallan#define AlphaTestModeEnable 0x00000001 4998bb403aSmacallan#define AT_Never 0x00000000 5098bb403aSmacallan#define AT_Less 0x00000002 5198bb403aSmacallan#define AT_Equal 0x00000004 5298bb403aSmacallan#define AT_LessEqual 0x00000006 5398bb403aSmacallan#define AT_Greater 0x00000008 5498bb403aSmacallan#define AT_NotEqual 0x0000000a 5598bb403aSmacallan#define AT_GreaterEqual 0x0000000c 5698bb403aSmacallan#define AT_Always 0x0000000e 5798bb403aSmacallan#define AT_CompareMask 0x0000000e 5898bb403aSmacallan#define AT_RefValueMask 0x00000ff0 5998bb403aSmacallan 6098bb403aSmacallan/* AlphaBlendMode */ 6198bb403aSmacallan#define AlphaBlendModeDisable 0x00000000 6298bb403aSmacallan#define AlphaBlendModeEnable 0x00000001 6398bb403aSmacallan#define AB_Src_Zero 0x00000000 6498bb403aSmacallan#define AB_Src_One 0x00000002 6598bb403aSmacallan#define AB_Src_DstColor 0x00000004 6698bb403aSmacallan#define AB_Src_OneMinusDstColor 0x00000006 6798bb403aSmacallan#define AB_Src_SrcAlpha 0x00000008 6898bb403aSmacallan#define AB_Src_OneMinusSrcAlpha 0x0000000a 6998bb403aSmacallan#define AB_Src_DstAlpha 0x0000000c 7098bb403aSmacallan#define AB_Src_OneMinusDstAlpha 0x0000000e 7198bb403aSmacallan#define AB_Src_SrcAlphaSaturate 0x00000010 7298bb403aSmacallan#define AB_SrcBlendMask 0x0000001e 7398bb403aSmacallan#define AB_Dst_Zero 0x00000000 7498bb403aSmacallan#define AB_Dst_One 0x00000020 7598bb403aSmacallan#define AB_Dst_SrcColor 0x00000040 7698bb403aSmacallan#define AB_Dst_OneMinusSrcColor 0x00000060 7798bb403aSmacallan#define AB_Dst_SrcAlpha 0x00000080 7898bb403aSmacallan#define AB_Dst_OneMinusSrcAlpha 0x000000a0 7998bb403aSmacallan#define AB_Dst_DstAlpha 0x000000c0 8098bb403aSmacallan#define AB_Dst_OneMinusDstAlpha 0x000000e0 8198bb403aSmacallan#define AB_DstBlendMask 0x000000e0 8298bb403aSmacallan#define AB_ColorFmt_8888 0x00000000 8398bb403aSmacallan#define AB_ColorFmt_5555 0x00000100 8498bb403aSmacallan#define AB_ColorFmt_4444 0x00000200 8598bb403aSmacallan#define AB_ColorFmt_4444Front 0x00000300 8698bb403aSmacallan#define AB_ColorFmt_4444Back 0x00000400 8798bb403aSmacallan#define AB_ColorFmt_332Front 0x00000500 8898bb403aSmacallan#define AB_ColorFmt_332Back 0x00000600 8998bb403aSmacallan#define AB_ColorFmt_121Front 0x00000700 9098bb403aSmacallan#define AB_ColorFmt_121Back 0x00000800 9198bb403aSmacallan#define AB_ColorFmt_555Back 0x00000d00 9298bb403aSmacallan#define AB_ColorFmt_CI8 0x00000e00 9398bb403aSmacallan#define AB_ColorFmt_CI4 0x00000f00 9498bb403aSmacallan#define AB_AlphaBufferPresent 0x00000000 9598bb403aSmacallan#define AB_NoAlphaBufferPresent 0x00001000 9698bb403aSmacallan#define AB_ColorOrder_BGR 0x00000000 9798bb403aSmacallan#define AB_ColorOrder_RGB 0x00002000 9898bb403aSmacallan#define AB_OpenGLType 0x00000000 9998bb403aSmacallan#define AB_QuickDraw3DType 0x00004000 10098bb403aSmacallan#define AB_AlphaDst_FBData 0x00000000 10198bb403aSmacallan#define AB_AlphaDst_FBSourceData 0x00008000 10298bb403aSmacallan#define AB_ColorConversionScale 0x00000000 10398bb403aSmacallan#define AB_ColorConversionShift 0x00010000 10498bb403aSmacallan#define AB_AlphaConversionScale 0x00000000 10598bb403aSmacallan#define AB_AlphaConversionShift 0x00020000 10698bb403aSmacallan 10798bb403aSmacallan/* TextureAddressMode */ 10898bb403aSmacallan#define TextureAddressModeDisable 0x00000000 10998bb403aSmacallan#define TextureAddressModeEnable 0x00000001 11098bb403aSmacallan#define TAM_SWrap_Clamp 0x00000000 11198bb403aSmacallan#define TAM_SWrap_Repeat 0x00000002 11298bb403aSmacallan#define TAM_SWrap_Mirror 0x00000004 11398bb403aSmacallan#define TAM_SWrap_Mask 0x00000006 11498bb403aSmacallan#define TAM_TWrap_Clamp 0x00000000 11598bb403aSmacallan#define TAM_TWrap_Repeat 0x00000008 11698bb403aSmacallan#define TAM_TWrap_Mirror 0x00000010 11798bb403aSmacallan#define TAM_TWrap_Mask 0x00000018 11898bb403aSmacallan#define TAM_Operation_2D 0x00000000 11998bb403aSmacallan#define TAM_Operation_3D 0x00000020 12098bb403aSmacallan#define TAM_InhibitDDAInit 0x00000040 12198bb403aSmacallan#define TAM_LODDisable 0x00000000 12298bb403aSmacallan#define TAM_LODEnable 0x00000080 12398bb403aSmacallan#define TAM_DY_Disable 0x00000000 12498bb403aSmacallan#define TAM_DY_Enable 0x00000100 12598bb403aSmacallan#define TAM_WidthMask 0x00001e00 12698bb403aSmacallan#define TAM_HeightMask 0x0001e000 12798bb403aSmacallan#define TAM_TexMapType_1D 0x00000000 12898bb403aSmacallan#define TAM_TexMapType_2D 0x00020000 12998bb403aSmacallan#define TAM_TexMapType_Mask 0x00020000 13098bb403aSmacallan 13198bb403aSmacallan/* TextureReadMode */ 13298bb403aSmacallan#define TextureReadModeDisable 0x00000000 13398bb403aSmacallan#define TextureReadModeEnable 0x00000001 13498bb403aSmacallan#define TRM_WidthMask 0x0000001e 13598bb403aSmacallan#define TRM_HeightMask 0x000001e0 13698bb403aSmacallan#define TRM_Depth1 0x00000000 13798bb403aSmacallan#define TRM_Depth2 0x00000200 13898bb403aSmacallan#define TRM_Depth4 0x00000400 13998bb403aSmacallan#define TRM_Depth8 0x00000600 14098bb403aSmacallan#define TRM_Depth16 0x00000800 14198bb403aSmacallan#define TRM_Depth32 0x00000a00 14298bb403aSmacallan#define TRM_DepthMask 0x00000e00 14398bb403aSmacallan#define TRM_Border 0x00001000 14498bb403aSmacallan#define TRM_Patch 0x00002000 14598bb403aSmacallan#define TRM_Mag_Nearest 0x00000000 14698bb403aSmacallan#define TRM_Mag_Linear 0x00004000 14798bb403aSmacallan#define TRM_Mag_Mask 0x00004000 14898bb403aSmacallan#define TRM_Min_Nearest 0x00000000 14998bb403aSmacallan#define TRM_Min_Linear 0x00008000 15098bb403aSmacallan#define TRM_Min_NearestMMNearest 0x00010000 15198bb403aSmacallan#define TRM_Min_NearestMMLinear 0x00018000 15298bb403aSmacallan#define TRM_Min_LinearMMNearest 0x00020000 15398bb403aSmacallan#define TRM_Min_LinearMMLinear 0x00028000 15498bb403aSmacallan#define TRM_Min_Mask 0x00038000 15598bb403aSmacallan#define TRM_UWrap_Clamp 0x00000000 15698bb403aSmacallan#define TRM_UWrap_Repeat 0x00040000 15798bb403aSmacallan#define TRM_UWrap_Mirror 0x00080000 15898bb403aSmacallan#define TRM_UWrap_Mask 0x000c0000 15998bb403aSmacallan#define TRM_VWrap_Clamp 0x00000000 16098bb403aSmacallan#define TRM_VWrap_Repeat 0x00100000 16198bb403aSmacallan#define TRM_VWrap_Mirror 0x00200000 16298bb403aSmacallan#define TRM_VWrap_Mask 0x00300000 16398bb403aSmacallan#define TRM_TexMapType_1D 0x00000000 16498bb403aSmacallan#define TRM_TexMapType_2D 0x00400000 16598bb403aSmacallan#define TRM_TexMapType_Mask 0x00400000 16698bb403aSmacallan#define TRM_MipMapDisable 0x00000000 16798bb403aSmacallan#define TRM_MipMapEnable 0x00800000 16898bb403aSmacallan#define TRM_PrimaryCacheDisable 0x00000000 16998bb403aSmacallan#define TRM_PrimaryCacheEnable 0x01000000 17098bb403aSmacallan#define TRM_FBSourceAddr_None 0x00000000 17198bb403aSmacallan#define TRM_FBSourceAddr_Index 0x02000000 17298bb403aSmacallan#define TRM_FBSourceAddr_Coord 0x04000000 17398bb403aSmacallan#define TRM_BorderClamp 0x08000000 17498bb403aSmacallan 17598bb403aSmacallan/* TextureColorMode */ 17698bb403aSmacallan#define TextureColorModeDisable 0x00000000 17798bb403aSmacallan#define TextureColorModeEnable 0x00000001 17898bb403aSmacallan#define TCM_Modulate 0x00000000 17998bb403aSmacallan#define TCM_Decal 0x00000002 18098bb403aSmacallan#define TCM_Blend 0x00000004 18198bb403aSmacallan#define TCM_Replace 0x00000006 18298bb403aSmacallan#define TCM_ApplicationMask 0x0000000e 18398bb403aSmacallan#define TCM_OpenGLType 0x00000000 18498bb403aSmacallan#define TCM_QuickDraw3DType 0x00000010 18598bb403aSmacallan#define TCM_KdDDA_Disable 0x00000000 18698bb403aSmacallan#define TCM_KdDDA_Enable 0x00000020 18798bb403aSmacallan#define TCM_KsDDA_Disable 0x00000000 18898bb403aSmacallan#define TCM_KsDDA_Enable 0x00000040 18998bb403aSmacallan#define TCM_BaseFormat_Alpha 0x00000000 19098bb403aSmacallan#define TCM_BaseFormat_Lum 0x00000080 19198bb403aSmacallan#define TCM_BaseFormat_LumAlpha 0x00000100 19298bb403aSmacallan#define TCM_BaseFormat_Intensity 0x00000180 19398bb403aSmacallan#define TCM_BaseFormat_RGB 0x00000200 19498bb403aSmacallan#define TCM_BaseFormat_RGBA 0x00000280 19598bb403aSmacallan#define TCM_BaseFormatMask 0x00000380 19698bb403aSmacallan#define TCM_LoadMode_None 0x00000000 19798bb403aSmacallan#define TCM_LoadMode_Ks 0x00000400 19898bb403aSmacallan#define TCM_LoadMode_Kd 0x00000800 19998bb403aSmacallan 20098bb403aSmacallan/* TextureCacheControl */ 20198bb403aSmacallan#define TCC_Invalidate 0x00000001 20298bb403aSmacallan#define TCC_Disable 0x00000000 20398bb403aSmacallan#define TCC_Enable 0x00000002 20498bb403aSmacallan 20598bb403aSmacallan/* TextureFilterMode */ 20698bb403aSmacallan#define TextureFilterModeDisable 0x00000000 20798bb403aSmacallan#define TextureFilterModeEnable 0x00000001 20898bb403aSmacallan#define TFM_AlphaMapEnable 0x00000002 20998bb403aSmacallan#define TFM_AlphaMapSense 0x00000004 21098bb403aSmacallan 21198bb403aSmacallan/* TextureFormat */ 21298bb403aSmacallan#define TF_LittleEndian 0x00000000 21398bb403aSmacallan#define TF_BigEndian 0x00000001 21498bb403aSmacallan#define TF_16Bit_565 0x00000000 21598bb403aSmacallan#define TF_16Bit_555 0x00000002 21698bb403aSmacallan#define TF_ColorOrder_BGR 0x00000000 21798bb403aSmacallan#define TF_ColorOrder_RGB 0x00000004 21898bb403aSmacallan#define TF_Compnents_1 0x00000000 21998bb403aSmacallan#define TF_Compnents_2 0x00000008 22098bb403aSmacallan#define TF_Compnents_3 0x00000010 22198bb403aSmacallan#define TF_Compnents_4 0x00000018 22298bb403aSmacallan#define TF_CompnentsMask 0x00000018 22398bb403aSmacallan#define TF_OutputFmt_Texel 0x00000000 22498bb403aSmacallan#define TF_OutputFmt_Color 0x00000020 22598bb403aSmacallan#define TF_OutputFmt_BitMask 0x00000040 22698bb403aSmacallan#define TF_OutputFmtMask 0x00000060 22798bb403aSmacallan#define TF_MirrorEnable 0x00000080 22898bb403aSmacallan#define TF_InvertEnable 0x00000100 22998bb403aSmacallan#define TF_ByteSwapEnable 0x00000200 23098bb403aSmacallan#define TF_LUTOffsetMask 0x0003fc00 23198bb403aSmacallan#define TF_OneCompFmt_Lum 0x00000000 23298bb403aSmacallan#define TF_OneCompFmt_Alpha 0x00040000 23398bb403aSmacallan#define TF_OneCompFmt_Intensity 0x00080000 23498bb403aSmacallan#define TF_OneCompFmt_Mask 0x000c0000 23598bb403aSmacallan 23698bb403aSmacallan#endif /* AG10E_REGS_H */ 237