linux/include/video/tdfx.h

/* 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
#define PCIINIT0
#define SIPMONITOR
#define LFBMEMORYCONFIG
#define MISCINIT0
#define MISCINIT1
#define DRAMINIT0
#define DRAMINIT1
#define AGPINIT
#define TMUGBEINIT
#define VGAINIT0
#define VGAINIT1
#define DRAMCOMMAND
#define DRAMDATA
/* reserved	0x38 */
/* reserved	0x3c */
#define PLLCTRL0
#define PLLCTRL1
#define PLLCTRL2
#define DACMODE
#define DACADDR
#define DACDATA
#define RGBMAXDELTA
#define VIDPROCCFG
#define HWCURPATADDR
#define HWCURLOC
#define HWCURC0
#define HWCURC1
#define VIDINFORMAT
#define VIDINSTATUS
#define VIDSERPARPORT
#define VIDINXDELTA
#define VIDININITERR
#define VIDINYDELTA
#define VIDPIXBUFTHOLD
#define VIDCHRMIN
#define VIDCHRMAX
#define VIDCURLIN
#define VIDSCREENSIZE
#define VIDOVRSTARTCRD
#define VIDOVRENDCRD
#define VIDOVRDUDX
#define VIDOVRDUDXOFF
#define VIDOVRDVDY
/* ... */
#define VIDOVRDVDYOFF
#define VIDDESKSTART
#define VIDDESKSTRIDE
#define VIDINADDR0
#define VIDINADDR1
#define VIDINADDR2
#define VIDINSTRIDE
#define VIDCUROVRSTART

#define INTCTRL
#define CLIP0MIN
#define CLIP0MAX
#define DSTBASE
#define DSTFORMAT
#define SRCBASE
#define COMMANDEXTRA_2D
#define CLIP1MIN
#define CLIP1MAX
#define SRCFORMAT
#define SRCSIZE
#define SRCXY
#define COLORBACK
#define COLORFORE
#define DSTSIZE
#define DSTXY
#define COMMAND_2D
#define LAUNCH_2D

#define COMMAND_3D

/* register bitfields (not all, only as needed) */

/* COMMAND_2D reg. values */
#define TDFX_ROP_COPY
#define TDFX_ROP_INVERT
#define TDFX_ROP_XOR

#define AUTOINC_DSTX
#define AUTOINC_DSTY
#define COMMAND_2D_FILLRECT
#define COMMAND_2D_S2S_BITBLT
#define COMMAND_2D_H2S_BITBLT

#define COMMAND_3D_NOP
#define STATUS_RETRACE
#define STATUS_BUSY
#define MISCINIT1_CLUT_INV
#define MISCINIT1_2DBLOCK_DIS
#define DRAMINIT0_SGRAM_NUM
#define DRAMINIT0_SGRAM_TYPE
#define DRAMINIT0_SGRAM_TYPE_MASK
#define DRAMINIT0_SGRAM_TYPE_SHIFT
#define DRAMINIT1_MEM_SDRAM
#define VGAINIT0_VGA_DISABLE
#define VGAINIT0_EXT_TIMING
#define VGAINIT0_8BIT_DAC
#define VGAINIT0_EXT_ENABLE
#define VGAINIT0_WAKEUP_3C3
#define VGAINIT0_LEGACY_DISABLE
#define VGAINIT0_ALT_READBACK
#define VGAINIT0_FAST_BLINK
#define VGAINIT0_EXTSHIFTOUT
#define VGAINIT0_DECODE_3C6
#define VGAINIT0_SGRAM_HBLANK_DISABLE
#define VGAINIT1_MASK
#define VIDCFG_VIDPROC_ENABLE
#define VIDCFG_CURS_X11
#define VIDCFG_INTERLACE
#define VIDCFG_HALF_MODE
#define VIDCFG_DESK_ENABLE
#define VIDCFG_CLUT_BYPASS
#define VIDCFG_2X
#define VIDCFG_HWCURSOR_ENABLE
#define VIDCFG_PIXFMT_SHIFT
#define DACMODE_2X

/* I2C bit locations in the VIDSERPARPORT register */
#define DDC_ENAB
#define DDC_SCL_OUT
#define DDC_SDA_OUT
#define DDC_SCL_IN
#define DDC_SDA_IN
#define I2C_ENAB
#define I2C_SCL_OUT
#define I2C_SDA_OUT
#define I2C_SCL_IN
#define I2C_SDA_IN

/* VGA rubbish, need to change this for multihead support */
#define MISC_W
#define MISC_R
#define SEQ_I
#define SEQ_D
#define CRT_I
#define CRT_D
#define ATT_IW
#define IS1_R
#define GRA_I
#define GRA_D

#ifdef __KERNEL__

struct banshee_reg {};

struct tdfx_par;

struct tdfxfb_i2c_chan {};

struct tdfx_par {};

#endif	/* __KERNEL__ */

#endif	/* _TDFX_H */