brintos

brintos / linux-shallow public Read only

0
0
Text · 9.0 KiB · 9ce9adb Raw
255 lines · c
1/*2 * Permedia2 framebuffer driver definitions.3 * Copyright (c) 1998-2000 Ilario Nardinocchi (nardinoc@CS.UniBO.IT)4 * --------------------------------------------------------------------------5 * $Id: pm2fb.h,v 1.26 2000/09/19 00:11:53 illo Exp $6 * --------------------------------------------------------------------------7 * This file is subject to the terms and conditions of the GNU General Public8 * License.  See the file COPYING in the main directory of this archive9 * for more details.10 */11 12#ifndef PM2FB_H13#define PM2FB_H14 15#define PM2_REFERENCE_CLOCK	14318			/* in KHz */16#define PM2_MAX_PIXCLOCK	230000			/* in KHz */17#define PM2_REGS_SIZE		0x1000018 19#define PM2TAG(r) (u32 )(((r)-0x8000)>>3)20 21/*****************************************************************************22 * Permedia2 registers used in the framebuffer23 *****************************************************************************/24 25#define PM2R_RESET_STATUS				0x000026#define PM2R_IN_FIFO_SPACE				0x001827#define PM2R_OUT_FIFO_WORDS				0x002028#define PM2R_APERTURE_ONE				0x005029#define PM2R_APERTURE_TWO				0x005830#define PM2R_FIFO_DISCON				0x006831#define PM2R_CHIP_CONFIG				0x007032 33#define PM2R_REBOOT					0x100034#define PM2R_MEM_CONTROL				0x104035#define PM2R_BOOT_ADDRESS				0x108036#define PM2R_MEM_CONFIG					0x10c037#define PM2R_BYPASS_WRITE_MASK				0x110038#define PM2R_FRAMEBUFFER_WRITE_MASK			0x114039 40#define PM2R_OUT_FIFO					0x200041 42#define PM2R_SCREEN_BASE				0x300043#define PM2R_SCREEN_STRIDE				0x300844#define PM2R_H_TOTAL					0x301045#define PM2R_HG_END					0x301846#define PM2R_HB_END					0x302047#define PM2R_HS_START					0x302848#define PM2R_HS_END					0x303049#define PM2R_V_TOTAL					0x303850#define PM2R_VB_END					0x304051#define PM2R_VS_START					0x304852#define PM2R_VS_END					0x305053#define PM2R_VIDEO_CONTROL				0x305854#define PM2R_LINE_COUNT					0x307055#define PM2R_FIFO_CONTROL				0x307856 57#define PM2R_RD_PALETTE_WRITE_ADDRESS			0x400058#define PM2R_RD_PALETTE_DATA				0x400859#define PM2R_RD_PIXEL_MASK				0x401060#define PM2R_RD_PALETTE_READ_ADDRESS			0x401861#define PM2R_RD_CURSOR_COLOR_ADDRESS		        0x402062#define PM2R_RD_CURSOR_COLOR_DATA		        0x402863#define PM2R_RD_INDEXED_DATA				0x405064#define PM2R_RD_CURSOR_DATA				0x405865#define PM2R_RD_CURSOR_X_LSB				0x406066#define PM2R_RD_CURSOR_X_MSB				0x406867#define PM2R_RD_CURSOR_Y_LSB				0x407068#define PM2R_RD_CURSOR_Y_MSB				0x407869 70#define PM2R_START_X_DOM				0x800071#define PM2R_D_X_DOM					0x800872#define PM2R_START_X_SUB				0x801073#define PM2R_D_X_SUB					0x801874#define PM2R_START_Y					0x802075#define PM2R_D_Y					0x802876#define PM2R_COUNT					0x803077#define PM2R_RENDER					0x803878#define PM2R_BIT_MASK_PATTERN				0x806879#define PM2R_RASTERIZER_MODE				0x80a080#define PM2R_RECTANGLE_ORIGIN				0x80d081#define PM2R_RECTANGLE_SIZE				0x80d882#define PM2R_PACKED_DATA_LIMITS				0x815083#define PM2R_SCISSOR_MODE				0x818084#define PM2R_SCISSOR_MIN_XY				0x818885#define PM2R_SCISSOR_MAX_XY				0x819086#define PM2R_SCREEN_SIZE				0x819887#define PM2R_AREA_STIPPLE_MODE				0x81a088#define PM2R_WINDOW_ORIGIN				0x81c889#define PM2R_TEXTURE_ADDRESS_MODE			0x838090#define PM2R_TEXTURE_MAP_FORMAT				0x858891#define PM2R_TEXTURE_DATA_FORMAT			0x859092#define PM2R_TEXTURE_READ_MODE				0x867093#define PM2R_TEXEL_LUT_MODE				0x867894#define PM2R_TEXTURE_COLOR_MODE				0x868095#define PM2R_FOG_MODE					0x869096#define PM2R_TEXEL0					0x876097#define PM2R_COLOR_DDA_MODE				0x87e098#define PM2R_CONSTANT_COLOR				0x87e899#define PM2R_ALPHA_BLEND_MODE				0x8810100#define PM2R_DITHER_MODE				0x8818101#define PM2R_FB_SOFT_WRITE_MASK				0x8820102#define PM2R_LOGICAL_OP_MODE				0x8828103#define PM2R_LB_READ_MODE				0x8880104#define PM2R_LB_READ_FORMAT				0x8888105#define PM2R_LB_SOURCE_OFFSET				0x8890106#define PM2R_LB_WINDOW_BASE				0x88b8107#define PM2R_LB_WRITE_FORMAT				0x88c8108#define PM2R_STENCIL_MODE				0x8988109#define PM2R_DEPTH_MODE					0x89a0110#define PM2R_FB_READ_MODE				0x8a80111#define PM2R_FB_SOURCE_OFFSET				0x8a88112#define PM2R_FB_PIXEL_OFFSET				0x8a90113#define PM2R_FB_WINDOW_BASE				0x8ab0114#define PM2R_FB_WRITE_MODE				0x8ab8115#define PM2R_FB_HARD_WRITE_MASK				0x8ac0116#define PM2R_FB_BLOCK_COLOR				0x8ac8117#define PM2R_FB_READ_PIXEL				0x8ad0118#define PM2R_FILTER_MODE				0x8c00119#define PM2R_SYNC					0x8c40120#define PM2R_YUV_MODE					0x8f00121#define PM2R_STATISTICS_MODE				0x8c08122#define PM2R_FB_SOURCE_DELTA				0x8d88123#define PM2R_CONFIG					0x8d90124#define PM2R_DELTA_MODE					0x9300125 126/* Permedia2v */127#define PM2VR_RD_INDEX_LOW				0x4020128#define PM2VR_RD_INDEX_HIGH				0x4028129#define PM2VR_RD_INDEXED_DATA				0x4030130 131/* Permedia2 RAMDAC indexed registers */132#define PM2I_RD_CURSOR_CONTROL				0x06133#define PM2I_RD_COLOR_MODE				0x18134#define PM2I_RD_MODE_CONTROL				0x19135#define PM2I_RD_MISC_CONTROL				0x1e136#define PM2I_RD_PIXEL_CLOCK_A1				0x20137#define PM2I_RD_PIXEL_CLOCK_A2				0x21138#define PM2I_RD_PIXEL_CLOCK_A3				0x22139#define PM2I_RD_PIXEL_CLOCK_STATUS			0x29140#define PM2I_RD_MEMORY_CLOCK_1				0x30141#define PM2I_RD_MEMORY_CLOCK_2				0x31142#define PM2I_RD_MEMORY_CLOCK_3				0x32143#define PM2I_RD_MEMORY_CLOCK_STATUS			0x33144#define PM2I_RD_COLOR_KEY_CONTROL			0x40145#define PM2I_RD_OVERLAY_KEY				0x41146#define PM2I_RD_RED_KEY					0x42147#define PM2I_RD_GREEN_KEY				0x43148#define PM2I_RD_BLUE_KEY				0x44149 150/* Permedia2v extensions */151#define PM2VI_RD_MISC_CONTROL				0x000152#define PM2VI_RD_SYNC_CONTROL				0x001153#define PM2VI_RD_DAC_CONTROL				0x002154#define PM2VI_RD_PIXEL_SIZE				0x003155#define PM2VI_RD_COLOR_FORMAT				0x004156#define PM2VI_RD_CURSOR_MODE				0x005157#define PM2VI_RD_CURSOR_X_LOW				0x007158#define PM2VI_RD_CURSOR_X_HIGH				0x008159#define PM2VI_RD_CURSOR_Y_LOW				0x009160#define PM2VI_RD_CURSOR_Y_HIGH				0x00A161#define PM2VI_RD_CURSOR_X_HOT				0x00B162#define PM2VI_RD_CURSOR_Y_HOT				0x00C163#define PM2VI_RD_OVERLAY_KEY				0x00D164#define PM2VI_RD_CLK0_PRESCALE				0x201165#define PM2VI_RD_CLK0_FEEDBACK				0x202166#define PM2VI_RD_CLK0_POSTSCALE				0x203167#define PM2VI_RD_CLK1_PRESCALE				0x204168#define PM2VI_RD_CLK1_FEEDBACK				0x205169#define PM2VI_RD_CLK1_POSTSCALE				0x206170#define PM2VI_RD_MCLK_CONTROL				0x20D171#define PM2VI_RD_MCLK_PRESCALE				0x20E172#define PM2VI_RD_MCLK_FEEDBACK				0x20F173#define PM2VI_RD_MCLK_POSTSCALE				0x210174#define PM2VI_RD_CURSOR_PALETTE				0x303175#define PM2VI_RD_CURSOR_PATTERN				0x400176 177/* Fields and flags */178#define PM2F_RENDER_AREASTIPPLE				(1L<<0)179#define PM2F_RENDER_FASTFILL				(1L<<3)180#define PM2F_RENDER_PRIMITIVE_MASK			(3L<<6)181#define PM2F_RENDER_LINE				0182#define PM2F_RENDER_TRAPEZOID				(1L<<6)183#define PM2F_RENDER_POINT				(2L<<6)184#define PM2F_RENDER_RECTANGLE				(3L<<6)185#define PM2F_RENDER_SYNC_ON_BIT_MASK			(1L<<11)186#define PM2F_RENDER_TEXTURE_ENABLE			(1L<<13)187#define PM2F_SYNCHRONIZATION				(1L<<10)188#define PM2F_PLL_LOCKED					0x10189#define PM2F_BEING_RESET				(1L<<31)190#define PM2F_DATATYPE_COLOR				0x8000191#define PM2F_VGA_ENABLE					0x02192#define PM2F_VGA_FIXED					0x04193#define PM2F_FB_WRITE_ENABLE				0x01194#define PM2F_FB_READ_SOURCE_ENABLE			0x0200195#define PM2F_RD_PALETTE_WIDTH_8				0x02196#define PM2F_PART_PROD_MASK				0x01ff197#define PM2F_SCREEN_SCISSOR_ENABLE			0x02198#define PM2F_DATA_64_ENABLE				0x00010000199#define PM2F_BLANK_LOW					0x02200#define PM2F_HSYNC_MASK					0x18201#define PM2F_VSYNC_MASK					0x60202#define PM2F_HSYNC_ACT_HIGH				0x08203#define PM2F_HSYNC_FORCED_LOW				0x10204#define PM2F_HSYNC_ACT_LOW				0x18205#define PM2F_VSYNC_ACT_HIGH				0x20206#define PM2F_VSYNC_FORCED_LOW				0x40207#define PM2F_VSYNC_ACT_LOW				0x60208#define PM2F_LINE_DOUBLE				0x04209#define PM2F_VIDEO_ENABLE				0x01210#define PM2F_RD_PIXELFORMAT_SVGA			0x01211#define PM2F_RD_PIXELFORMAT_RGB232OFFSET		0x02212#define PM2F_RD_PIXELFORMAT_RGBA2321			0x03213#define PM2F_RD_PIXELFORMAT_RGBA5551			0x04214#define PM2F_RD_PIXELFORMAT_RGBA4444			0x05215#define PM2F_RD_PIXELFORMAT_RGB565			0x06216#define PM2F_RD_PIXELFORMAT_RGBA8888			0x08217#define PM2F_RD_PIXELFORMAT_RGB888			0x09218#define PM2F_RD_GUI_ACTIVE				0x10219#define PM2F_RD_COLOR_MODE_RGB				0x20220#define PM2F_DELTA_ORDER_RGB				(1L<<18)221#define PM2F_RD_TRUECOLOR				0x80222#define PM2F_NO_ALPHA_BUFFER				0x10223#define PM2F_TEXTEL_SIZE_16				0x00080000224#define PM2F_TEXTEL_SIZE_32				0x00100000225#define PM2F_TEXTEL_SIZE_4				0x00180000226#define PM2F_TEXTEL_SIZE_24				0x00200000227#define PM2F_INCREASE_X					(1L<<21)228#define PM2F_INCREASE_Y					(1L<<22)229#define PM2F_CONFIG_FB_WRITE_ENABLE			(1L<<3)230#define PM2F_CONFIG_FB_PACKED_DATA			(1L<<2)231#define PM2F_CONFIG_FB_READ_DEST_ENABLE			(1L<<1)232#define PM2F_CONFIG_FB_READ_SOURCE_ENABLE		(1L<<0)233#define PM2F_COLOR_KEY_TEST_OFF				(1L<<4)234#define PM2F_MEM_CONFIG_RAM_MASK			(3L<<29)235#define PM2F_MEM_BANKS_1				0L236#define PM2F_MEM_BANKS_2				(1L<<29)237#define PM2F_MEM_BANKS_3				(2L<<29)238#define PM2F_MEM_BANKS_4				(3L<<29)239#define PM2F_APERTURE_STANDARD				0240#define PM2F_APERTURE_BYTESWAP				1241#define PM2F_APERTURE_HALFWORDSWAP			2242#define PM2F_CURSORMODE_CURSOR_ENABLE			(1 << 0)243#define PM2F_CURSORMODE_TYPE_X				(1 << 4)244 245typedef enum {246	PM2_TYPE_PERMEDIA2,247	PM2_TYPE_PERMEDIA2V248} pm2type_t;249 250#endif /* PM2FB_H */251 252/*****************************************************************************253 * That's all folks!254 *****************************************************************************/255