/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TDFX_H
#define _TDFX_H
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
/* membase0 register offsets */
#define STATUS 0 x00
#define PCIINIT0 0 x04
#define SIPMONITOR 0 x08
#define LFBMEMORYCONFIG 0 x0c
#define MISCINIT0 0 x10
#define MISCINIT1 0 x14
#define DRAMINIT0 0 x18
#define DRAMINIT1 0 x1c
#define AGPINIT 0 x20
#define TMUGBEINIT 0 x24
#define VGAINIT0 0 x28
#define VGAINIT1 0 x2c
#define DRAMCOMMAND 0 x30
#define DRAMDATA 0 x34
/* reserved 0x38 */
/* reserved 0x3c */
#define PLLCTRL0 0 x40
#define PLLCTRL1 0 x44
#define PLLCTRL2 0 x48
#define DACMODE 0 x4c
#define DACADDR 0 x50
#define DACDATA 0 x54
#define RGBMAXDELTA 0 x58
#define VIDPROCCFG 0 x5c
#define HWCURPATADDR 0 x60
#define HWCURLOC 0 x64
#define HWCURC0 0 x68
#define HWCURC1 0 x6c
#define VIDINFORMAT 0 x70
#define VIDINSTATUS 0 x74
#define VIDSERPARPORT 0 x78
#define VIDINXDELTA 0 x7c
#define VIDININITERR 0 x80
#define VIDINYDELTA 0 x84
#define VIDPIXBUFTHOLD 0 x88
#define VIDCHRMIN 0 x8c
#define VIDCHRMAX 0 x90
#define VIDCURLIN 0 x94
#define VIDSCREENSIZE 0 x98
#define VIDOVRSTARTCRD 0 x9c
#define VIDOVRENDCRD 0 xa0
#define VIDOVRDUDX 0 xa4
#define VIDOVRDUDXOFF 0 xa8
#define VIDOVRDVDY 0 xac
/* ... */
#define VIDOVRDVDYOFF 0 xe0
#define VIDDESKSTART 0 xe4
#define VIDDESKSTRIDE 0 xe8
#define VIDINADDR0 0 xec
#define VIDINADDR1 0 xf0
#define VIDINADDR2 0 xf4
#define VIDINSTRIDE 0 xf8
#define VIDCUROVRSTART 0 xfc
#define INTCTRL (0 x00100000 + 0 x04)
#define CLIP0MIN (0 x00100000 + 0 x08)
#define CLIP0MAX (0 x00100000 + 0 x0c)
#define DSTBASE (0 x00100000 + 0 x10)
#define DSTFORMAT (0 x00100000 + 0 x14)
#define SRCBASE (0 x00100000 + 0 x34)
#define COMMANDEXTRA_2D (0 x00100000 + 0 x38)
#define CLIP1MIN (0 x00100000 + 0 x4c)
#define CLIP1MAX (0 x00100000 + 0 x50)
#define SRCFORMAT (0 x00100000 + 0 x54)
#define SRCSIZE (0 x00100000 + 0 x58)
#define SRCXY (0 x00100000 + 0 x5c)
#define COLORBACK (0 x00100000 + 0 x60)
#define COLORFORE (0 x00100000 + 0 x64)
#define DSTSIZE (0 x00100000 + 0 x68)
#define DSTXY (0 x00100000 + 0 x6c)
#define COMMAND_2D (0 x00100000 + 0 x70)
#define LAUNCH_2D (0 x00100000 + 0 x80)
#define COMMAND_3D (0 x00200000 + 0 x120)
/* register bitfields (not all, only as needed) */
/* COMMAND_2D reg. values */
#define TDFX_ROP_COPY 0 xcc /* src */
#define TDFX_ROP_INVERT 0 x55 /* NOT dst */
#define TDFX_ROP_XOR 0 x66 /* src XOR dst */
#define AUTOINC_DSTX BIT(10 )
#define AUTOINC_DSTY BIT(11 )
#define COMMAND_2D_FILLRECT 0 x05
#define COMMAND_2D_S2S_BITBLT 0 x01 /* screen to screen */
#define COMMAND_2D_H2S_BITBLT 0 x03 /* host to screen */
#define COMMAND_3D_NOP 0 x00
#define STATUS_RETRACE BIT(6 )
#define STATUS_BUSY BIT(9 )
#define MISCINIT1_CLUT_INV BIT(0 )
#define MISCINIT1_2DBLOCK_DIS BIT(15 )
#define DRAMINIT0_SGRAM_NUM BIT(26 )
#define DRAMINIT0_SGRAM_TYPE BIT(27 )
#define DRAMINIT0_SGRAM_TYPE_MASK (BIT(27 ) | BIT(28 ) | BIT(29 ))
#define DRAMINIT0_SGRAM_TYPE_SHIFT 27
#define DRAMINIT1_MEM_SDRAM BIT(30 )
#define VGAINIT0_VGA_DISABLE BIT(0 )
#define VGAINIT0_EXT_TIMING BIT(1 )
#define VGAINIT0_8BIT_DAC BIT(2 )
#define VGAINIT0_EXT_ENABLE BIT(6 )
#define VGAINIT0_WAKEUP_3C3 BIT(8 )
#define VGAINIT0_LEGACY_DISABLE BIT(9 )
#define VGAINIT0_ALT_READBACK BIT(10 )
#define VGAINIT0_FAST_BLINK BIT(11 )
#define VGAINIT0_EXTSHIFTOUT BIT(12 )
#define VGAINIT0_DECODE_3C6 BIT(13 )
#define VGAINIT0_SGRAM_HBLANK_DISABLE BIT(22 )
#define VGAINIT1_MASK 0 x1fffff
#define VIDCFG_VIDPROC_ENABLE BIT(0 )
#define VIDCFG_CURS_X11 BIT(1 )
#define VIDCFG_INTERLACE BIT(3 )
#define VIDCFG_HALF_MODE BIT(4 )
#define VIDCFG_DESK_ENABLE BIT(7 )
#define VIDCFG_CLUT_BYPASS BIT(10 )
#define VIDCFG_2X BIT(26 )
#define VIDCFG_HWCURSOR_ENABLE BIT(27 )
#define VIDCFG_PIXFMT_SHIFT 18
#define DACMODE_2X BIT(0 )
/* I2C bit locations in the VIDSERPARPORT register */
#define DDC_ENAB 0 x00040000
#define DDC_SCL_OUT 0 x00080000
#define DDC_SDA_OUT 0 x00100000
#define DDC_SCL_IN 0 x00200000
#define DDC_SDA_IN 0 x00400000
#define I2C_ENAB 0 x00800000
#define I2C_SCL_OUT 0 x01000000
#define I2C_SDA_OUT 0 x02000000
#define I2C_SCL_IN 0 x04000000
#define I2C_SDA_IN 0 x08000000
/* VGA rubbish, need to change this for multihead support */
#define MISC_W 0 x3c2
#define MISC_R 0 x3cc
#define SEQ_I 0 x3c4
#define SEQ_D 0 x3c5
#define CRT_I 0 x3d4
#define CRT_D 0 x3d5
#define ATT_IW 0 x3c0
#define IS1_R 0 x3da
#define GRA_I 0 x3ce
#define GRA_D 0 x3cf
#ifdef __KERNEL__
struct banshee_reg {
/* VGA rubbish */
unsigned char att[21 ];
unsigned char crt[25 ];
unsigned char gra[9 ];
unsigned char misc[1 ];
unsigned char seq[5 ];
/* Banshee extensions */
unsigned char ext[2 ];
unsigned long vidcfg;
unsigned long vidpll;
unsigned long mempll;
unsigned long gfxpll;
unsigned long dacmode;
unsigned long vgainit0;
unsigned long vgainit1;
unsigned long screensize;
unsigned long stride;
unsigned long cursloc;
unsigned long curspataddr;
unsigned long cursc0;
unsigned long cursc1;
unsigned long startaddr;
unsigned long clip0min;
unsigned long clip0max;
unsigned long clip1min;
unsigned long clip1max;
unsigned long miscinit0;
};
struct tdfx_par;
struct tdfxfb_i2c_chan {
struct tdfx_par *par;
struct i2c_adapter adapter;
struct i2c_algo_bit_data algo;
};
struct tdfx_par {
u32 max_pixclock;
u32 palette[16 ];
void __iomem *regbase_virt;
unsigned long iobase;
int wc_cookie;
#ifdef CONFIG_FB_3DFX_I2C
struct tdfxfb_i2c_chan chan[2 ];
#endif
};
#endif /* __KERNEL__ */
#endif /* _TDFX_H */
Messung V0.5 in Prozent C=96 H=95 G=95
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-08)
¤
*© Formatika GbR, Deutschland