Module Name: src Committed By: macallan Date: Thu Feb 2 07:09:53 UTC 2012
Modified Files: src/sys/dev/pci: pm2reg.h Log Message: add a bunch of register definitions not used yet but I better commit them now than have he tell me that I forgot them when pm2fb.c starts using them To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/pm2reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/pm2reg.h diff -u src/sys/dev/pci/pm2reg.h:1.5 src/sys/dev/pci/pm2reg.h:1.6 --- src/sys/dev/pci/pm2reg.h:1.5 Thu Nov 24 03:23:08 2011 +++ src/sys/dev/pci/pm2reg.h Thu Feb 2 07:09:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pm2reg.h,v 1.5 2011/11/24 03:23:08 macallan Exp $ */ +/* $NetBSD: pm2reg.h,v 1.6 2012/02/02 07:09:53 macallan Exp $ */ /* * Copyright (c) 2009 Michael Lorenz @@ -39,6 +39,13 @@ #define PM2_INPUT_FIFO_SPACE 0x00000018 #define PM2_OUTPUT_FIFO_WORDS 0x00000020 +#define PM2_VCLKCTL 0x00000040 +#define VCC_CLOCK_A 0x00000000 +#define VCC_CLOCK_B 0x00000001 +#define VCC_CLOCK_C 0x00000002 +/* PCI clocks to wait between RAMDAC accesses */ +#define VCC_RAMDAC_WAIT_MASK 0x000003fc + #define PM2_APERTURE1_CONTROL 0x00000050 #define PM2_APERTURE2_CONTROL 0x00000058 #define PM2_AP_BYTESWAP 0x00000001 @@ -60,6 +67,38 @@ #define PM2_SCREEN_BASE 0x00003000 /* in 64bit units */ #define PM2_SCREEN_STRIDE 0x00003008 /* in 64bit units */ +#define PM2_HTOTAL 0x00003010 +#define PM2_HGATE_END 0x00003018 +#define PM2_HBLANK_END 0x00003020 +#define PM2_HSYNC_START 0x00003028 +#define PM2_HSYNC_END 0x00003030 +#define PM2_VTOTAL 0x00003038 +#define PM2_VBLANK_END 0x00003040 +#define PM2_VSYNC_START 0x00003048 +#define PM2_VSYNC_END 0x00003050 +#define PM2_VIDEO_CONTROL 0x00003058 +#define PM2_VC_VIDEO_ENABLE 0x00000001 +#define PM2_VC_BLANK_ACR_LOW 0x00000002 +#define PM2_VC_LINE_DOUBLE 0x00000004 +#define PM2_VC_HSYNC_FORCE_H 0x00000000 +#define PM2_VC_HSYNC_ACT_HIGH 0x00000008 +#define PM2_VC_HSYNC_FORCE_L 0x00000010 +#define PM2_VC_HSYNC_ACT_LOW 0x00000018 +#define PM2_VC_VSYNC_FORCE_H 0x00000000 +#define PM2_VC_VSYNC_ACT_HIGH 0x00000020 +#define PM2_VC_VSYNC_FORCE_L 0x00000040 +#define PM2_VC_VSYNC_ACT_LOW 0x00000060 +#define PM2_VC_BP_BASE_PENDING 0x00000080 +#define PM2_VC_RE_BASE_PENDING 0x00000100 +#define PM2_VC_SWAP_SYNC_BLANK 0x00000000 +#define PM2_VC_SWAP_FREERUNNING 0x00000200 +#define PM2_VC_SWAP_LIMIT_FR 0x00000400 +#define PM2_VC_STEREO_ENABLE 0x00000800 +#define PM2_VC_RIGHT_EYE_ACT_L 0x00001000 +#define PM2_VC_DISP_RIGHT_FRAME 0x00002000 /* RO, left otherwise */ +#define PM2_VC_BP_RIGHT_PENDING 0x00004000 +#define PM2_VC_RE_RIGHT_PENDING 0x00008000 +#define PM2_VC_RAMDAC_64BIT 0x00010000 /* 32bit otherwise */ #define PM2_DISPLAY_DATA 0x00003068 #define PM2_DD_SDA_IN 0x00000001 @@ -79,9 +118,16 @@ #define PM2_DAC_PAL_WRITE_IDX 0x00004000 #define PM2_DAC_DATA 0x00004008 #define PM2_DAC_MASK 0x00004010 -#define PM2_DAC_PAL_READ 0x00004018 +#define PM2_DAC_PAL_READ_IDX 0x00004018 +/* these are different on PM2V: */ #define PM2_DAC_CURSOR_PAL 0x00004020 #define PM2_DAC_CURSOR_DATA 0x00004028 +/* here we go: */ +#define PM2V_DAC_INDEX_LOW 0x00004020 +#define PM2V_DAC_INDEX_HIGH 0x00004028 +#define PM2V_DAC_INDEX_DATA 0x00004030 +#define PM2V_DAC_INDEX_CONTROL 0x00004038 + #define PM2_DAC_INDEX_DATA 0x00004050 #define PM2_DAC_CURSOR_RAM 0x00004058 #define PM2_DAC_CURSOR_X_LOW 0x00004060 @@ -89,6 +135,78 @@ #define PM2_DAC_CURSOR_Y_LOW 0x00004070 #define PM2_DAC_CURSOR_Y_HIGH 0x00004078 +/* RAMDAC registers ( through INDEX_DATA */ +#define PM2_DAC_COLOR_MODE 0x18 +#define CM_PALETTE 0x00 +#define CM_RGB332 0x01 +#define CM_RGB232OFFSET 0x02 +#define CM_RGBA2321 0x03 +#define CM_RGBA5551 0x04 +#define CM_RGBA4444 0x05 +#define CM_RGB565 0x06 +#define CM_RGBA8888 0x08 +#define CM_RGB888 0x09 +#define CM_GUI_DISABLE 0x10 +#define CM_RGB 0x20 /* BGR otherwise */ +#define CM_TRUECOLOR 0x80 /* use palette for gamma correction */ + +#define PM2_DAC_MISC_CONTROL 0x1e +#define MC_POWERDOWN 0x01 +#define MC_PALETTE_8BIT 0x02 /* 6bit otherwise */ +#define MC_HSYNC_INV 0x04 +#define MC_VSYNC_INV 0x08 +#define MC_SYNCONGREEN 0x10 +#define PM2_DAC_PIXELCLKA_M 0x20 +#define PM2_DAC_PIXELCLKA_N 0x21 +#define PM2_DAC_PIXELCLKA_P 0x22 +#define PCLK_ENABLE 0x08 +#define PM2_DAC_PIXELCLKB_M 0x23 +#define PM2_DAC_PIXELCLKB_N 0x24 +#define PM2_DAC_PIXELCLKB_P 0x25 +#define PM2_DAC_PIXELCLKC_M 0x26 +#define PM2_DAC_PIXELCLKC_N 0x27 +#define PM2_DAC_PIXELCLKC_P 0x28 +#define PM2_DAC_PIXELCLK_STATUS 0x29 +#define PCLK_LOCKED 0x10 +#define PM2_DAC_MEMCLK_M 0x30 +#define PM2_DAC_MEMCLK_N 0x31 +#define PM2_DAC_MEMCLK_P 0x32 +#define PM2_DAC_MEMCLK_STATUS 0x33 + +/* PM2V RAMDAC */ +#define PM2V_DAC_MISC_CONTROL 0x000 +#define PM2V_DAC_8BIT 0x01 /* 6bit otherwise */ +#define PM2V_DAC_BYPASS_CLUT 0x08 /* ??? guess from xorg */ +#define PM2V_DAC_8_24_OVERLAY 0x10 /* ??? guess from xorg */ +#define PM2V_DAC_SYNC_CONTROL 0x001 +#define PM2V_DAC_HSYNC_INV 0x01 +#define PM2V_DAC_VSYNC_INV 0x08 +#define PM2V_DAC_CONTROL 0x002 +#define PM2V_DAC_PIXEL_SIZE 0x003 +#define PM2V_PS_8BIT 0x00 +#define PM2V_PS_16BIT 0x01 +#define PM2V_PS_32BIT 0x02 +#define PM2V_PS_24BIT 0x04 +#define PM2V_DAC_COLOR_FORMAT 0x004 +#define PM2V_DAC_PALETTE 0x2e +#define PM2V_DAC_RGB555 0x61 +#define PM2V_DAC_RGB565 0x70 +#define PM2V_DAC_RGB888 0x60 +#define PM2V_DAC_RGBA8888 0x20 + +#define PM2V_DAC_CHECK_CONTROL 0x018 +#define PM2V_DAC_CLOCK_CONTROL 0x200 +#define PM2V_DAC_CLOCK_A_M 0x201 +#define PM2V_DAC_CLOCK_A_N 0x202 +#define PM2V_DAC_CLOCK_A_P 0x203 +#define PM2V_DAC_CLOCK_B_M 0x204 +#define PM2V_DAC_CLOCK_B_N 0x205 +#define PM2V_DAC_CLOCK_B_P 0x206 +#define PM2V_DAC_MCLK_CONTROL 0x20D +#define PM2V_DAC_MCLK_M 0x20E +#define PM2V_DAC_MCLK_N 0x20F +#define PM2V_DAC_MCLK_P 0x210 + /* drawing engine */ #define PM2_RE_STARTXDOM 0x00008000 #define PM2_RE_DXDOM 0x00008008