11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * linux/drivers/video/pm3fb.h -- 3DLabs Permedia3 frame buffer device 31da177e4SLinus Torvalds * 41da177e4SLinus Torvalds * Copyright (C) 2001 Romain Dolbeau <dolbeau@irisa.fr> 51da177e4SLinus Torvalds * Copyright (C) 2001 Sven Luther, <luther@dpt-info.u-strasbg.fr> 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * This file is subject to the terms and conditions of the GNU General Public 81da177e4SLinus Torvalds * License. See the file COPYING in the main directory of this archive for 91da177e4SLinus Torvalds * more details. 101da177e4SLinus Torvalds * 111da177e4SLinus Torvalds * $Header: /cvsroot/linux/drivers/video/pm3fb.h,v 1.1 2002/02/25 19:11:06 marcelo Exp $ 121da177e4SLinus Torvalds * 131da177e4SLinus Torvalds */ 141da177e4SLinus Torvalds 151da177e4SLinus Torvalds #ifndef PM3FB_H 161da177e4SLinus Torvalds #define PM3FB_H 171da177e4SLinus Torvalds 181da177e4SLinus Torvalds /********************************************** 191da177e4SLinus Torvalds * GLINT Permedia3 Control Status registers * 201da177e4SLinus Torvalds ***********************************************/ 211da177e4SLinus Torvalds /* Control Status Registers */ 221da177e4SLinus Torvalds #define PM3ResetStatus 0x0000 231da177e4SLinus Torvalds #define PM3IntEnable 0x0008 241da177e4SLinus Torvalds #define PM3IntFlags 0x0010 251da177e4SLinus Torvalds #define PM3InFIFOSpace 0x0018 261da177e4SLinus Torvalds #define PM3OutFIFOWords 0x0020 271da177e4SLinus Torvalds #define PM3DMAAddress 0x0028 281da177e4SLinus Torvalds #define PM3DMACount 0x0030 291da177e4SLinus Torvalds #define PM3ErrorFlags 0x0038 301da177e4SLinus Torvalds #define PM3VClkCtl 0x0040 311da177e4SLinus Torvalds #define PM3TestRegister 0x0048 321da177e4SLinus Torvalds #define PM3Aperture0 0x0050 331da177e4SLinus Torvalds #define PM3Aperture1 0x0058 341da177e4SLinus Torvalds #define PM3DMAControl 0x0060 351da177e4SLinus Torvalds #define PM3FIFODis 0x0068 361da177e4SLinus Torvalds #define PM3ChipConfig 0x0070 371da177e4SLinus Torvalds #define PM3AGPControl 0x0078 381da177e4SLinus Torvalds 391da177e4SLinus Torvalds #define PM3GPOutDMAAddress 0x0080 401da177e4SLinus Torvalds #define PM3PCIFeedbackCount 0x0088 411da177e4SLinus Torvalds #define PM3PCIAbortStatus 0x0090 421da177e4SLinus Torvalds #define PM3PCIAbortAddress 0x0098 431da177e4SLinus Torvalds 441da177e4SLinus Torvalds #define PM3PCIPLLStatus 0x00f0 451da177e4SLinus Torvalds 461da177e4SLinus Torvalds #define PM3HostTextureAddress 0x0100 471da177e4SLinus Torvalds #define PM3TextureDownloadControl 0x0108 481da177e4SLinus Torvalds #define PM3TextureOperation 0x0110 491da177e4SLinus Torvalds #define PM3LogicalTexturePage 0x0118 501da177e4SLinus Torvalds #define PM3TexDMAAddress 0x0120 511da177e4SLinus Torvalds #define PM3TexFIFOSpace 0x0128 521da177e4SLinus Torvalds 531da177e4SLinus Torvalds /********************************************** 541da177e4SLinus Torvalds * GLINT Permedia3 Region 0 Bypass Controls * 551da177e4SLinus Torvalds ***********************************************/ 561da177e4SLinus Torvalds #define PM3ByAperture1Mode 0x0300 571da177e4SLinus Torvalds #define PM3ByApertureMode_BYTESWAP_ABCD (0<<0) 581da177e4SLinus Torvalds #define PM3ByApertureMode_BYTESWAP_BADC (1<<0) 591da177e4SLinus Torvalds #define PM3ByApertureMode_BYTESWAP_CDAB (2<<0) 601da177e4SLinus Torvalds #define PM3ByApertureMode_BYTESWAP_DCBA (3<<0) 611da177e4SLinus Torvalds #define PM3ByApertureMode_PATCH_DISABLE (0<<2) 621da177e4SLinus Torvalds #define PM3ByApertureMode_PATCH_ENABLE (1<<2) 631da177e4SLinus Torvalds #define PM3ByApertureMode_FORMAT_RAW (0<<3) 641da177e4SLinus Torvalds #define PM3ByApertureMode_FORMAT_YUYV (1<<3) 651da177e4SLinus Torvalds #define PM3ByApertureMode_FORMAT_UYVY (2<<3) 661da177e4SLinus Torvalds #define PM3ByApertureMode_PIXELSIZE_8BIT (0<<5) 671da177e4SLinus Torvalds #define PM3ByApertureMode_PIXELSIZE_16BIT (1<<5) 681da177e4SLinus Torvalds #define PM3ByApertureMode_PIXELSIZE_32BIT (2<<5) 691da177e4SLinus Torvalds #define PM3ByApertureMode_PIXELSIZE_MASK (3<<5) 701da177e4SLinus Torvalds #define PM3ByApertureMode_EFFECTIVE_STRIDE_1024 (0<<7) 711da177e4SLinus Torvalds #define PM3ByApertureMode_EFFECTIVE_STRIDE_2048 (1<<7) 721da177e4SLinus Torvalds #define PM3ByApertureMode_EFFECTIVE_STRIDE_4096 (2<<7) 731da177e4SLinus Torvalds #define PM3ByApertureMode_EFFECTIVE_STRIDE_8192 (3<<7) 741da177e4SLinus Torvalds #define PM3ByApertureMode_PATCH_OFFSET_X(off) (((off)&7f)<<9) 751da177e4SLinus Torvalds #define PM3ByApertureMode_PATCH_OFFSET_Y(off) (((off)&7f)<<16) 761da177e4SLinus Torvalds #define PM3ByApertureMode_FRAMEBUFFER (0<<21) 771da177e4SLinus Torvalds #define PM3ByApertureMode_LOCALBUFFER (1<<21) 781da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_OFF (0<<22) 791da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_1MB (1<<22) 801da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_2MB (2<<22) 811da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_4MB (3<<22) 821da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_8MB (4<<22) 831da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_16MB (5<<22) 841da177e4SLinus Torvalds #define PM3ByApertureMode_DOUBLE_WRITE_32MB (6<<22) 851da177e4SLinus Torvalds 861da177e4SLinus Torvalds #define PM3ByAperture2Mode 0x0328 871da177e4SLinus Torvalds 881da177e4SLinus Torvalds /********************************************** 891da177e4SLinus Torvalds * GLINT Permedia3 Memory Control (0x1000) * 901da177e4SLinus Torvalds ***********************************************/ 911da177e4SLinus Torvalds #define PM3MemCounter 0x1000 921da177e4SLinus Torvalds #define PM3MemBypassWriteMask 0x1008 931da177e4SLinus Torvalds #define PM3MemScratch 0x1010 941da177e4SLinus Torvalds #define PM3LocalMemCaps 0x1018 951da177e4SLinus Torvalds #define PM3LocalMemCaps_NoWriteMask (1 << 28) 961da177e4SLinus Torvalds #define PM3LocalMemTimings 0x1020 971da177e4SLinus Torvalds #define PM3LocalMemControl 0x1028 981da177e4SLinus Torvalds #define PM3LocalMemRefresh 0x1030 991da177e4SLinus Torvalds #define PM3LocalMemPowerDown 0x1038 1001da177e4SLinus Torvalds #define PM3RemoteMemControl 0x1100 1011da177e4SLinus Torvalds 1021da177e4SLinus Torvalds /********************************************** 1031da177e4SLinus Torvalds * GLINT Permedia3 Video Control (0x3000) * 1041da177e4SLinus Torvalds ***********************************************/ 1051da177e4SLinus Torvalds 1061da177e4SLinus Torvalds #define PM3ScreenBase 0x3000 1071da177e4SLinus Torvalds #define PM3ScreenStride 0x3008 1081da177e4SLinus Torvalds #define PM3HTotal 0x3010 1091da177e4SLinus Torvalds #define PM3HgEnd 0x3018 1101da177e4SLinus Torvalds #define PM3HbEnd 0x3020 1111da177e4SLinus Torvalds #define PM3HsStart 0x3028 1121da177e4SLinus Torvalds #define PM3HsEnd 0x3030 1131da177e4SLinus Torvalds #define PM3VTotal 0x3038 1141da177e4SLinus Torvalds #define PM3VbEnd 0x3040 1151da177e4SLinus Torvalds #define PM3VsStart 0x3048 1161da177e4SLinus Torvalds #define PM3VsEnd 0x3050 1171da177e4SLinus Torvalds #define PM3VideoControl 0x3058 1181da177e4SLinus Torvalds #define PM3VideoControl_DISABLE (0<<0) 1191da177e4SLinus Torvalds #define PM3VideoControl_ENABLE (1<<0) 1201da177e4SLinus Torvalds #define PM3VideoControl_BLANK_ACTIVE_HIGH (0<<1) 1211da177e4SLinus Torvalds #define PM3VideoControl_BLANK_ACTIVE_LOW (1<<1) 1221da177e4SLinus Torvalds #define PM3VideoControl_LINE_DOUBLE_OFF (0<<2) 1231da177e4SLinus Torvalds #define PM3VideoControl_LINE_DOUBLE_ON (1<<2) 1241da177e4SLinus Torvalds #define PM3VideoControl_HSYNC_FORCE_HIGH (0<<3) 1251da177e4SLinus Torvalds #define PM3VideoControl_HSYNC_ACTIVE_HIGH (1<<3) 1261da177e4SLinus Torvalds #define PM3VideoControl_HSYNC_FORCE_LOW (2<<3) 1271da177e4SLinus Torvalds #define PM3VideoControl_HSYNC_ACTIVE_LOW (3<<3) 1281da177e4SLinus Torvalds #define PM3VideoControl_HSYNC_MASK (3<<3) 1291da177e4SLinus Torvalds #define PM3VideoControl_VSYNC_FORCE_HIGH (0<<5) 1301da177e4SLinus Torvalds #define PM3VideoControl_VSYNC_ACTIVE_HIGH (1<<5) 1311da177e4SLinus Torvalds #define PM3VideoControl_VSYNC_FORCE_LOW (2<<5) 1321da177e4SLinus Torvalds #define PM3VideoControl_VSYNC_ACTIVE_LOW (3<<5) 1331da177e4SLinus Torvalds #define PM3VideoControl_VSYNC_MASK (3<<5) 1341da177e4SLinus Torvalds #define PM3VideoControl_BYTE_DOUBLE_OFF (0<<7) 1351da177e4SLinus Torvalds #define PM3VideoControl_BYTE_DOUBLE_ON (1<<7) 1361da177e4SLinus Torvalds #define PM3VideoControl_BUFFER_SWAP_SYNCON_FRAMEBLANK (0<<9) 1371da177e4SLinus Torvalds #define PM3VideoControl_BUFFER_SWAP_FREE_RUNNING (1<<9) 1381da177e4SLinus Torvalds #define PM3VideoControl_BUFFER_SWAP_LIMITETO_FRAMERATE (2<<9) 1391da177e4SLinus Torvalds #define PM3VideoControl_STEREO_DISABLE (0<<11) 1401da177e4SLinus Torvalds #define PM3VideoControl_STEREO_ENABLE (1<<11) 1411da177e4SLinus Torvalds #define PM3VideoControl_RIGHT_EYE_ACTIVE_HIGH (0<<12) 1421da177e4SLinus Torvalds #define PM3VideoControl_RIGHT_EYE_ACTIVE_LOW (1<<12) 1431da177e4SLinus Torvalds #define PM3VideoControl_VIDEO_EXT_LOW (0<<14) 1441da177e4SLinus Torvalds #define PM3VideoControl_VIDEO_EXT_HIGH (1<<14) 1451da177e4SLinus Torvalds #define PM3VideoControl_SYNC_MODE_INDEPENDENT (0<<16) 1461da177e4SLinus Torvalds #define PM3VideoControl_SYNC_MODE_SYNCTO_VSA (1<<16) 1471da177e4SLinus Torvalds #define PM3VideoControl_SYNC_MODE_SYNCTO_VSB (2<<16) 1481da177e4SLinus Torvalds #define PM3VideoControl_PATCH_DISABLE (0<<18) 1491da177e4SLinus Torvalds #define PM3VideoControl_PATCH_ENABLE (1<<18) 1501da177e4SLinus Torvalds #define PM3VideoControl_PIXELSIZE_8BIT (0<<19) 1511da177e4SLinus Torvalds #define PM3VideoControl_PIXELSIZE_16BIT (1<<19) 1521da177e4SLinus Torvalds #define PM3VideoControl_PIXELSIZE_32BIT (2<<19) 1531da177e4SLinus Torvalds #define PM3VideoControl_DISPLAY_DISABLE (0<<21) 1541da177e4SLinus Torvalds #define PM3VideoControl_DISPLAY_ENABLE (1<<21) 1551da177e4SLinus Torvalds #define PM3VideoControl_PATCH_OFFSET_X(off) (((off)&0x3f)<<22) 1561da177e4SLinus Torvalds #define PM3VideoControl_PATCH_OFFSET_Y(off) (((off)&0x3f)<<28) 1571da177e4SLinus Torvalds #define PM3InterruptLine 0x3060 1581da177e4SLinus Torvalds #define PM3DisplayData 0x3068 1591da177e4SLinus Torvalds #define PM3VerticalLineCount 0x3070 1601da177e4SLinus Torvalds #define PM3FifoControl 0x3078 1611da177e4SLinus Torvalds #define PM3ScreenBaseRight 0x3080 1621da177e4SLinus Torvalds #define PM3MiscControl 0x3088 1631da177e4SLinus Torvalds 1641da177e4SLinus Torvalds #define PM3VideoOverlayUpdate 0x3100 1651da177e4SLinus Torvalds #define PM3VideoOverlayUpdate_DISABLE (0<<0) 1661da177e4SLinus Torvalds #define PM3VideoOverlayUpdate_ENABLE (1<<0) 1671da177e4SLinus Torvalds #define PM3VideoOverlayMode 0x3108 1681da177e4SLinus Torvalds #define PM3VideoOverlayMode_DISABLE (0<<0) 1691da177e4SLinus Torvalds #define PM3VideoOverlayMode_ENABLE (1<<0) 1701da177e4SLinus Torvalds #define PM3VideoOverlayMode_BUFFERSYNC_MANUAL (0<<1) 1711da177e4SLinus Torvalds #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMA (1<<1) 1721da177e4SLinus Torvalds #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMB (2<<1) 1731da177e4SLinus Torvalds #define PM3VideoOverlayMode_FIELDPOLARITY_NORMAL (0<<4) 1741da177e4SLinus Torvalds #define PM3VideoOverlayMode_FIELDPOLARITY_INVERT (1<<4) 1751da177e4SLinus Torvalds #define PM3VideoOverlayMode_PIXELSIZE_8BIT (0<<5) 1761da177e4SLinus Torvalds #define PM3VideoOverlayMode_PIXELSIZE_16BIT (1<<5) 1771da177e4SLinus Torvalds #define PM3VideoOverlayMode_PIXELSIZE_32BIT (2<<5) 1781da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_RGB8888 ((0<<7)|(1<<12)|(2<<5)) 1791da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_RGB4444 ((1<<7)|(1<<12)|(1<<5)) 1801da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_RGB5551 ((2<<7)|(1<<12)|(1<<5)) 1811da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_RGB565 ((3<<7)|(1<<12)|(1<<5)) 1821da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_RGB332 ((4<<7)|(1<<12)|(0<<5)) 1831da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_BGR8888 ((0<<7)|(2<<5)) 1841da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_BGR4444 ((1<<7)|(1<<5)) 1851da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_BGR5551 ((2<<7)|(1<<5)) 1861da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_BGR565 ((3<<7)|(1<<5)) 1871da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_BGR332 ((4<<7)|(0<<5)) 1881da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_CI8 ((5<<7)|(1<<12)|(0<<5)) 1891da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_VUY444 ((2<<10)|(1<<12)|(2<<5)) 1901da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_YUV444 ((2<<10)|(2<<5)) 1911da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_VUY422 ((1<<10)|(1<<12)|(1<<5)) 1921da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORFORMAT_YUV422 ((1<<10)|(1<<5)) 1931da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORORDER_BGR (0<<12) 1941da177e4SLinus Torvalds #define PM3VideoOverlayMode_COLORORDER_RGB (1<<12) 1951da177e4SLinus Torvalds #define PM3VideoOverlayMode_LINEARCOLOREXT_OFF (0<<13) 1961da177e4SLinus Torvalds #define PM3VideoOverlayMode_LINEARCOLOREXT_ON (1<<13) 1971da177e4SLinus Torvalds #define PM3VideoOverlayMode_FILTER_MASK (3<<14) 1981da177e4SLinus Torvalds #define PM3VideoOverlayMode_FILTER_OFF (0<<14) 1991da177e4SLinus Torvalds #define PM3VideoOverlayMode_FILTER_FULL (1<<14) 2001da177e4SLinus Torvalds #define PM3VideoOverlayMode_FILTER_PARTIAL (2<<14) 2011da177e4SLinus Torvalds #define PM3VideoOverlayMode_DEINTERLACE_OFF (0<<16) 2021da177e4SLinus Torvalds #define PM3VideoOverlayMode_DEINTERLACE_BOB (1<<16) 2031da177e4SLinus Torvalds #define PM3VideoOverlayMode_PATCHMODE_OFF (0<<18) 2041da177e4SLinus Torvalds #define PM3VideoOverlayMode_PATCHMODE_ON (1<<18) 2051da177e4SLinus Torvalds #define PM3VideoOverlayMode_FLIP_VIDEO (0<<20) 2061da177e4SLinus Torvalds #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMA (1<<20) 2071da177e4SLinus Torvalds #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMB (2<<20) 2081da177e4SLinus Torvalds #define PM3VideoOverlayMode_MIRROR_MASK (3<<23) 2091da177e4SLinus Torvalds #define PM3VideoOverlayMode_MIRRORX_OFF (0<<23) 2101da177e4SLinus Torvalds #define PM3VideoOverlayMode_MIRRORX_ON (1<<23) 2111da177e4SLinus Torvalds #define PM3VideoOverlayMode_MIRRORY_OFF (0<<24) 2121da177e4SLinus Torvalds #define PM3VideoOverlayMode_MIRRORY_ON (1<<24) 2131da177e4SLinus Torvalds #define PM3VideoOverlayFifoControl 0x3110 2141da177e4SLinus Torvalds #define PM3VideoOverlayIndex 0x3118 2151da177e4SLinus Torvalds #define PM3VideoOverlayBase0 0x3120 2161da177e4SLinus Torvalds #define PM3VideoOverlayBase1 0x3128 2171da177e4SLinus Torvalds #define PM3VideoOverlayBase2 0x3130 2181da177e4SLinus Torvalds #define PM3VideoOverlayStride 0x3138 2191da177e4SLinus Torvalds #define PM3VideoOverlayStride_STRIDE(s) (((s)&0xfff)<<0) 2201da177e4SLinus Torvalds #define PM3VideoOverlayWidth 0x3140 2211da177e4SLinus Torvalds #define PM3VideoOverlayWidth_WIDTH(w) (((w)&0xfff)<<0) 2221da177e4SLinus Torvalds #define PM3VideoOverlayHeight 0x3148 2231da177e4SLinus Torvalds #define PM3VideoOverlayHeight_HEIGHT(h) (((h)&0xfff)<<0) 2241da177e4SLinus Torvalds #define PM3VideoOverlayOrigin 0x3150 2251da177e4SLinus Torvalds #define PM3VideoOverlayOrigin_XORIGIN(x) (((x)&0xfff)<<0) 2261da177e4SLinus Torvalds #define PM3VideoOverlayOrigin_YORIGIN(y) (((y)&0xfff)<<16) 2271da177e4SLinus Torvalds #define PM3VideoOverlayShrinkXDelta 0x3158 2281da177e4SLinus Torvalds #define PM3VideoOverlayShrinkXDelta_NONE (1<<16) 2291da177e4SLinus Torvalds #define PM3VideoOverlayShrinkXDelta_DELTA(s,d) \ 2301da177e4SLinus Torvalds ((((s)<<16)/(d))&0x0ffffff0) 2311da177e4SLinus Torvalds #define PM3VideoOverlayZoomXDelta 0x3160 2321da177e4SLinus Torvalds #define PM3VideoOverlayZoomXDelta_NONE (1<<16) 2331da177e4SLinus Torvalds #define PM3VideoOverlayZoomXDelta_DELTA(s,d) \ 2341da177e4SLinus Torvalds ((((s)<<16)/(d))&0x0001fff0) 2351da177e4SLinus Torvalds #define PM3VideoOverlayYDelta 0x3168 2361da177e4SLinus Torvalds #define PM3VideoOverlayYDelta_NONE (1<<16) 2371da177e4SLinus Torvalds #define PM3VideoOverlayYDelta_DELTA(s,d) \ 2381da177e4SLinus Torvalds ((((s)<<16)/(d))&0x0ffffff0) 2391da177e4SLinus Torvalds #define PM3VideoOverlayFieldOffset 0x3170 2401da177e4SLinus Torvalds #define PM3VideoOverlayStatus 0x3178 2411da177e4SLinus Torvalds 2421da177e4SLinus Torvalds /********************************************** 2431da177e4SLinus Torvalds * GLINT Permedia3 RAMDAC Registers (0x4000) * 2441da177e4SLinus Torvalds ***********************************************/ 2451da177e4SLinus Torvalds /* Direct Registers */ 2461da177e4SLinus Torvalds #define PM3RD_PaletteWriteAddress 0x4000 2471da177e4SLinus Torvalds #define PM3RD_PaletteData 0x4008 2481da177e4SLinus Torvalds #define PM3RD_PixelMask 0x4010 2491da177e4SLinus Torvalds #define PM3RD_PaletteReadAddress 0x4018 2501da177e4SLinus Torvalds 2511da177e4SLinus Torvalds #define PM3RD_IndexLow 0x4020 2521da177e4SLinus Torvalds #define PM3RD_IndexHigh 0x4028 2531da177e4SLinus Torvalds #define PM3RD_IndexedData 0x4030 2541da177e4SLinus Torvalds #define PM3RD_IndexControl 0x4038 2551da177e4SLinus Torvalds #define PM3RD_IndexControl_AUTOINCREMENT_ENABLE (1<<0) 2561da177e4SLinus Torvalds #define PM3RD_IndexControl_AUTOINCREMENT_DISABLE (0<<0) 2571da177e4SLinus Torvalds 2581da177e4SLinus Torvalds /* Indirect Registers */ 2591da177e4SLinus Torvalds #define PM3RD_MiscControl 0x000 2601da177e4SLinus Torvalds #define PM3RD_MiscControl_HIGHCOLOR_RES_DISABLE (0<<0) 2611da177e4SLinus Torvalds #define PM3RD_MiscControl_HIGHCOLOR_RES_ENABLE (1<<0) 2621da177e4SLinus Torvalds #define PM3RD_MiscControl_PIXELDOUBLE_DISABLE (0<<1) 2631da177e4SLinus Torvalds #define PM3RD_MiscControl_PIXELDOUBLE_ENABLE (1<<1) 2641da177e4SLinus Torvalds #define PM3RD_MiscControl_LASTREAD_ADDR_DISABLE (0<<2) 2651da177e4SLinus Torvalds #define PM3RD_MiscControl_LASTREAD_ADDR_ENABLE (1<<2) 2661da177e4SLinus Torvalds #define PM3RD_MiscControl_DIRECTCOLOR_DISABLE (0<<3) 2671da177e4SLinus Torvalds #define PM3RD_MiscControl_DIRECTCOLOR_ENABLE (1<<3) 2681da177e4SLinus Torvalds #define PM3RD_MiscControl_OVERLAY_DISABLE (0<<4) 2691da177e4SLinus Torvalds #define PM3RD_MiscControl_OVERLAY_ENABLE (1<<4) 2701da177e4SLinus Torvalds #define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_DISABLE (0<<5) 2711da177e4SLinus Torvalds #define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_ENABLE (1<<5) 2721da177e4SLinus Torvalds #define PM3RD_MiscControl_VSB_OUTPUT_DISABLE (0<<6) 2731da177e4SLinus Torvalds #define PM3RD_MiscControl_VSB_OUTPUT_ENABLE (1<<6) 2741da177e4SLinus Torvalds #define PM3RD_MiscControl_STEREODOUBLE_BUFFER_DISABLE (0<<7) 2751da177e4SLinus Torvalds #define PM3RD_MiscControl_STEREODOUBLE_BUFFER_ENABLE (1<<7) 2761da177e4SLinus Torvalds #define PM3RD_SyncControl 0x001 2771da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_ACTIVE_LOW (0<<0) 2781da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_ACTIVE_HIGH (1<<0) 2791da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_FORCE_ACTIVE (3<<0) 2801da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_FORCE_INACTIVE (4<<0) 2811da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_TRI_STATE (2<<0) 2821da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_ACTIVE_LOW (0<<3) 2831da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_ACTIVE_HIGH (1<<3) 2841da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_TRI_STATE (2<<3) 2851da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_FORCE_ACTIVE (3<<3) 2861da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_FORCE_INACTIVE (4<<3) 2871da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_OVERRIDE_SETBY_HSYNC (0<<6) 2881da177e4SLinus Torvalds #define PM3RD_SyncControl_HSYNC_OVERRIDE_FORCE_HIGH (1<<6) 2891da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_OVERRIDE_SETBY_VSYNC (0<<7) 2901da177e4SLinus Torvalds #define PM3RD_SyncControl_VSYNC_OVERRIDE_FORCE_HIGH (1<<7) 2911da177e4SLinus Torvalds #define PM3RD_DACControl 0x002 2921da177e4SLinus Torvalds #define PM3RD_DACControl_DAC_POWER_ON (0<<0) 2931da177e4SLinus Torvalds #define PM3RD_DACControl_DAC_POWER_OFF (1<<0) 2941da177e4SLinus Torvalds #define PM3RD_DACControl_SYNC_ON_GREEN_DISABLE (0<<3) 2951da177e4SLinus Torvalds #define PM3RD_DACControl_SYNC_ON_GREEN_ENABLE (1<<3) 2961da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_RED_DAC_DISABLE (0<<4) 2971da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_RED_DAC_ENABLE (1<<4) 2981da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_GREEN_DAC_DISABLE (0<<5) 2991da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_GREEN_DAC_ENABLE (1<<5) 3001da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_BLUE_DAC_DISABLE (0<<6) 3011da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_BLUE_DAC_ENABLE (1<<6) 3021da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_PEDESTAL_DISABLE (0<<7) 3031da177e4SLinus Torvalds #define PM3RD_DACControl_BLANK_PEDESTAL_ENABLE (1<<7) 3041da177e4SLinus Torvalds #define PM3RD_PixelSize 0x003 3051da177e4SLinus Torvalds #define PM3RD_PixelSize_24_BIT_PIXELS (4<<0) 3061da177e4SLinus Torvalds #define PM3RD_PixelSize_32_BIT_PIXELS (2<<0) 3071da177e4SLinus Torvalds #define PM3RD_PixelSize_16_BIT_PIXELS (1<<0) 3081da177e4SLinus Torvalds #define PM3RD_PixelSize_8_BIT_PIXELS (0<<0) 3091da177e4SLinus Torvalds #define PM3RD_ColorFormat 0x004 3101da177e4SLinus Torvalds #define PM3RD_ColorFormat_LINEAR_COLOR_EXT_ENABLE (1<<6) 3111da177e4SLinus Torvalds #define PM3RD_ColorFormat_LINEAR_COLOR_EXT_DISABLE (0<<6) 3121da177e4SLinus Torvalds #define PM3RD_ColorFormat_COLOR_ORDER_BLUE_LOW (1<<5) 3131da177e4SLinus Torvalds #define PM3RD_ColorFormat_COLOR_ORDER_RED_LOW (0<<5) 3141da177e4SLinus Torvalds #define PM3RD_ColorFormat_COLOR_FORMAT_MASK (0x1f<<0) 3151da177e4SLinus Torvalds #define PM3RD_ColorFormat_8888_COLOR (0<<0) 3161da177e4SLinus Torvalds #define PM3RD_ColorFormat_5551_FRONT_COLOR (1<<0) 3171da177e4SLinus Torvalds #define PM3RD_ColorFormat_4444_COLOR (2<<0) 3181da177e4SLinus Torvalds #define PM3RD_ColorFormat_332_FRONT_COLOR (5<<0) 3191da177e4SLinus Torvalds #define PM3RD_ColorFormat_332_BACK_COLOR (6<<0) 3201da177e4SLinus Torvalds #define PM3RD_ColorFormat_2321_FRONT_COLOR (9<<0) 3211da177e4SLinus Torvalds #define PM3RD_ColorFormat_2321_BACK_COLOR (10<<0) 3221da177e4SLinus Torvalds #define PM3RD_ColorFormat_232_FRONTOFF_COLOR (11<<0) 3231da177e4SLinus Torvalds #define PM3RD_ColorFormat_232_BACKOFF_COLOR (12<<0) 3241da177e4SLinus Torvalds #define PM3RD_ColorFormat_5551_BACK_COLOR (13<<0) 3251da177e4SLinus Torvalds #define PM3RD_ColorFormat_CI8_COLOR (14<<0) 3261da177e4SLinus Torvalds #define PM3RD_ColorFormat_565_FRONT_COLOR (16<<0) 3271da177e4SLinus Torvalds #define PM3RD_ColorFormat_565_BACK_COLOR (17<<0) 3281da177e4SLinus Torvalds #define PM3RD_CursorMode 0x005 3291da177e4SLinus Torvalds #define PM3RD_CursorMode_CURSOR_DISABLE (0<<0) 3301da177e4SLinus Torvalds #define PM3RD_CursorMode_CURSOR_ENABLE (1<<0) 3311da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_64x64_2BPE_P0123 (0<<2) 3321da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P0 (1<<2) 3331da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P1 (2<<2) 3341da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P2 (3<<2) 3351da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P3 (4<<2) 3361da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P01 (5<<2) 3371da177e4SLinus Torvalds #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P23 (6<<2) 3381da177e4SLinus Torvalds #define PM3RD_CursorMode_TYPE_MS (0<<4) 3391da177e4SLinus Torvalds #define PM3RD_CursorMode_TYPE_X (1<<4) 3401da177e4SLinus Torvalds #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_DISABLE (0<<6) 3411da177e4SLinus Torvalds #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_ENABLE (1<<6) 3421da177e4SLinus Torvalds #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_3_COLOR (2<<6) 3431da177e4SLinus Torvalds #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_15_COLOR (3<<6) 3441da177e4SLinus Torvalds #define PM3RD_CursorControl 0x006 3451da177e4SLinus Torvalds #define PM3RD_CursorControl_DOUBLE_X_DISABLED (0<<0) 3461da177e4SLinus Torvalds #define PM3RD_CursorControl_DOUBLE_X_ENABLED (1<<0) 3471da177e4SLinus Torvalds #define PM3RD_CursorControl_DOUBLE_Y_DISABLED (0<<1) 3481da177e4SLinus Torvalds #define PM3RD_CursorControl_DOUBLE_Y_ENABLED (1<<1) 3491da177e4SLinus Torvalds #define PM3RD_CursorControl_READBACK_POS_DISABLED (0<<2) 3501da177e4SLinus Torvalds #define PM3RD_CursorControl_READBACK_POS_ENABLED (1<<2) 3511da177e4SLinus Torvalds 3521da177e4SLinus Torvalds #define PM3RD_CursorXLow 0x007 3531da177e4SLinus Torvalds #define PM3RD_CursorXHigh 0x008 3541da177e4SLinus Torvalds #define PM3RD_CursorYLow 0x009 3551da177e4SLinus Torvalds #define PM3RD_CursorYHigh 0x00a 3561da177e4SLinus Torvalds #define PM3RD_CursorHotSpotX 0x00b 3571da177e4SLinus Torvalds #define PM3RD_CursorHotSpotY 0x00c 3581da177e4SLinus Torvalds #define PM3RD_OverlayKey 0x00d 3591da177e4SLinus Torvalds #define PM3RD_Pan 0x00e 3601da177e4SLinus Torvalds #define PM3RD_Pan_DISABLE (0<<0) 3611da177e4SLinus Torvalds #define PM3RD_Pan_ENABLE (1<<0) 3621da177e4SLinus Torvalds #define PM3RD_Pan_GATE_DISABLE (0<<1) 3631da177e4SLinus Torvalds #define PM3RD_Pan_GATE_ENABLE (1<<1) 3641da177e4SLinus Torvalds #define PM3RD_Sense 0x00f 3651da177e4SLinus Torvalds 3661da177e4SLinus Torvalds #define PM3RD_CheckControl 0x018 3671da177e4SLinus Torvalds #define PM3RD_CheckControl_PIXEL_DISABLED (0<<0) 3681da177e4SLinus Torvalds #define PM3RD_CheckControl_PIXEL_ENABLED (1<<0) 3691da177e4SLinus Torvalds #define PM3RD_CheckControl_LUT_DISABLED (0<<1) 3701da177e4SLinus Torvalds #define PM3RD_CheckControl_LUT_ENABLED (1<<1) 3711da177e4SLinus Torvalds #define PM3RD_CheckPixelRed 0x019 3721da177e4SLinus Torvalds #define PM3RD_CheckPixelGreen 0x01a 3731da177e4SLinus Torvalds #define PM3RD_CheckPixelBlue 0x01b 3741da177e4SLinus Torvalds #define PM3RD_CheckLUTRed 0x01c 3751da177e4SLinus Torvalds #define PM3RD_CheckLUTGreen 0x01d 3761da177e4SLinus Torvalds #define PM3RD_CheckLUTBlue 0x01e 3771da177e4SLinus Torvalds #define PM3RD_Scratch 0x01f 3781da177e4SLinus Torvalds 3791da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl 0x020 3801da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_DISABLE (0<<0) 3811da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_ENABLE (1<<0) 3821da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_MODE_MASK (3<<1) 3831da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_MODE_MAINKEY (0<<1) 3841da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_MODE_OVERLAYKEY (1<<1) 3851da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_MODE_ALWAYS (2<<1) 3861da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_MODE_BLEND (3<<1) 3871da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_DIRECTCOLOR_DISABLED (0<<3) 3881da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_DIRECTCOLOR_ENABLED (1<<3) 3891da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_BLENDSRC_MAIN (0<<4) 3901da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_BLENDSRC_REGISTER (1<<4) 3911da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_KEY_COLOR (0<<5) 3921da177e4SLinus Torvalds #define PM3RD_VideoOverlayControl_KEY_ALPHA (1<<5) 3931da177e4SLinus Torvalds #define PM3RD_VideoOverlayXStartLow 0x021 3941da177e4SLinus Torvalds #define PM3RD_VideoOverlayXStartHigh 0x022 3951da177e4SLinus Torvalds #define PM3RD_VideoOverlayYStartLow 0x023 3961da177e4SLinus Torvalds #define PM3RD_VideoOverlayYStartHigh 0x024 3971da177e4SLinus Torvalds #define PM3RD_VideoOverlayXEndLow 0x025 3981da177e4SLinus Torvalds #define PM3RD_VideoOverlayXEndHigh 0x026 3991da177e4SLinus Torvalds #define PM3RD_VideoOverlayYEndLow 0x027 4001da177e4SLinus Torvalds #define PM3RD_VideoOverlayYEndHigh 0x028 4011da177e4SLinus Torvalds #define PM3RD_VideoOverlayKeyR 0x029 4021da177e4SLinus Torvalds #define PM3RD_VideoOverlayKeyG 0x02a 4031da177e4SLinus Torvalds #define PM3RD_VideoOverlayKeyB 0x02b 4041da177e4SLinus Torvalds #define PM3RD_VideoOverlayBlend 0x02c 4051da177e4SLinus Torvalds #define PM3RD_VideoOverlayBlend_FACTOR_0_PERCENT (0<<6) 4061da177e4SLinus Torvalds #define PM3RD_VideoOverlayBlend_FACTOR_25_PERCENT (1<<6) 4071da177e4SLinus Torvalds #define PM3RD_VideoOverlayBlend_FACTOR_75_PERCENT (2<<6) 4081da177e4SLinus Torvalds #define PM3RD_VideoOverlayBlend_FACTOR_100_PERCENT (3<<6) 4091da177e4SLinus Torvalds 4101da177e4SLinus Torvalds #define PM3RD_DClkSetup1 0x1f0 4111da177e4SLinus Torvalds #define PM3RD_DClkSetup2 0x1f1 4121da177e4SLinus Torvalds #define PM3RD_KClkSetup1 0x1f2 4131da177e4SLinus Torvalds #define PM3RD_KClkSetup2 0x1f3 4141da177e4SLinus Torvalds 4151da177e4SLinus Torvalds #define PM3RD_DClkControl 0x200 4161da177e4SLinus Torvalds #define PM3RD_DClkControl_SOURCE_PLL (0<<4) 4171da177e4SLinus Torvalds #define PM3RD_DClkControl_SOURCE_VSA (1<<4) 4181da177e4SLinus Torvalds #define PM3RD_DClkControl_SOURCE_VSB (2<<4) 4191da177e4SLinus Torvalds #define PM3RD_DClkControl_SOURCE_EXT (3<<4) 4201da177e4SLinus Torvalds #define PM3RD_DClkControl_STATE_RUN (2<<2) 4211da177e4SLinus Torvalds #define PM3RD_DClkControl_STATE_HIGH (1<<2) 4221da177e4SLinus Torvalds #define PM3RD_DClkControl_STATE_LOW (0<<2) 4231da177e4SLinus Torvalds #define PM3RD_DClkControl_LOCKED (1<<1) 4241da177e4SLinus Torvalds #define PM3RD_DClkControl_NOT_LOCKED (0<<1) 4251da177e4SLinus Torvalds #define PM3RD_DClkControl_ENABLE (1<<0) 4261da177e4SLinus Torvalds #define PM3RD_DClkControl_DISABLE (0<<0) 4271da177e4SLinus Torvalds #define PM3RD_DClk0PreScale 0x201 4281da177e4SLinus Torvalds #define PM3RD_DClk0FeedbackScale 0x202 4291da177e4SLinus Torvalds #define PM3RD_DClk0PostScale 0x203 4301da177e4SLinus Torvalds #define PM3_REF_CLOCK 14318 4311da177e4SLinus Torvalds #define PM3RD_DClk1PreScale 0x204 4321da177e4SLinus Torvalds #define PM3RD_DClk1FeedbackScale 0x205 4331da177e4SLinus Torvalds #define PM3RD_DClk1PostScale 0x206 4341da177e4SLinus Torvalds #define PM3RD_DClk2PreScale 0x207 4351da177e4SLinus Torvalds #define PM3RD_DClk2FeedbackScale 0x208 4361da177e4SLinus Torvalds #define PM3RD_DClk2PostScale 0x209 4371da177e4SLinus Torvalds #define PM3RD_DClk3PreScale 0x20a 4381da177e4SLinus Torvalds #define PM3RD_DClk3FeedbackScale 0x20b 4391da177e4SLinus Torvalds #define PM3RD_DClk3PostScale 0x20c 4401da177e4SLinus Torvalds #define PM3RD_KClkControl 0x20d 4411da177e4SLinus Torvalds #define PM3RD_KClkControl_DISABLE (0<<0) 4421da177e4SLinus Torvalds #define PM3RD_KClkControl_ENABLE (1<<0) 4431da177e4SLinus Torvalds #define PM3RD_KClkControl_NOT_LOCKED (0<<1) 4441da177e4SLinus Torvalds #define PM3RD_KClkControl_LOCKED (1<<1) 4451da177e4SLinus Torvalds #define PM3RD_KClkControl_STATE_LOW (0<<2) 4461da177e4SLinus Torvalds #define PM3RD_KClkControl_STATE_HIGH (1<<2) 4471da177e4SLinus Torvalds #define PM3RD_KClkControl_STATE_RUN (2<<2) 4481da177e4SLinus Torvalds #define PM3RD_KClkControl_STATE_LOW_POWER (3<<2) 4491da177e4SLinus Torvalds #define PM3RD_KClkControl_SOURCE_PCLK (0<<4) 4501da177e4SLinus Torvalds #define PM3RD_KClkControl_SOURCE_HALF_PCLK (1<<4) 4511da177e4SLinus Torvalds #define PM3RD_KClkControl_SOURCE_PLL (2<<4) 4521da177e4SLinus Torvalds #define PM3RD_KClkPreScale 0x20e 4531da177e4SLinus Torvalds #define PM3RD_KClkFeedbackScale 0x20f 4541da177e4SLinus Torvalds #define PM3RD_KClkPostScale 0x210 4551da177e4SLinus Torvalds #define PM3RD_MClkControl 0x211 4561da177e4SLinus Torvalds #define PM3RD_MClkControl_DISABLE (0<<0) 4571da177e4SLinus Torvalds #define PM3RD_MClkControl_ENABLE (1<<0) 4581da177e4SLinus Torvalds #define PM3RD_MClkControl_NOT_LOCKED (0<<1) 4591da177e4SLinus Torvalds #define PM3RD_MClkControl_LOCKED (1<<1) 4601da177e4SLinus Torvalds #define PM3RD_MClkControl_STATE_LOW (0<<2) 4611da177e4SLinus Torvalds #define PM3RD_MClkControl_STATE_HIGH (1<<2) 4621da177e4SLinus Torvalds #define PM3RD_MClkControl_STATE_RUN (2<<2) 4631da177e4SLinus Torvalds #define PM3RD_MClkControl_STATE_LOW_POWER (3<<2) 4641da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_PCLK (0<<4) 4651da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_HALF_PCLK (1<<4) 4661da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_HALF_EXT (3<<4) 4671da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_EXT (4<<4) 4681da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_HALF_KCLK (5<<4) 4691da177e4SLinus Torvalds #define PM3RD_MClkControl_SOURCE_KCLK (6<<4) 4701da177e4SLinus Torvalds #define PM3RD_MClkPreScale 0x212 4711da177e4SLinus Torvalds #define PM3RD_MClkFeedbackScale 0x213 4721da177e4SLinus Torvalds #define PM3RD_MClkPostScale 0x214 4731da177e4SLinus Torvalds #define PM3RD_SClkControl 0x215 4741da177e4SLinus Torvalds #define PM3RD_SClkControl_DISABLE (0<<0) 4751da177e4SLinus Torvalds #define PM3RD_SClkControl_ENABLE (1<<0) 4761da177e4SLinus Torvalds #define PM3RD_SClkControl_NOT_LOCKED (0<<1) 4771da177e4SLinus Torvalds #define PM3RD_SClkControl_LOCKED (1<<1) 4781da177e4SLinus Torvalds #define PM3RD_SClkControl_STATE_LOW (0<<2) 4791da177e4SLinus Torvalds #define PM3RD_SClkControl_STATE_HIGH (1<<2) 4801da177e4SLinus Torvalds #define PM3RD_SClkControl_STATE_RUN (2<<2) 4811da177e4SLinus Torvalds #define PM3RD_SClkControl_STATE_LOW_POWER (3<<2) 4821da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_PCLK (0<<4) 4831da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_HALF_PCLK (1<<4) 4841da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_HALF_EXT (3<<4) 4851da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_EXT (4<<4) 4861da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_HALF_KCLK (5<<4) 4871da177e4SLinus Torvalds #define PM3RD_SClkControl_SOURCE_KCLK (6<<4) 4881da177e4SLinus Torvalds #define PM3RD_SClkPreScale 0x216 4891da177e4SLinus Torvalds #define PM3RD_SClkFeedbackScale 0x217 4901da177e4SLinus Torvalds #define PM3RD_SClkPostScale 0x218 4911da177e4SLinus Torvalds 4921da177e4SLinus Torvalds #define PM3RD_CursorPalette(p) (0x303+(p)) 4931da177e4SLinus Torvalds #define PM3RD_CursorPattern(p) (0x400+(p)) 4941da177e4SLinus Torvalds /****************************************************** 4951da177e4SLinus Torvalds * GLINT Permedia3 Video Streaming Registers (0x5000) * 4961da177e4SLinus Torvalds *******************************************************/ 4971da177e4SLinus Torvalds 4981da177e4SLinus Torvalds #define PM3VSConfiguration 0x5800 4991da177e4SLinus Torvalds 5001da177e4SLinus Torvalds /********************************************** 5011da177e4SLinus Torvalds * GLINT Permedia3 Core Registers (0x8000+) * 5021da177e4SLinus Torvalds ***********************************************/ 5031da177e4SLinus Torvalds #define PM3AALineWidth 0x94c0 5041da177e4SLinus Torvalds #define PM3AAPointsize 0x94a0 5051da177e4SLinus Torvalds #define PM3AlphaBlendAlphaMode 0xafa8 5061da177e4SLinus Torvalds #define PM3AlphaBlendAlphaModeAnd 0xad30 5071da177e4SLinus Torvalds #define PM3AlphaBlendAlphaModeOr 0xad38 5081da177e4SLinus Torvalds #define PM3AlphaBlendColorMode 0xafa0 5091da177e4SLinus Torvalds #define PM3AlphaBlendColorModeAnd 0xacb0 5101da177e4SLinus Torvalds #define PM3AlphaBlendColorModeOr 0xacb8 5111da177e4SLinus Torvalds #define PM3AlphaDestColor 0xaf88 5121da177e4SLinus Torvalds #define PM3AlphaSourceColor 0xaf80 5131da177e4SLinus Torvalds #define PM3AlphaTestMode 0x8800 5141da177e4SLinus Torvalds #define PM3AlphaTestModeAnd 0xabf0 5151da177e4SLinus Torvalds #define PM3AlphaTestModeOr 0xabf8 5161da177e4SLinus Torvalds #define PM3AntialiasMode 0x8808 5171da177e4SLinus Torvalds #define PM3AntialiasModeAnd 0xac00 5181da177e4SLinus Torvalds #define PM3AntialiasModeOr 0xac08 5191da177e4SLinus Torvalds /* ... */ 5201da177e4SLinus Torvalds #define PM3BackgroundColor 0xb0c8 5211da177e4SLinus Torvalds /* ... */ 5221da177e4SLinus Torvalds #define PM3ColorDDAMode 0x87e0 5231da177e4SLinus Torvalds #define PM3ColorDDAModeAnd 0xabe0 5241da177e4SLinus Torvalds #define PM3ColorDDAModeOr 0xabe8 5251da177e4SLinus Torvalds #define PM3CommandInterrupt 0xa990 5261da177e4SLinus Torvalds #define PM3ConstantColorDDA 0xafb0 5271da177e4SLinus Torvalds #define PM3ConstantColorDDA_R(r) ((r)&0xff) 5281da177e4SLinus Torvalds #define PM3ConstantColorDDA_G(g) (((g)&0xff)<<8) 5291da177e4SLinus Torvalds #define PM3ConstantColorDDA_B(b) (((b)&0xff)<<16) 5301da177e4SLinus Torvalds #define PM3ConstantColorDDA_A(a) (((a)&0xff)<<24) 5311da177e4SLinus Torvalds #define PM3ContextData 0x8dd0 5321da177e4SLinus Torvalds #define PM3ContextDump 0x8dc0 5331da177e4SLinus Torvalds #define PM3ContextRestore 0x8dc8 5341da177e4SLinus Torvalds #define PM3Continue 0x8058 5351da177e4SLinus Torvalds #define PM3ContinueNewDom 0x8048 5361da177e4SLinus Torvalds #define PM3ContinueNewLine 0x8040 5371da177e4SLinus Torvalds #define PM3ContinueNewSub 0x8050 5381da177e4SLinus Torvalds #define PM3Count 0x8030 5391da177e4SLinus Torvalds /* ... */ 5401da177e4SLinus Torvalds #define PM3DeltaControl 0x9350 5411da177e4SLinus Torvalds #define PM3DeltaControlAnd 0xab20 5421da177e4SLinus Torvalds #define PM3DeltaControlOr 0xab28 5431da177e4SLinus Torvalds #define PM3DeltaMode 0x9300 5441da177e4SLinus Torvalds #define PM3DeltaModeAnd 0xaad0 5451da177e4SLinus Torvalds #define PM3DeltaModeOr 0xaad8 5461da177e4SLinus Torvalds /* ... */ 5471da177e4SLinus Torvalds #define PM3DitherMode 0x8818 5481da177e4SLinus Torvalds #define PM3DitherModeAnd 0xacd0 5491da177e4SLinus Torvalds #define PM3DitherModeOr 0xacd8 5501da177e4SLinus Torvalds /* ... */ 5511da177e4SLinus Torvalds #define PM3dXDom 0x8008 5521da177e4SLinus Torvalds #define PM3dXSub 0x8018 5531da177e4SLinus Torvalds #define PM3dY 0x8028 5541da177e4SLinus Torvalds /* ... */ 5551da177e4SLinus Torvalds #define PM3FBBlockColor 0x8ac8 5561da177e4SLinus Torvalds #define PM3FBBlockColor0 0xb060 5571da177e4SLinus Torvalds #define PM3FBBlockColor1 0xb068 5581da177e4SLinus Torvalds #define PM3FBBlockColor2 0xb070 5591da177e4SLinus Torvalds #define PM3FBBlockColor3 0xb078 5601da177e4SLinus Torvalds #define PM3FBBlockColorBack 0xb0a0 5611da177e4SLinus Torvalds #define PM3FBBlockColorBack0 0xb080 5621da177e4SLinus Torvalds #define PM3FBBlockColorBack1 0xb088 5631da177e4SLinus Torvalds #define PM3FBBlockColorBack2 0xb090 5641da177e4SLinus Torvalds #define PM3FBBlockColorBack3 0xb098 5651da177e4SLinus Torvalds #define PM3FBColor 0x8a98 5661da177e4SLinus Torvalds #define PM3FBDestReadBufferAddr0 0xae80 5671da177e4SLinus Torvalds #define PM3FBDestReadBufferAddr1 0xae88 5681da177e4SLinus Torvalds #define PM3FBDestReadBufferAddr2 0xae90 5691da177e4SLinus Torvalds #define PM3FBDestReadBufferAddr3 0xae98 5701da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset0 0xaea0 5711da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset1 0xaea8 5721da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset2 0xaeb0 5731da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset3 0xaeb8 5741da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset_XOffset(x) ((x)&0xffff) 5751da177e4SLinus Torvalds #define PM3FBDestReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) 5761da177e4SLinus Torvalds #define PM3FBDestReadBufferWidth0 0xaec0 5771da177e4SLinus Torvalds #define PM3FBDestReadBufferWidth1 0xaec8 5781da177e4SLinus Torvalds #define PM3FBDestReadBufferWidth2 0xaed0 5791da177e4SLinus Torvalds #define PM3FBDestReadBufferWidth3 0xaed8 5801da177e4SLinus Torvalds #define PM3FBDestReadBufferWidth_Width(w) ((w)&0x0fff) 5811da177e4SLinus Torvalds 5821da177e4SLinus Torvalds #define PM3FBDestReadEnables 0xaee8 5831da177e4SLinus Torvalds #define PM3FBDestReadEnablesAnd 0xad20 5841da177e4SLinus Torvalds #define PM3FBDestReadEnablesOr 0xad28 5851da177e4SLinus Torvalds #define PM3FBDestReadEnables_E(e) ((e)&0xff) 5861da177e4SLinus Torvalds #define PM3FBDestReadEnables_E0 1<<0 5871da177e4SLinus Torvalds #define PM3FBDestReadEnables_E1 1<<1 5881da177e4SLinus Torvalds #define PM3FBDestReadEnables_E2 1<<2 5891da177e4SLinus Torvalds #define PM3FBDestReadEnables_E3 1<<3 5901da177e4SLinus Torvalds #define PM3FBDestReadEnables_E4 1<<4 5911da177e4SLinus Torvalds #define PM3FBDestReadEnables_E5 1<<5 5921da177e4SLinus Torvalds #define PM3FBDestReadEnables_E6 1<<6 5931da177e4SLinus Torvalds #define PM3FBDestReadEnables_E7 1<<7 5941da177e4SLinus Torvalds #define PM3FBDestReadEnables_R(r) (((r)&0xff)<<8) 5951da177e4SLinus Torvalds #define PM3FBDestReadEnables_R0 1<<8 5961da177e4SLinus Torvalds #define PM3FBDestReadEnables_R1 1<<9 5971da177e4SLinus Torvalds #define PM3FBDestReadEnables_R2 1<<10 5981da177e4SLinus Torvalds #define PM3FBDestReadEnables_R3 1<<11 5991da177e4SLinus Torvalds #define PM3FBDestReadEnables_R4 1<<12 6001da177e4SLinus Torvalds #define PM3FBDestReadEnables_R5 1<<13 6011da177e4SLinus Torvalds #define PM3FBDestReadEnables_R6 1<<14 6021da177e4SLinus Torvalds #define PM3FBDestReadEnables_R7 1<<15 6031da177e4SLinus Torvalds #define PM3FBDestReadEnables_ReferenceAlpha(a) (((a)&0xff)<<24) 6041da177e4SLinus Torvalds 6051da177e4SLinus Torvalds #define PM3FBDestReadMode 0xaee0 6061da177e4SLinus Torvalds #define PM3FBDestReadModeAnd 0xac90 6071da177e4SLinus Torvalds #define PM3FBDestReadModeOr 0xac98 6081da177e4SLinus Torvalds #define PM3FBDestReadMode_ReadDisable 0<<0 6091da177e4SLinus Torvalds #define PM3FBDestReadMode_ReadEnable 1<<0 610*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_StripePitch(sp) (((sp)&0x7)<<2) 611*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_StripeHeight(sh) (((sh)&0x7)<<7) 6121da177e4SLinus Torvalds #define PM3FBDestReadMode_Enable0 1<<8 6131da177e4SLinus Torvalds #define PM3FBDestReadMode_Enable1 1<<9 6141da177e4SLinus Torvalds #define PM3FBDestReadMode_Enable2 1<<10 6151da177e4SLinus Torvalds #define PM3FBDestReadMode_Enable3 1<<11 616*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_Layout0(l) (((l)&0x3)<<12) 617*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_Layout1(l) (((l)&0x3)<<14) 618*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_Layout2(l) (((l)&0x3)<<16) 619*f4b85dc0SMariusz Kozlowski #define PM3FBDestReadMode_Layout3(l) (((l)&0x3)<<18) 6201da177e4SLinus Torvalds #define PM3FBDestReadMode_Origin0 1<<20 6211da177e4SLinus Torvalds #define PM3FBDestReadMode_Origin1 1<<21 6221da177e4SLinus Torvalds #define PM3FBDestReadMode_Origin2 1<<22 6231da177e4SLinus Torvalds #define PM3FBDestReadMode_Origin3 1<<23 6241da177e4SLinus Torvalds #define PM3FBDestReadMode_Blocking 1<<24 6251da177e4SLinus Torvalds #define PM3FBDestReadMode_UseReadEnabled 1<<26 6261da177e4SLinus Torvalds #define PM3FBDestReadMode_AlphaFiltering 1<<27 6271da177e4SLinus Torvalds 6281da177e4SLinus Torvalds #define PM3FBHardwareWriteMask 0x8ac0 6291da177e4SLinus Torvalds #define PM3FBSoftwareWriteMask 0x8820 6301da177e4SLinus Torvalds #define PM3FBData 0x8aa0 6311da177e4SLinus Torvalds #define PM3FBSourceData 0x8aa8 6321da177e4SLinus Torvalds #define PM3FBSourceReadBufferAddr 0xaf08 6331da177e4SLinus Torvalds #define PM3FBSourceReadBufferOffset 0xaf10 6341da177e4SLinus Torvalds #define PM3FBSourceReadBufferOffset_XOffset(x) ((x)&0xffff) 6351da177e4SLinus Torvalds #define PM3FBSourceReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) 6361da177e4SLinus Torvalds #define PM3FBSourceReadBufferWidth 0xaf18 6371da177e4SLinus Torvalds #define PM3FBSourceReadBufferWidth_Width(w) ((w)&0x0fff) 6381da177e4SLinus Torvalds #define PM3FBSourceReadMode 0xaf00 6391da177e4SLinus Torvalds #define PM3FBSourceReadModeAnd 0xaca0 6401da177e4SLinus Torvalds #define PM3FBSourceReadModeOr 0xaca8 6411da177e4SLinus Torvalds #define PM3FBSourceReadMode_ReadDisable (0<<0) 6421da177e4SLinus Torvalds #define PM3FBSourceReadMode_ReadEnable (1<<0) 643*f4b85dc0SMariusz Kozlowski #define PM3FBSourceReadMode_StripePitch(sp) (((sp)&0x7)<<2) 644*f4b85dc0SMariusz Kozlowski #define PM3FBSourceReadMode_StripeHeight(sh) (((sh)&0x7)<<7) 645*f4b85dc0SMariusz Kozlowski #define PM3FBSourceReadMode_Layout(l) (((l)&0x3)<<8) 6461da177e4SLinus Torvalds #define PM3FBSourceReadMode_Origin 1<<10 6471da177e4SLinus Torvalds #define PM3FBSourceReadMode_Blocking 1<<11 6481da177e4SLinus Torvalds #define PM3FBSourceReadMode_UserTexelCoord 1<<13 6491da177e4SLinus Torvalds #define PM3FBSourceReadMode_WrapXEnable 1<<14 6501da177e4SLinus Torvalds #define PM3FBSourceReadMode_WrapYEnable 1<<15 651*f4b85dc0SMariusz Kozlowski #define PM3FBSourceReadMode_WrapX(w) (((w)&0xf)<<16) 652*f4b85dc0SMariusz Kozlowski #define PM3FBSourceReadMode_WrapY(w) (((w)&0xf)<<20) 6531da177e4SLinus Torvalds #define PM3FBSourceReadMode_ExternalSourceData 1<<24 6541da177e4SLinus Torvalds #define PM3FBWriteBufferAddr0 0xb000 6551da177e4SLinus Torvalds #define PM3FBWriteBufferAddr1 0xb008 6561da177e4SLinus Torvalds #define PM3FBWriteBufferAddr2 0xb010 6571da177e4SLinus Torvalds #define PM3FBWriteBufferAddr3 0xb018 6581da177e4SLinus Torvalds 6591da177e4SLinus Torvalds #define PM3FBWriteBufferOffset0 0xb020 6601da177e4SLinus Torvalds #define PM3FBWriteBufferOffset1 0xb028 6611da177e4SLinus Torvalds #define PM3FBWriteBufferOffset2 0xb030 6621da177e4SLinus Torvalds #define PM3FBWriteBufferOffset3 0xb038 6631da177e4SLinus Torvalds #define PM3FBWriteBufferOffset_XOffset(x) ((x)&0xffff) 6641da177e4SLinus Torvalds #define PM3FBWriteBufferOffset_YOffset(y) (((y)&0xffff)<<16) 6651da177e4SLinus Torvalds 6661da177e4SLinus Torvalds #define PM3FBWriteBufferWidth0 0xb040 6671da177e4SLinus Torvalds #define PM3FBWriteBufferWidth1 0xb048 6681da177e4SLinus Torvalds #define PM3FBWriteBufferWidth2 0xb050 6691da177e4SLinus Torvalds #define PM3FBWriteBufferWidth3 0xb058 6701da177e4SLinus Torvalds #define PM3FBWriteBufferWidth_Width(w) ((w)&0x0fff) 6711da177e4SLinus Torvalds 6721da177e4SLinus Torvalds #define PM3FBWriteMode 0x8ab8 6731da177e4SLinus Torvalds #define PM3FBWriteModeAnd 0xacf0 6741da177e4SLinus Torvalds #define PM3FBWriteModeOr 0xacf8 6751da177e4SLinus Torvalds #define PM3FBWriteMode_WriteDisable 0<<0 6761da177e4SLinus Torvalds #define PM3FBWriteMode_WriteEnable 1<<0 6771da177e4SLinus Torvalds #define PM3FBWriteMode_Replicate 1<<4 6781da177e4SLinus Torvalds #define PM3FBWriteMode_OpaqueSpan 1<<5 6791da177e4SLinus Torvalds #define PM3FBWriteMode_StripePitch(p) (((p)&0x7)<<6) 6801da177e4SLinus Torvalds #define PM3FBWriteMode_StripeHeight(h) (((h)&0x7)<<9) 6811da177e4SLinus Torvalds #define PM3FBWriteMode_Enable0 1<<12 6821da177e4SLinus Torvalds #define PM3FBWriteMode_Enable1 1<<13 6831da177e4SLinus Torvalds #define PM3FBWriteMode_Enable2 1<<14 6841da177e4SLinus Torvalds #define PM3FBWriteMode_Enable3 1<<15 6851da177e4SLinus Torvalds #define PM3FBWriteMode_Layout0(l) (((l)&0x3)<<16) 6861da177e4SLinus Torvalds #define PM3FBWriteMode_Layout1(l) (((l)&0x3)<<18) 6871da177e4SLinus Torvalds #define PM3FBWriteMode_Layout2(l) (((l)&0x3)<<20) 6881da177e4SLinus Torvalds #define PM3FBWriteMode_Layout3(l) (((l)&0x3)<<22) 6891da177e4SLinus Torvalds #define PM3FBWriteMode_Origin0 1<<24 6901da177e4SLinus Torvalds #define PM3FBWriteMode_Origin1 1<<25 6911da177e4SLinus Torvalds #define PM3FBWriteMode_Origin2 1<<26 6921da177e4SLinus Torvalds #define PM3FBWriteMode_Origin3 1<<27 6931da177e4SLinus Torvalds #define PM3ForegroundColor 0xb0c0 6941da177e4SLinus Torvalds /* ... */ 6951da177e4SLinus Torvalds #define PM3GIDMode 0xb538 6961da177e4SLinus Torvalds #define PM3GIDModeAnd 0xb5b0 6971da177e4SLinus Torvalds #define PM3GIDModeOr 0xb5b8 6981da177e4SLinus Torvalds /* ... */ 6991da177e4SLinus Torvalds #define PM3LBDestReadBufferAddr 0xb510 7001da177e4SLinus Torvalds #define PM3LBDestReadBufferOffset 0xb518 7011da177e4SLinus Torvalds #define PM3LBDestReadEnables 0xb508 7021da177e4SLinus Torvalds #define PM3LBDestReadEnablesAnd 0xb590 7031da177e4SLinus Torvalds #define PM3LBDestReadEnablesOr 0xb598 7041da177e4SLinus Torvalds #define PM3LBDestReadMode 0xb500 7051da177e4SLinus Torvalds #define PM3LBDestReadModeAnd 0xb580 7061da177e4SLinus Torvalds #define PM3LBDestReadModeOr 0xb588 7071da177e4SLinus Torvalds #define PM3LBDestReadMode_Disable 0<<0 7081da177e4SLinus Torvalds #define PM3LBDestReadMode_Enable 1<<0 7091da177e4SLinus Torvalds #define PM3LBDestReadMode_StripePitch(p) (((p)&0x7)<<2) 7101da177e4SLinus Torvalds #define PM3LBDestReadMode_StripeHeight(h) (((h)&0x7)<<5) 7111da177e4SLinus Torvalds #define PM3LBDestReadMode_Layout 1<<8 7121da177e4SLinus Torvalds #define PM3LBDestReadMode_Origin 1<<9 7131da177e4SLinus Torvalds #define PM3LBDestReadMode_UserReadEnables 1<<10 7141da177e4SLinus Torvalds #define PM3LBDestReadMode_Packed16 1<<11 7151da177e4SLinus Torvalds #define PM3LBDestReadMode_Width(w) (((w)&0xfff)<<12) 7161da177e4SLinus Torvalds #define PM3LBReadFormat 0x8888 7171da177e4SLinus Torvalds #define PM3LBReadFormat_DepthWidth(w) (((w)&0x3)<<0) 7181da177e4SLinus Torvalds #define PM3LBReadFormat_StencilWidth(w) (((w)&0xf)<<2) 7191da177e4SLinus Torvalds #define PM3LBReadFormat_StencilPosition(p) (((p)&0x1f)<<6) 7201da177e4SLinus Torvalds #define PM3LBReadFormat_FCPWidth(w) (((w)&0xf)<<11) 7211da177e4SLinus Torvalds #define PM3LBReadFormat_FCPPosition(p) (((p)&0x1f)<<15) 7221da177e4SLinus Torvalds #define PM3LBReadFormat_GIDWidth(w) (((w)&0x7)<<20) 7231da177e4SLinus Torvalds #define PM3LBReadFormat_GIDPosition(p) (((p)&0x1f)<<23) 7241da177e4SLinus Torvalds #define PM3LBSourceReadBufferAddr 0xb528 7251da177e4SLinus Torvalds #define PM3LBSourceReadBufferOffset 0xb530 7261da177e4SLinus Torvalds #define PM3LBSourceReadMode 0xb520 7271da177e4SLinus Torvalds #define PM3LBSourceReadModeAnd 0xb5a0 7281da177e4SLinus Torvalds #define PM3LBSourceReadModeOr 0xb5a8 7291da177e4SLinus Torvalds #define PM3LBSourceReadMode_Enable 1<<0 7301da177e4SLinus Torvalds #define PM3LBSourceReadMode_StripePitch(p) (((p)&0x7)<<2) 7311da177e4SLinus Torvalds #define PM3LBSourceReadMode_StripeHeight(h) (((h)&0x7)<<5) 7321da177e4SLinus Torvalds #define PM3LBSourceReadMode_Layout 1<<8 7331da177e4SLinus Torvalds #define PM3LBSourceReadMode_Origin 1<<9 7341da177e4SLinus Torvalds #define PM3LBSourceReadMode_Packed16 1<<10 7351da177e4SLinus Torvalds #define PM3LBSourceReadMode_Width(w) (((w)&0xfff)<<11) 7361da177e4SLinus Torvalds #define PM3LBStencil 0x88a8 7371da177e4SLinus Torvalds #define PM3LBWriteBufferAddr 0xb540 7381da177e4SLinus Torvalds #define PM3LBWriteBufferOffset 0xb548 7391da177e4SLinus Torvalds #define PM3LBWriteFormat 0x88c8 7401da177e4SLinus Torvalds #define PM3LBWriteFormat_DepthWidth(w) (((w)&0x3)<<0) 7411da177e4SLinus Torvalds #define PM3LBWriteFormat_StencilWidth(w) (((w)&0xf)<<2) 7421da177e4SLinus Torvalds #define PM3LBWriteFormat_StencilPosition(p) (((p)&0x1f)<<6) 7431da177e4SLinus Torvalds #define PM3LBWriteFormat_GIDWidth(w) (((w)&0x7)<<20) 7441da177e4SLinus Torvalds #define PM3LBWriteFormat_GIDPosition(p) (((p)&0x1f)<<23) 7451da177e4SLinus Torvalds #define PM3LBWriteMode 0x88c0 7461da177e4SLinus Torvalds #define PM3LBWriteModeAnd 0xac80 7471da177e4SLinus Torvalds #define PM3LBWriteModeOr 0xac88 7481da177e4SLinus Torvalds #define PM3LBWriteMode_WriteDisable 0<<0 7491da177e4SLinus Torvalds #define PM3LBWriteMode_WriteEnable 1<<0 7501da177e4SLinus Torvalds #define PM3LBWriteMode_StripePitch(p) (((p)&0x7)<<3) 7511da177e4SLinus Torvalds #define PM3LBWriteMode_StripeHeight(h) (((h)&0x7)<<6) 7521da177e4SLinus Torvalds #define PM3LBWriteMode_Layout 1<<9 7531da177e4SLinus Torvalds #define PM3LBWriteMode_Origin 1<<10 7541da177e4SLinus Torvalds #define PM3LBWriteMode_Packed16 1<<11 7551da177e4SLinus Torvalds #define PM3LBWriteMode_Width(w) (((w)&0xfff)<<12) 7561da177e4SLinus Torvalds /* ... */ 7571da177e4SLinus Torvalds #define PM3LineStippleMode 0x81a8 7581da177e4SLinus Torvalds #define PM3LineStippleModeAnd 0xabc0 7591da177e4SLinus Torvalds #define PM3LineStippleModeOr 0xabc8 7601da177e4SLinus Torvalds #define PM3LoadLineStippleCounters 0x81b0 7611da177e4SLinus Torvalds /* ... */ 7621da177e4SLinus Torvalds #define PM3LogicalOpMode 0x8828 7631da177e4SLinus Torvalds #define PM3LogicalOpModeAnd 0xace0 7641da177e4SLinus Torvalds #define PM3LogicalOpModeOr 0xace8 7651da177e4SLinus Torvalds #define PM3LogicalOpMode_Disable (0<<0) 7661da177e4SLinus Torvalds #define PM3LogicalOpMode_Enable (1<<0) 7671da177e4SLinus Torvalds #define PM3LogicalOpMode_LogicOp(op) (((op)&0xf)<<1) 7681da177e4SLinus Torvalds #define PM3LogicalOpMode_UseConstantWriteData_Disable (0<<5) 7691da177e4SLinus Torvalds #define PM3LogicalOpMode_UseConstantWriteData_Enable (1<<5) 7701da177e4SLinus Torvalds #define PM3LogicalOpMode_Background_Disable (0<<6) 7711da177e4SLinus Torvalds #define PM3LogicalOpMode_Background_Enable (1<<6) 7721da177e4SLinus Torvalds #define PM3LogicalOpMode_Background_LogicOp(op) (((op)&0xf)<<7) 7731da177e4SLinus Torvalds #define PM3LogicalOpMode_UseConstantSource_Disable (0<<11) 7741da177e4SLinus Torvalds #define PM3LogicalOpMode_UseConstantSource_Enable (1<<11) 7751da177e4SLinus Torvalds 7761da177e4SLinus Torvalds /* ... */ 7771da177e4SLinus Torvalds #define PM3LUT 0x8e80 7781da177e4SLinus Torvalds /* ... */ 7791da177e4SLinus Torvalds #define PM3LUT 0x8e80 7801da177e4SLinus Torvalds #define PM3LUTAddress 0x84d0 7811da177e4SLinus Torvalds #define PM3LUTData 0x84c8 7821da177e4SLinus Torvalds #define PM3LUTIndex 0x84c0 7831da177e4SLinus Torvalds #define PM3LUTMode 0xb378 7841da177e4SLinus Torvalds #define PM3LUTModeAnd 0xad70 7851da177e4SLinus Torvalds #define PM3LUTModeOr 0xad78 7861da177e4SLinus Torvalds #define PM3LUTTransfer 0x84d8 7871da177e4SLinus Torvalds /* ... */ 7881da177e4SLinus Torvalds #define PM3PixelSize 0x80c0 7891da177e4SLinus Torvalds #define PM3PixelSize_GLOBAL_32BIT (0<<0) 7901da177e4SLinus Torvalds #define PM3PixelSize_GLOBAL_16BIT (1<<0) 7911da177e4SLinus Torvalds #define PM3PixelSize_GLOBAL_8BIT (2<<0) 7921da177e4SLinus Torvalds #define PM3PixelSize_RASTERIZER_32BIT (0<<2) 7931da177e4SLinus Torvalds #define PM3PixelSize_RASTERIZER_16BIT (1<<2) 7941da177e4SLinus Torvalds #define PM3PixelSize_RASTERIZER_8BIT (2<<2) 7951da177e4SLinus Torvalds #define PM3PixelSize_SCISSOR_AND_STIPPLE_32BIT (0<<4) 7961da177e4SLinus Torvalds #define PM3PixelSize_SCISSOR_AND_STIPPLE_16BIT (1<<4) 7971da177e4SLinus Torvalds #define PM3PixelSize_SCISSOR_AND_STIPPLE_8BIT (2<<4) 7981da177e4SLinus Torvalds #define PM3PixelSize_TEXTURE_32BIT (0<<6) 7991da177e4SLinus Torvalds #define PM3PixelSize_TEXTURE_16BIT (1<<6) 8001da177e4SLinus Torvalds #define PM3PixelSize_TEXTURE_8BIT (2<<6) 8011da177e4SLinus Torvalds #define PM3PixelSize_LUT_32BIT (0<<8) 8021da177e4SLinus Torvalds #define PM3PixelSize_LUT_16BIT (1<<8) 8031da177e4SLinus Torvalds #define PM3PixelSize_LUT_8BIT (2<<8) 8041da177e4SLinus Torvalds #define PM3PixelSize_FRAMEBUFFER_32BIT (0<<10) 8051da177e4SLinus Torvalds #define PM3PixelSize_FRAMEBUFFER_16BIT (1<<10) 8061da177e4SLinus Torvalds #define PM3PixelSize_FRAMEBUFFER_8BIT (2<<10) 8071da177e4SLinus Torvalds #define PM3PixelSize_LOGICAL_OP_32BIT (0<<12) 8081da177e4SLinus Torvalds #define PM3PixelSize_LOGICAL_OP_16BIT (1<<12) 8091da177e4SLinus Torvalds #define PM3PixelSize_LOGICAL_OP_8BIT (2<<12) 8101da177e4SLinus Torvalds #define PM3PixelSize_LOCALBUFFER_32BIT (0<<14) 8111da177e4SLinus Torvalds #define PM3PixelSize_LOCALBUFFER_16BIT (1<<14) 8121da177e4SLinus Torvalds #define PM3PixelSize_LOCALBUFFER_8BIT (2<<14) 8131da177e4SLinus Torvalds #define PM3PixelSize_SETUP_32BIT (0<<16) 8141da177e4SLinus Torvalds #define PM3PixelSize_SETUP_16BIT (1<<16) 8151da177e4SLinus Torvalds #define PM3PixelSize_SETUP_8BIT (2<<16) 8161da177e4SLinus Torvalds #define PM3PixelSize_GLOBAL (0<<31) 8171da177e4SLinus Torvalds #define PM3PixelSize_INDIVIDUAL (1<<31) 8181da177e4SLinus Torvalds /* ... */ 8191da177e4SLinus Torvalds #define PM3Render 0x8038 8201da177e4SLinus Torvalds #define PM3Render_AreaStipple_Disable (0<<0) 8211da177e4SLinus Torvalds #define PM3Render_AreaStipple_Enable (1<<0) 8221da177e4SLinus Torvalds #define PM3Render_LineStipple_Disable (0<<1) 8231da177e4SLinus Torvalds #define PM3Render_LineStipple_Enable (1<<1) 8241da177e4SLinus Torvalds #define PM3Render_ResetLine_Disable (0<<2) 8251da177e4SLinus Torvalds #define PM3Render_ResetLine_Enable (1<<2) 8261da177e4SLinus Torvalds #define PM3Render_FastFill_Disable (0<<3) 8271da177e4SLinus Torvalds #define PM3Render_FastFill_Enable (1<<3) 8281da177e4SLinus Torvalds #define PM3Render_Primitive_Line (0<<6) 8291da177e4SLinus Torvalds #define PM3Render_Primitive_Trapezoid (1<<6) 8301da177e4SLinus Torvalds #define PM3Render_Primitive_Point (2<<6) 8311da177e4SLinus Torvalds #define PM3Render_Antialias_Disable (0<<8) 8321da177e4SLinus Torvalds #define PM3Render_Antialias_Enable (1<<8) 8331da177e4SLinus Torvalds #define PM3Render_Antialias_SubPixelRes_4x4 (0<<9) 8341da177e4SLinus Torvalds #define PM3Render_Antialias_SubPixelRes_8x8 (1<<9) 8351da177e4SLinus Torvalds #define PM3Render_UsePointTable_Disable (0<<10) 8361da177e4SLinus Torvalds #define PM3Render_UsePointTable_Enable (1<<10) 8371da177e4SLinus Torvalds #define PM3Render_SyncOnbitMask_Disable (0<<11) 8381da177e4SLinus Torvalds #define PM3Render_SyncOnBitMask_Enable (1<<11) 8391da177e4SLinus Torvalds #define PM3Render_SyncOnHostData_Disable (0<<12) 8401da177e4SLinus Torvalds #define PM3Render_SyncOnHostData_Enable (1<<12) 8411da177e4SLinus Torvalds #define PM3Render_Texture_Disable (0<<13) 8421da177e4SLinus Torvalds #define PM3Render_Texture_Enable (1<<13) 8431da177e4SLinus Torvalds #define PM3Render_Fog_Disable (0<<14) 8441da177e4SLinus Torvalds #define PM3Render_Fog_Enable (1<<14) 8451da177e4SLinus Torvalds #define PM3Render_Coverage_Disable (0<<15) 8461da177e4SLinus Torvalds #define PM3Render_Coverage_Enable (1<<15) 8471da177e4SLinus Torvalds #define PM3Render_SubPixelCorrection_Disable (0<<16) 8481da177e4SLinus Torvalds #define PM3Render_SubPixelCorrection_Enable (1<<16) 8491da177e4SLinus Torvalds #define PM3Render_SpanOperation_Disable (0<<18) 8501da177e4SLinus Torvalds #define PM3Render_SpanOperation_Enable (1<<18) 8511da177e4SLinus Torvalds #define PM3Render_FBSourceRead_Disable (0<<27) 8521da177e4SLinus Torvalds #define PM3Render_FBSourceRead_Enable (1<<27) 8531da177e4SLinus Torvalds #define PM3RasterizerMode 0x80a0 8541da177e4SLinus Torvalds #define PM3RasterizerModeAnd 0xaba0 8551da177e4SLinus Torvalds #define PM3RasterizerModeOr 0xabb8 8561da177e4SLinus Torvalds #define PM3RectangleHeight 0x94e0 8571da177e4SLinus Torvalds #define PM3Render 0x8038 8581da177e4SLinus Torvalds #define PM3RepeatLine 0x9328 8591da177e4SLinus Torvalds #define PM3ResetPickResult 0x8c20 8601da177e4SLinus Torvalds #define PM3RLEMask 0x8c48 8611da177e4SLinus Torvalds #define PM3RouterMode 0x8840 8621da177e4SLinus Torvalds #define PM3RStart 0x8780 8631da177e4SLinus Torvalds #define PM3S1Start 0x8400 8641da177e4SLinus Torvalds #define PM3aveLineStippleCounters 0x81c0 8651da177e4SLinus Torvalds #define PM3ScissorMaxXY 0x8190 8661da177e4SLinus Torvalds #define PM3ScissorMinXY 0x8188 8671da177e4SLinus Torvalds #define PM3ScissorMode 0x8180 8681da177e4SLinus Torvalds #define PM3ScissorModeAnd 0xabb0 8691da177e4SLinus Torvalds #define PM3ScissorModeOr 0xabb8 8701da177e4SLinus Torvalds #define PM3ScreenSize 0x8198 8711da177e4SLinus Torvalds #define PM3Security 0x8908 8721da177e4SLinus Torvalds #define PM3SetLogicalTexturePage 0xb360 8731da177e4SLinus Torvalds #define PM3SizeOfFramebuffer 0xb0a8 8741da177e4SLinus Torvalds #define PM3SStart 0x8388 8751da177e4SLinus Torvalds #define PM3StartXDom 0x8000 8761da177e4SLinus Torvalds #define PM3StartXSub 0x8010 8771da177e4SLinus Torvalds #define PM3StartY 0x8020 8781da177e4SLinus Torvalds /* ... */ 8791da177e4SLinus Torvalds #define PM3SpanColorMask 0x8168 8801da177e4SLinus Torvalds /* ... */ 8811da177e4SLinus Torvalds #define PM3TextureApplicationMode 0x8680 8821da177e4SLinus Torvalds #define PM3TextureApplicationModeAnd 0xac50 8831da177e4SLinus Torvalds #define PM3TextureApplicationModeOr 0xac58 8841da177e4SLinus Torvalds #define PM3TextureBaseAddr 0x8500 8851da177e4SLinus Torvalds #define PM3TextureCacheControl 0x8490 8861da177e4SLinus Torvalds #define PM3TextureChromaLower0 0x84f0 8871da177e4SLinus Torvalds #define PM3TextureChromaLower1 0x8608 8881da177e4SLinus Torvalds #define PM3TextureChromaUpper0 0x84e8 8891da177e4SLinus Torvalds #define PM3TextureChromaUpper1 0x8600 8901da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode0 0xb310 8911da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode0And 0xb390 8921da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode0Or 0xb398 8931da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode1 0xb320 8941da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode1And 0xb3b0 8951da177e4SLinus Torvalds #define PM3TextureCompositeAlphaMode1Or 0xb3b8 8961da177e4SLinus Torvalds #define PM3TextureCompositeColorMode0 0xb308 8971da177e4SLinus Torvalds #define PM3TextureCompositeColorMode0And 0xb380 8981da177e4SLinus Torvalds #define PM3TextureCompositeColorMode0Or 0xb388 8991da177e4SLinus Torvalds #define PM3TextureCompositeColorMode1 0xb318 9001da177e4SLinus Torvalds #define PM3TextureCompositeColorMode1And 0xb3a0 9011da177e4SLinus Torvalds #define PM3TextureCompositeColorMode1Or 0xb3a8 9021da177e4SLinus Torvalds #define PM3TextureCompositeFactor0 0xb328 9031da177e4SLinus Torvalds #define PM3TextureCompositeFactor1 0xb330 9041da177e4SLinus Torvalds #define PM3TextureCompositeMode 0xb300 9051da177e4SLinus Torvalds #define PM3TextureCoordMode 0x8380 9061da177e4SLinus Torvalds #define PM3TextureCoordModeAnd 0xac20 9071da177e4SLinus Torvalds #define PM3TextureCoordModeOr 0xac28 9081da177e4SLinus Torvalds #define PM3TextureData 0x88e8 9091da177e4SLinus Torvalds /* 9101da177e4SLinus Torvalds #define PM3TextureDownloadControl 0x0108 9111da177e4SLinus Torvalds */ 9121da177e4SLinus Torvalds #define PM3TextureDownloadOffset 0x88f0 9131da177e4SLinus Torvalds #define PM3TextureEnvColor 0x8688 9141da177e4SLinus Torvalds #define PM3TextureFilterMode 0x84e0 9151da177e4SLinus Torvalds #define PM3TextureFilterModeAnd 0xad50 9161da177e4SLinus Torvalds #define PM3TextureFilterModeOr 0xad58 9171da177e4SLinus Torvalds #define PM3TextureIndexMode0 0xb338 9181da177e4SLinus Torvalds #define PM3TextureIndexMode0And 0xb3c0 9191da177e4SLinus Torvalds #define PM3TextureIndexMode0Or 0xb3c8 9201da177e4SLinus Torvalds #define PM3TextureIndexMode1 0xb340 9211da177e4SLinus Torvalds #define PM3TextureIndexMode1And 0xb3d0 9221da177e4SLinus Torvalds #define PM3TextureIndexMode1Or 0xb3d8 9231da177e4SLinus Torvalds /* ... */ 9241da177e4SLinus Torvalds #define PM3TextureMapSize 0xb428 9251da177e4SLinus Torvalds #define PM3TextureMapWidth0 0x8580 9261da177e4SLinus Torvalds #define PM3TextureMapWidth1 0x8588 9271da177e4SLinus Torvalds #define PM3TextureMapWidth_Width(w) ((w&0xfff)<<0) 9281da177e4SLinus Torvalds #define PM3TextureMapWidth_BorderLayout (1<<12) 9291da177e4SLinus Torvalds #define PM3TextureMapWidth_Layout_Linear (0<<13) 9301da177e4SLinus Torvalds #define PM3TextureMapWidth_Layout_Patch64 (1<<13) 9311da177e4SLinus Torvalds #define PM3TextureMapWidth_Layout_Patch32_2 (2<<13) 9321da177e4SLinus Torvalds #define PM3TextureMapWidth_Layout_Patch2 (3<<13) 9331da177e4SLinus Torvalds #define PM3TextureMapWidth_HostTexture (1<<15) 9341da177e4SLinus Torvalds #define PM3TextureReadMode0 0xb400 9351da177e4SLinus Torvalds #define PM3TextureReadMode0And 0xac30 9361da177e4SLinus Torvalds #define PM3TextureReadMode0Or 0xac38 9371da177e4SLinus Torvalds #define PM3TextureReadMode1 0xb408 9381da177e4SLinus Torvalds #define PM3TextureReadMode1And 0xad40 9391da177e4SLinus Torvalds #define PM3TextureReadMode1Or 0xad48 9401da177e4SLinus Torvalds /* ... */ 9411da177e4SLinus Torvalds #define PM3WaitForCompletion 0x80b8 9421da177e4SLinus Torvalds #define PM3Window 0x8980 9431da177e4SLinus Torvalds #define PM3Window_ForceLBUpdate 1<<3 9441da177e4SLinus Torvalds #define PM3Window_LBUpdateSource 1<<4 945*f4b85dc0SMariusz Kozlowski #define PM3Window_FrameCount(c) (((c)&0xff)<<9) 9461da177e4SLinus Torvalds #define PM3Window_StencilFCP 1<<17 9471da177e4SLinus Torvalds #define PM3Window_DepthFCP 1<<18 9481da177e4SLinus Torvalds #define PM3Window_OverrideWriteFiltering 1<<19 9491da177e4SLinus Torvalds #define PM3WindowAnd 0xab80 9501da177e4SLinus Torvalds #define PM3WindowOr 0xab88 9511da177e4SLinus Torvalds #define PM3WindowOrigin 0x81c8 9521da177e4SLinus Torvalds #define PM3XBias 0x9480 9531da177e4SLinus Torvalds #define PM3YBias 0x9488 9541da177e4SLinus Torvalds #define PM3YLimits 0x80a8 9551da177e4SLinus Torvalds #define PM3UVMode 0x8f00 9561da177e4SLinus Torvalds #define PM3ZFogBias 0x86b8 9571da177e4SLinus Torvalds #define PM3ZStart 0xadd8 9581da177e4SLinus Torvalds #define PM3ZStartL 0x89b8 9591da177e4SLinus Torvalds #define PM3ZStartU 0x89b0 9601da177e4SLinus Torvalds 9611da177e4SLinus Torvalds 9621da177e4SLinus Torvalds /********************************************** 9631da177e4SLinus Torvalds * GLINT Permedia3 2D setup Unit * 9641da177e4SLinus Torvalds ***********************************************/ 9651da177e4SLinus Torvalds #define PM3Config2D 0xb618 9661da177e4SLinus Torvalds #define PM3Config2D_OpaqueSpan 1<<0 9671da177e4SLinus Torvalds #define PM3Config2D_MultiRXBlit 1<<1 9681da177e4SLinus Torvalds #define PM3Config2D_UserScissorEnable 1<<2 9691da177e4SLinus Torvalds #define PM3Config2D_FBDestReadEnable 1<<3 9701da177e4SLinus Torvalds #define PM3Config2D_AlphaBlendEnable 1<<4 9711da177e4SLinus Torvalds #define PM3Config2D_DitherEnable 1<<5 9721da177e4SLinus Torvalds #define PM3Config2D_ForegroundROPEnable 1<<6 9731da177e4SLinus Torvalds #define PM3Config2D_ForegroundROP(rop) (((rop)&0xf)<<7) 9741da177e4SLinus Torvalds #define PM3Config2D_BackgroundROPEnable 1<<11 9751da177e4SLinus Torvalds #define PM3Config2D_BackgroundROP(rop) (((rop)&0xf)<<12) 9761da177e4SLinus Torvalds #define PM3Config2D_UseConstantSource 1<<16 9771da177e4SLinus Torvalds #define PM3Config2D_FBWriteEnable 1<<17 9781da177e4SLinus Torvalds #define PM3Config2D_Blocking 1<<18 9791da177e4SLinus Torvalds #define PM3Config2D_ExternalSourceData 1<<19 9801da177e4SLinus Torvalds #define PM3Config2D_LUTModeEnable 1<<20 9811da177e4SLinus Torvalds #define PM3DownloadGlyphwidth 0xb658 9821da177e4SLinus Torvalds #define PM3DownloadGlyphwidth_GlyphWidth(gw) ((gw)&0xffff) 9831da177e4SLinus Torvalds #define PM3DownloadTarget 0xb650 9841da177e4SLinus Torvalds #define PM3DownloadTarget_TagName(tag) ((tag)&0x1fff) 9851da177e4SLinus Torvalds #define PM3GlyphData 0xb660 9861da177e4SLinus Torvalds #define PM3GlyphPosition 0xb608 9871da177e4SLinus Torvalds #define PM3GlyphPosition_XOffset(x) ((x)&0xffff) 9881da177e4SLinus Torvalds #define PM3GlyphPosition_YOffset(y) (((y)&0xffff)<<16) 9891da177e4SLinus Torvalds #define PM3Packed4Pixels 0xb668 9901da177e4SLinus Torvalds #define PM3Packed8Pixels 0xb630 9911da177e4SLinus Torvalds #define PM3Packed16Pixels 0xb638 9921da177e4SLinus Torvalds #define PM3RectanglePosition 0xb600 9931da177e4SLinus Torvalds #define PM3RectanglePosition_XOffset(x) ((x)&0xffff) 9941da177e4SLinus Torvalds #define PM3RectanglePosition_YOffset(y) (((y)&0xffff)<<16) 9951da177e4SLinus Torvalds #define PM3Render2D 0xb640 9961da177e4SLinus Torvalds #define PM3Render2D_Width(w) ((w)&0x0fff) 9971da177e4SLinus Torvalds #define PM3Render2D_Operation_Normal 0<<12 9981da177e4SLinus Torvalds #define PM3Render2D_Operation_SyncOnHostData 1<<12 9991da177e4SLinus Torvalds #define PM3Render2D_Operation_SyncOnBitMask 2<<12 10001da177e4SLinus Torvalds #define PM3Render2D_Operation_PatchOrderRendering 3<<12 10011da177e4SLinus Torvalds #define PM3Render2D_FBSourceReadEnable 1<<14 10021da177e4SLinus Torvalds #define PM3Render2D_SpanOperation 1<<15 10031da177e4SLinus Torvalds #define PM3Render2D_Height(h) (((h)&0x0fff)<<16) 10041da177e4SLinus Torvalds #define PM3Render2D_XPositive 1<<28 10051da177e4SLinus Torvalds #define PM3Render2D_YPositive 1<<29 10061da177e4SLinus Torvalds #define PM3Render2D_AreaStippleEnable 1<<30 10071da177e4SLinus Torvalds #define PM3Render2D_TextureEnable 1<<31 10081da177e4SLinus Torvalds #define PM3Render2DGlyph 0xb648 10091da177e4SLinus Torvalds #define PM3Render2DGlyph_Width(w) ((w)&0x7f) 10101da177e4SLinus Torvalds #define PM3Render2DGlyph_Height(h) (((h)&0x7f)<<7) 10111da177e4SLinus Torvalds #define PM3Render2DGlyph_XOffset(x) (((x)&0x1ff)<<14) 10121da177e4SLinus Torvalds #define PM3Render2DGlyph_YOffset(y) (((y)&0x1ff)<<23) 10131da177e4SLinus Torvalds #define PM3RenderPatchOffset 0xb610 10141da177e4SLinus Torvalds #define PM3RenderPatchOffset_XOffset(x) ((x)&0xffff) 10151da177e4SLinus Torvalds #define PM3RenderPatchOffset_YOffset(y) (((y)&0xffff)<<16) 10161da177e4SLinus Torvalds #define PM3RLCount 0xb678 10171da177e4SLinus Torvalds #define PM3RLCount_Count(c) ((c)&0x0fff) 10181da177e4SLinus Torvalds #define PM3RLData 0xb670 10191da177e4SLinus Torvalds 10201da177e4SLinus Torvalds /********************************************** 10211da177e4SLinus Torvalds * GLINT Permedia3 Alias Register * 10221da177e4SLinus Torvalds ***********************************************/ 10231da177e4SLinus Torvalds #define PM3FillBackgroundColor 0x8330 10241da177e4SLinus Torvalds #define PM3FillConfig2D0 0x8338 10251da177e4SLinus Torvalds #define PM3FillConfig2D1 0x8360 10261da177e4SLinus Torvalds #define PM3FillConfig2D_OpaqueSpan 1<<0 10271da177e4SLinus Torvalds #define PM3FillConfig2D_MultiRXBlit 1<<1 10281da177e4SLinus Torvalds #define PM3FillConfig2D_UserScissorEnable 1<<2 10291da177e4SLinus Torvalds #define PM3FillConfig2D_FBDestReadEnable 1<<3 10301da177e4SLinus Torvalds #define PM3FillConfig2D_AlphaBlendEnable 1<<4 10311da177e4SLinus Torvalds #define PM3FillConfig2D_DitherEnable 1<<5 10321da177e4SLinus Torvalds #define PM3FillConfig2D_ForegroundROPEnable 1<<6 10331da177e4SLinus Torvalds #define PM3FillConfig2D_ForegroundROP(rop) (((rop)&0xf)<<7) 10341da177e4SLinus Torvalds #define PM3FillConfig2D_BackgroundROPEnable 1<<11 10351da177e4SLinus Torvalds #define PM3FillConfig2D_BackgroundROP(rop) (((rop)&0xf)<<12) 10361da177e4SLinus Torvalds #define PM3FillConfig2D_UseConstantSource 1<<16 10371da177e4SLinus Torvalds #define PM3FillConfig2D_FBWriteEnable 1<<17 10381da177e4SLinus Torvalds #define PM3FillConfig2D_Blocking 1<<18 10391da177e4SLinus Torvalds #define PM3FillConfig2D_ExternalSourceData 1<<19 10401da177e4SLinus Torvalds #define PM3FillConfig2D_LUTModeEnable 1<<20 10411da177e4SLinus Torvalds #define PM3FillFBDestReadBufferAddr 0x8310 10421da177e4SLinus Torvalds #define PM3FillFBSourceReadBufferAddr 0x8308 10431da177e4SLinus Torvalds #define PM3FillFBSourceReadBufferOffset 0x8340 10441da177e4SLinus Torvalds #define PM3FillFBSourceReadBufferOffset_XOffset(x) ((x)&0xffff) 10451da177e4SLinus Torvalds #define PM3FillFBSourceReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) 10461da177e4SLinus Torvalds #define PM3FillFBWriteBufferAddr 0x8300 10471da177e4SLinus Torvalds #define PM3FillForegroundColor0 0x8328 10481da177e4SLinus Torvalds #define PM3FillForegroundColor1 0x8358 10491da177e4SLinus Torvalds #define PM3FillGlyphPosition 0x8368 10501da177e4SLinus Torvalds #define PM3FillGlyphPosition_XOffset(x) ((x)&0xffff) 10511da177e4SLinus Torvalds #define PM3FillGlyphPosition_YOffset(y) (((y)&0xffff)<<16) 10521da177e4SLinus Torvalds #define PM3FillRectanglePosition 0x8348 10531da177e4SLinus Torvalds #define PM3FillRectanglePosition_XOffset(x) ((x)&0xffff) 10541da177e4SLinus Torvalds #define PM3FillRectanglePosition_YOffset(y) (((y)&0xffff)<<16) 10551da177e4SLinus Torvalds 10561da177e4SLinus Torvalds #define PM3_REGS_SIZE 0x10000 10571da177e4SLinus Torvalds #define PM3_MAX_PIXCLOCK 300000 10581da177e4SLinus Torvalds /* a few more useful registers & regs value... */ 10591da177e4SLinus Torvalds #define PM3Sync 0x8c40 10601da177e4SLinus Torvalds #define PM3Sync_Tag 0x188 10611da177e4SLinus Torvalds #define PM3FilterMode 0x8c00 10621da177e4SLinus Torvalds #define PM3FilterModeSync 0x400 10631da177e4SLinus Torvalds #define PM3OutputFifo 0x2000 10641da177e4SLinus Torvalds #define PM3StatisticMode 0x8c08 10651da177e4SLinus Torvalds #define PM3AreaStippleMode 0x81a0 10661da177e4SLinus Torvalds #define AreaStipplePattern0 (0x8200) 10671da177e4SLinus Torvalds #define AreaStipplePattern1 (0x8208) 10681da177e4SLinus Torvalds #define AreaStipplePattern2 (0x8210) 10691da177e4SLinus Torvalds #define AreaStipplePattern3 (0x8218) 10701da177e4SLinus Torvalds #define AreaStipplePattern4 (0x8220) 10711da177e4SLinus Torvalds #define AreaStipplePattern5 (0x8228) 10721da177e4SLinus Torvalds #define AreaStipplePattern6 (0x8230) 10731da177e4SLinus Torvalds #define AreaStipplePattern7 (0x8238) 10741da177e4SLinus Torvalds #define AreaStipplePattern8 (0x8240) 10751da177e4SLinus Torvalds #define AreaStipplePattern9 (0x8248) 10761da177e4SLinus Torvalds #define AreaStipplePattern10 (0x8250) 10771da177e4SLinus Torvalds #define AreaStipplePattern11 (0x8258) 10781da177e4SLinus Torvalds #define AreaStipplePattern12 (0x8260) 10791da177e4SLinus Torvalds #define AreaStipplePattern13 (0x8268) 10801da177e4SLinus Torvalds #define AreaStipplePattern14 (0x8270) 10811da177e4SLinus Torvalds #define AreaStipplePattern15 (0x8278) 10821da177e4SLinus Torvalds #define AreaStipplePattern16 (0x8280) 10831da177e4SLinus Torvalds #define AreaStipplePattern17 (0x8288) 10841da177e4SLinus Torvalds #define AreaStipplePattern18 (0x8290) 10851da177e4SLinus Torvalds #define AreaStipplePattern19 (0x8298) 10861da177e4SLinus Torvalds #define AreaStipplePattern20 (0x82a0) 10871da177e4SLinus Torvalds #define AreaStipplePattern21 (0x82a8) 10881da177e4SLinus Torvalds #define AreaStipplePattern22 (0x82b0) 10891da177e4SLinus Torvalds #define AreaStipplePattern23 (0x82b8) 10901da177e4SLinus Torvalds #define AreaStipplePattern24 (0x82c0) 10911da177e4SLinus Torvalds #define AreaStipplePattern25 (0x82c8) 10921da177e4SLinus Torvalds #define AreaStipplePattern26 (0x82d0) 10931da177e4SLinus Torvalds #define AreaStipplePattern27 (0x82d8) 10941da177e4SLinus Torvalds #define AreaStipplePattern28 (0x82eo) 10951da177e4SLinus Torvalds #define AreaStipplePattern29 (0x82e8) 10961da177e4SLinus Torvalds #define AreaStipplePattern30 (0x82f0) 10971da177e4SLinus Torvalds #define AreaStipplePattern31 (0x82f8) 10981da177e4SLinus Torvalds #define AreaStipplePattern_indexed(i) (0x8200 + ((i) * 0x8)) 10991da177e4SLinus Torvalds 11001da177e4SLinus Torvalds #define PM3DepthMode 0x89a0 11011da177e4SLinus Torvalds #define PM3StencilMode 0x8988 11021da177e4SLinus Torvalds #define PM3StencilData 0x8990 11031da177e4SLinus Torvalds #define PM3TextureReadMode 0x8670 11041da177e4SLinus Torvalds #define PM3FogMode 0x8690 11051da177e4SLinus Torvalds #define PM3ChromaTestMode 0x8f18 11061da177e4SLinus Torvalds #define PM3YUVMode 0x8f00 11071da177e4SLinus Torvalds #define PM3BitMaskPattern 0x8068 11081da177e4SLinus Torvalds 11091da177e4SLinus Torvalds /* ***************************** */ 11101da177e4SLinus Torvalds /* ***** pm3fb IOCTL const ***** */ 11111da177e4SLinus Torvalds /* ***************************** */ 11121da177e4SLinus Torvalds /* debug-only IOCTL */ 11131da177e4SLinus Torvalds #define PM3FBIO_CLEARMEMORY 0x504D3300 /* 'PM3\000' */ 11141da177e4SLinus Torvalds #define PM3FBIO_CLEARCMAP 0x504D3301 /* 'PM3\001' */ 11151da177e4SLinus Torvalds /* common use IOCTL */ 11161da177e4SLinus Torvalds #define PM3FBIO_RESETCHIP 0x504D33FF /* 'PM3\377' */ 11171da177e4SLinus Torvalds 11181da177e4SLinus Torvalds /* ***************************************** */ 11191da177e4SLinus Torvalds /* ***** pm3fb useful define and macro ***** */ 11201da177e4SLinus Torvalds /* ***************************************** */ 11211da177e4SLinus Torvalds 11221da177e4SLinus Torvalds /* permedia3 -specific definitions */ 11231da177e4SLinus Torvalds #define PM3_SCALE_TO_CLOCK(pr, fe, po) ((2 * PM3_REF_CLOCK * fe) / (pr * (1 << (po)))) 11241da177e4SLinus Torvalds 11251da177e4SLinus Torvalds /* in case it's not in linux/pci.h */ 11261da177e4SLinus Torvalds #ifndef PCI_DEVICE_ID_3DLABS_PERMEDIA3 11271da177e4SLinus Torvalds #define PCI_DEVICE_ID_3DLABS_PERMEDIA3 0x000a 11281da177e4SLinus Torvalds #endif 11291da177e4SLinus Torvalds 11301da177e4SLinus Torvalds /* max number of simultaneous board */ 11311da177e4SLinus Torvalds #define PM3_MAX_BOARD 4 11321da177e4SLinus Torvalds 11331da177e4SLinus Torvalds /* max size of options */ 11341da177e4SLinus Torvalds #define PM3_OPTIONS_SIZE 256 11351da177e4SLinus Torvalds 11361da177e4SLinus Torvalds /* max size of font name */ 11371da177e4SLinus Torvalds #define PM3_FONTNAME_SIZE 40 11381da177e4SLinus Torvalds 11391da177e4SLinus Torvalds /* do we want accelerated console */ 11401da177e4SLinus Torvalds #define PM3FB_USE_ACCEL 1 11411da177e4SLinus Torvalds 11421da177e4SLinus Torvalds /* for driver debugging ONLY */ 11431da177e4SLinus Torvalds /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ 11441da177e4SLinus Torvalds /* define PM3FB_MASTER_DEBUG 1 */ 11451da177e4SLinus Torvalds #if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3) 11461da177e4SLinus Torvalds #define PM3FB_TRACE 11471da177e4SLinus Torvalds #endif /* defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3) */ 11481da177e4SLinus Torvalds 11491da177e4SLinus Torvalds #ifdef PM3FB_MASTER_DEBUG 11501da177e4SLinus Torvalds #define DPRINTK(l,a,b...) do { if ((l) <= PM3FB_MASTER_DEBUG) printk("pm3fb: %s: " a, __FUNCTION__ , ## b); } while (0) 11511da177e4SLinus Torvalds #define DASSERT(t,a,b...) do { if (!(t)) printk("pm3fb: _assert failed: %s: " a, __FUNCTION__ , ## b); } while (0) 11521da177e4SLinus Torvalds #ifdef PM3FB_TRACE 11531da177e4SLinus Torvalds #define DTRACE printk("pm3fb: _enter %s\n", __FUNCTION__) 11541da177e4SLinus Torvalds #else /* PM3FB_TRACE */ 11551da177e4SLinus Torvalds #define DTRACE 11561da177e4SLinus Torvalds #endif /* PM3FB_TRACE */ 11571da177e4SLinus Torvalds #else /* PM3FB_MASTER_DEBUG */ 11581da177e4SLinus Torvalds #define DPRINTK(l,a,b...) 11591da177e4SLinus Torvalds #define DASSERT(t,a,b...) 11601da177e4SLinus Torvalds #define DTRACE 11611da177e4SLinus Torvalds #endif /* PM3FB_MASTER_DEBUG */ 11621da177e4SLinus Torvalds 11631da177e4SLinus Torvalds #if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 2) 11641da177e4SLinus Torvalds #define PM3_SHOW_CUR_MODE pm3fb_show_cur_mode(l_fb_info) 11651da177e4SLinus Torvalds #else 11661da177e4SLinus Torvalds #define PM3_SHOW_CUR_MODE /* pm3fb_show_cur_mode() */ 11671da177e4SLinus Torvalds #endif 11681da177e4SLinus Torvalds 11691da177e4SLinus Torvalds /* ******************************************** */ 11701da177e4SLinus Torvalds /* ***** A bunch of register-access macro ***** */ 11711da177e4SLinus Torvalds /* ******************************************** */ 11721da177e4SLinus Torvalds 11731da177e4SLinus Torvalds #define PM3_WRITE_REG(r, v) fb_writel(v, (l_fb_info->vIOBase + r)) 11741da177e4SLinus Torvalds #define PM3_READ_REG(r) fb_readl((l_fb_info->vIOBase + r)) 11751da177e4SLinus Torvalds 11761da177e4SLinus Torvalds 11771da177e4SLinus Torvalds #define depth2bpp(d) ((d + 7L) & ~7L) 11781da177e4SLinus Torvalds #define depth2ByPP(d) (depth2bpp(d) / 8) 11791da177e4SLinus Torvalds 11801da177e4SLinus Torvalds #define depth_supported(d) ((d == 8) || (d == 12) || (d == 15) || (d == 16) || (d==32)) 11811da177e4SLinus Torvalds 11821da177e4SLinus Torvalds 11831da177e4SLinus Torvalds #define PM3_WAIT(n) \ 11841da177e4SLinus Torvalds do{ \ 11851da177e4SLinus Torvalds while(PM3_READ_REG(PM3InFIFOSpace)<(n)); \ 11861da177e4SLinus Torvalds } while(0) 11871da177e4SLinus Torvalds 11881da177e4SLinus Torvalds #define PM3_DELAY(x) do { \ 11891da177e4SLinus Torvalds int delay = x; \ 11901da177e4SLinus Torvalds unsigned char tmp; \ 11911da177e4SLinus Torvalds while(delay--){tmp = PM3_READ_REG(PM3InFIFOSpace);}; \ 11921da177e4SLinus Torvalds } while(0) 11931da177e4SLinus Torvalds 11941da177e4SLinus Torvalds #define PM3_SLOW_WRITE_REG(r,v) \ 11951da177e4SLinus Torvalds do{ \ 11961da177e4SLinus Torvalds DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in slow write\n"); \ 11971da177e4SLinus Torvalds mb(); \ 11981da177e4SLinus Torvalds PM3_WAIT(1); \ 11991da177e4SLinus Torvalds mb(); \ 12001da177e4SLinus Torvalds PM3_WRITE_REG(r,v); \ 12011da177e4SLinus Torvalds } while(0) 12021da177e4SLinus Torvalds 12031da177e4SLinus Torvalds #define PM3_SET_INDEX(index) \ 12041da177e4SLinus Torvalds do{ \ 12051da177e4SLinus Torvalds PM3_SLOW_WRITE_REG(PM3RD_IndexHigh,(((index)>>8)&0xff)); \ 12061da177e4SLinus Torvalds PM3_SLOW_WRITE_REG(PM3RD_IndexLow,((index)&0xff)); \ 12071da177e4SLinus Torvalds } while(0) 12081da177e4SLinus Torvalds 12091da177e4SLinus Torvalds #define PM3_WRITE_DAC_REG(r, v) \ 12101da177e4SLinus Torvalds do { \ 12111da177e4SLinus Torvalds DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in write dac reg\n"); \ 12121da177e4SLinus Torvalds PM3_SET_INDEX(r); \ 12131da177e4SLinus Torvalds mb(); \ 12141da177e4SLinus Torvalds PM3_WRITE_REG(PM3RD_IndexedData, v); \ 12151da177e4SLinus Torvalds } while (0) 12161da177e4SLinus Torvalds 12171da177e4SLinus Torvalds /* next one is really a function, added as a macro to be consistent */ 12181da177e4SLinus Torvalds #define PM3_READ_DAC_REG(r) pm3fb_read_dac_reg(l_fb_info, r) 12191da177e4SLinus Torvalds 12201da177e4SLinus Torvalds 12211da177e4SLinus Torvalds #define PM3_COLOR(c) \ 12221da177e4SLinus Torvalds do { \ 12231da177e4SLinus Torvalds if (l_fb_info->current_par->depth == 8) \ 12241da177e4SLinus Torvalds { \ 12251da177e4SLinus Torvalds c = (c & 0xFF); \ 12261da177e4SLinus Torvalds c = c | (c << 8); \ 12271da177e4SLinus Torvalds } \ 12281da177e4SLinus Torvalds if ((l_fb_info->current_par->depth == 8) || (depth2bpp(l_fb_info->current_par->depth) == 16)) \ 12291da177e4SLinus Torvalds { \ 12301da177e4SLinus Torvalds c = (c & 0xFFFF); \ 12311da177e4SLinus Torvalds c = c | (c << 16); \ 12321da177e4SLinus Torvalds } \ 12331da177e4SLinus Torvalds } while (0) 12341da177e4SLinus Torvalds 12351da177e4SLinus Torvalds #endif /* PM3FB_H */ 1236