162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * include/video/gbe.h -- SGI GBE (Graphics Back End)
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 1999 Silicon Graphics, Inc. (Jeffrey Newquist)
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef __GBE_H__
962306a36Sopenharmony_ci#define __GBE_H__
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_cistruct sgi_gbe {
1262306a36Sopenharmony_ci	volatile uint32_t ctrlstat;	/* general control */
1362306a36Sopenharmony_ci	volatile uint32_t dotclock;	/* dot clock PLL control */
1462306a36Sopenharmony_ci	volatile uint32_t i2c;		/* crt I2C control */
1562306a36Sopenharmony_ci	volatile uint32_t sysclk;	/* system clock PLL control */
1662306a36Sopenharmony_ci	volatile uint32_t i2cfp;	/* flat panel I2C control */
1762306a36Sopenharmony_ci	volatile uint32_t id;		/* device id/chip revision */
1862306a36Sopenharmony_ci	volatile uint32_t config;       /* power on configuration [1] */
1962306a36Sopenharmony_ci	volatile uint32_t bist;         /* internal bist status [1] */
2062306a36Sopenharmony_ci	uint32_t _pad0[0x010000/4 - 8];
2162306a36Sopenharmony_ci	volatile uint32_t vt_xy;	/* current dot coords */
2262306a36Sopenharmony_ci	volatile uint32_t vt_xymax;	/* maximum dot coords */
2362306a36Sopenharmony_ci	volatile uint32_t vt_vsync;	/* vsync on/off */
2462306a36Sopenharmony_ci	volatile uint32_t vt_hsync;	/* hsync on/off */
2562306a36Sopenharmony_ci	volatile uint32_t vt_vblank;	/* vblank on/off */
2662306a36Sopenharmony_ci	volatile uint32_t vt_hblank;	/* hblank on/off */
2762306a36Sopenharmony_ci	volatile uint32_t vt_flags;	/* polarity of vt signals */
2862306a36Sopenharmony_ci	volatile uint32_t vt_f2rf_lock;	/* f2rf & framelck y coord */
2962306a36Sopenharmony_ci	volatile uint32_t vt_intr01;	/* intr 0,1 y coords */
3062306a36Sopenharmony_ci	volatile uint32_t vt_intr23;	/* intr 2,3 y coords */
3162306a36Sopenharmony_ci	volatile uint32_t fp_hdrv;	/* flat panel hdrv on/off */
3262306a36Sopenharmony_ci	volatile uint32_t fp_vdrv;	/* flat panel vdrv on/off */
3362306a36Sopenharmony_ci	volatile uint32_t fp_de;	/* flat panel de on/off */
3462306a36Sopenharmony_ci	volatile uint32_t vt_hpixen;	/* intrnl horiz pixel on/off */
3562306a36Sopenharmony_ci	volatile uint32_t vt_vpixen;	/* intrnl vert pixel on/off */
3662306a36Sopenharmony_ci	volatile uint32_t vt_hcmap;	/* cmap write (horiz) */
3762306a36Sopenharmony_ci	volatile uint32_t vt_vcmap;	/* cmap write (vert) */
3862306a36Sopenharmony_ci	volatile uint32_t did_start_xy;	/* eol/f did/xy reset val */
3962306a36Sopenharmony_ci	volatile uint32_t crs_start_xy;	/* eol/f crs/xy reset val */
4062306a36Sopenharmony_ci	volatile uint32_t vc_start_xy;	/* eol/f vc/xy reset val */
4162306a36Sopenharmony_ci	uint32_t _pad1[0xffb0/4];
4262306a36Sopenharmony_ci	volatile uint32_t ovr_width_tile;/*overlay plane ctrl 0 */
4362306a36Sopenharmony_ci	volatile uint32_t ovr_inhwctrl;	/* overlay plane ctrl 1 */
4462306a36Sopenharmony_ci	volatile uint32_t ovr_control;	/* overlay plane ctrl 1 */
4562306a36Sopenharmony_ci	uint32_t _pad2[0xfff4/4];
4662306a36Sopenharmony_ci	volatile uint32_t frm_size_tile;/* normal plane ctrl 0 */
4762306a36Sopenharmony_ci	volatile uint32_t frm_size_pixel;/*normal plane ctrl 1 */
4862306a36Sopenharmony_ci	volatile uint32_t frm_inhwctrl;	/* normal plane ctrl 2 */
4962306a36Sopenharmony_ci	volatile uint32_t frm_control;	/* normal plane ctrl 3 */
5062306a36Sopenharmony_ci	uint32_t _pad3[0xfff0/4];
5162306a36Sopenharmony_ci	volatile uint32_t did_inhwctrl;	/* DID control */
5262306a36Sopenharmony_ci	volatile uint32_t did_control;	/* DID shadow */
5362306a36Sopenharmony_ci	uint32_t _pad4[0x7ff8/4];
5462306a36Sopenharmony_ci	volatile uint32_t mode_regs[32];/* WID table */
5562306a36Sopenharmony_ci	uint32_t _pad5[0x7f80/4];
5662306a36Sopenharmony_ci	volatile uint32_t cmap[6144];	/* color map */
5762306a36Sopenharmony_ci	uint32_t _pad6[0x2000/4];
5862306a36Sopenharmony_ci	volatile uint32_t cm_fifo;	/* color map fifo status */
5962306a36Sopenharmony_ci	uint32_t _pad7[0x7ffc/4];
6062306a36Sopenharmony_ci	volatile uint32_t gmap[256];	/* gamma map */
6162306a36Sopenharmony_ci	uint32_t _pad8[0x7c00/4];
6262306a36Sopenharmony_ci	volatile uint32_t gmap10[1024];	/* gamma map */
6362306a36Sopenharmony_ci	uint32_t _pad9[0x7000/4];
6462306a36Sopenharmony_ci	volatile uint32_t crs_pos;	/* cusror control 0 */
6562306a36Sopenharmony_ci	volatile uint32_t crs_ctl;	/* cusror control 1 */
6662306a36Sopenharmony_ci	volatile uint32_t crs_cmap[3];	/* crs cmap */
6762306a36Sopenharmony_ci	uint32_t _pad10[0x7fec/4];
6862306a36Sopenharmony_ci	volatile uint32_t crs_glyph[64];/* crs glyph */
6962306a36Sopenharmony_ci	uint32_t _pad11[0x7f00/4];
7062306a36Sopenharmony_ci	volatile uint32_t vc_0;	/* video capture crtl 0 */
7162306a36Sopenharmony_ci	volatile uint32_t vc_1;	/* video capture crtl 1 */
7262306a36Sopenharmony_ci	volatile uint32_t vc_2;	/* video capture crtl 2 */
7362306a36Sopenharmony_ci	volatile uint32_t vc_3;	/* video capture crtl 3 */
7462306a36Sopenharmony_ci	volatile uint32_t vc_4;	/* video capture crtl 4 */
7562306a36Sopenharmony_ci	volatile uint32_t vc_5;	/* video capture crtl 5 */
7662306a36Sopenharmony_ci	volatile uint32_t vc_6;	/* video capture crtl 6 */
7762306a36Sopenharmony_ci	volatile uint32_t vc_7;	/* video capture crtl 7 */
7862306a36Sopenharmony_ci	volatile uint32_t vc_8;	/* video capture crtl 8 */
7962306a36Sopenharmony_ci};
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci#define MASK(msb, lsb)		\
8262306a36Sopenharmony_ci	( (((u32)1<<((msb)-(lsb)+1))-1) << (lsb) )
8362306a36Sopenharmony_ci#define GET(v, msb, lsb)	\
8462306a36Sopenharmony_ci	( ((u32)(v) & MASK(msb,lsb)) >> (lsb) )
8562306a36Sopenharmony_ci#define SET(v, f, msb, lsb)	\
8662306a36Sopenharmony_ci	( (v) = ((v)&~MASK(msb,lsb)) | (( (u32)(f)<<(lsb) ) & MASK(msb,lsb)) )
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci#define GET_GBE_FIELD(reg, field, v)		\
8962306a36Sopenharmony_ci	GET((v), GBE_##reg##_##field##_MSB, GBE_##reg##_##field##_LSB)
9062306a36Sopenharmony_ci#define SET_GBE_FIELD(reg, field, v, f)		\
9162306a36Sopenharmony_ci	SET((v), (f), GBE_##reg##_##field##_MSB, GBE_##reg##_##field##_LSB)
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci/*
9462306a36Sopenharmony_ci * Bit mask information
9562306a36Sopenharmony_ci */
9662306a36Sopenharmony_ci#define GBE_CTRLSTAT_CHIPID_MSB		 3
9762306a36Sopenharmony_ci#define GBE_CTRLSTAT_CHIPID_LSB		 0
9862306a36Sopenharmony_ci#define GBE_CTRLSTAT_SENSE_N_MSB	 4
9962306a36Sopenharmony_ci#define GBE_CTRLSTAT_SENSE_N_LSB	 4
10062306a36Sopenharmony_ci#define GBE_CTRLSTAT_PCLKSEL_MSB	29
10162306a36Sopenharmony_ci#define GBE_CTRLSTAT_PCLKSEL_LSB	28
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci#define GBE_DOTCLK_M_MSB		 7
10462306a36Sopenharmony_ci#define GBE_DOTCLK_M_LSB		 0
10562306a36Sopenharmony_ci#define GBE_DOTCLK_N_MSB		13
10662306a36Sopenharmony_ci#define GBE_DOTCLK_N_LSB		 8
10762306a36Sopenharmony_ci#define GBE_DOTCLK_P_MSB		15
10862306a36Sopenharmony_ci#define GBE_DOTCLK_P_LSB		14
10962306a36Sopenharmony_ci#define GBE_DOTCLK_RUN_MSB		20
11062306a36Sopenharmony_ci#define GBE_DOTCLK_RUN_LSB		20
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci#define GBE_VT_XY_Y_MSB		23
11362306a36Sopenharmony_ci#define GBE_VT_XY_Y_LSB		12
11462306a36Sopenharmony_ci#define GBE_VT_XY_X_MSB		11
11562306a36Sopenharmony_ci#define GBE_VT_XY_X_LSB		 0
11662306a36Sopenharmony_ci#define GBE_VT_XY_FREEZE_MSB		31
11762306a36Sopenharmony_ci#define GBE_VT_XY_FREEZE_LSB		31
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci#define GBE_FP_VDRV_ON_MSB	23
12062306a36Sopenharmony_ci#define GBE_FP_VDRV_ON_LSB	12
12162306a36Sopenharmony_ci#define GBE_FP_VDRV_OFF_MSB	11
12262306a36Sopenharmony_ci#define GBE_FP_VDRV_OFF_LSB	0
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci#define GBE_FP_HDRV_ON_MSB	23
12562306a36Sopenharmony_ci#define GBE_FP_HDRV_ON_LSB	12
12662306a36Sopenharmony_ci#define GBE_FP_HDRV_OFF_MSB	11
12762306a36Sopenharmony_ci#define GBE_FP_HDRV_OFF_LSB	0
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci#define GBE_FP_DE_ON_MSB		23
13062306a36Sopenharmony_ci#define GBE_FP_DE_ON_LSB		12
13162306a36Sopenharmony_ci#define GBE_FP_DE_OFF_MSB		11
13262306a36Sopenharmony_ci#define GBE_FP_DE_OFF_LSB		0
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci#define GBE_VT_VSYNC_VSYNC_ON_MSB	23
13562306a36Sopenharmony_ci#define GBE_VT_VSYNC_VSYNC_ON_LSB	12
13662306a36Sopenharmony_ci#define GBE_VT_VSYNC_VSYNC_OFF_MSB	11
13762306a36Sopenharmony_ci#define GBE_VT_VSYNC_VSYNC_OFF_LSB	 0
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci#define GBE_VT_HSYNC_HSYNC_ON_MSB	23
14062306a36Sopenharmony_ci#define GBE_VT_HSYNC_HSYNC_ON_LSB	12
14162306a36Sopenharmony_ci#define GBE_VT_HSYNC_HSYNC_OFF_MSB	11
14262306a36Sopenharmony_ci#define GBE_VT_HSYNC_HSYNC_OFF_LSB	 0
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci#define GBE_VT_VBLANK_VBLANK_ON_MSB	23
14562306a36Sopenharmony_ci#define GBE_VT_VBLANK_VBLANK_ON_LSB	12
14662306a36Sopenharmony_ci#define GBE_VT_VBLANK_VBLANK_OFF_MSB	11
14762306a36Sopenharmony_ci#define GBE_VT_VBLANK_VBLANK_OFF_LSB	 0
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci#define GBE_VT_HBLANK_HBLANK_ON_MSB	23
15062306a36Sopenharmony_ci#define GBE_VT_HBLANK_HBLANK_ON_LSB	12
15162306a36Sopenharmony_ci#define GBE_VT_HBLANK_HBLANK_OFF_MSB	11
15262306a36Sopenharmony_ci#define GBE_VT_HBLANK_HBLANK_OFF_LSB	 0
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci#define GBE_VT_FLAGS_F2RF_HIGH_MSB	 6
15562306a36Sopenharmony_ci#define GBE_VT_FLAGS_F2RF_HIGH_LSB	 6
15662306a36Sopenharmony_ci#define GBE_VT_FLAGS_SYNC_LOW_MSB	 5
15762306a36Sopenharmony_ci#define GBE_VT_FLAGS_SYNC_LOW_LSB	 5
15862306a36Sopenharmony_ci#define GBE_VT_FLAGS_SYNC_HIGH_MSB	 4
15962306a36Sopenharmony_ci#define GBE_VT_FLAGS_SYNC_HIGH_LSB	 4
16062306a36Sopenharmony_ci#define GBE_VT_FLAGS_HDRV_LOW_MSB	 3
16162306a36Sopenharmony_ci#define GBE_VT_FLAGS_HDRV_LOW_LSB	 3
16262306a36Sopenharmony_ci#define GBE_VT_FLAGS_HDRV_INVERT_MSB	 2
16362306a36Sopenharmony_ci#define GBE_VT_FLAGS_HDRV_INVERT_LSB	 2
16462306a36Sopenharmony_ci#define GBE_VT_FLAGS_VDRV_LOW_MSB	 1
16562306a36Sopenharmony_ci#define GBE_VT_FLAGS_VDRV_LOW_LSB	 1
16662306a36Sopenharmony_ci#define GBE_VT_FLAGS_VDRV_INVERT_MSB	 0
16762306a36Sopenharmony_ci#define GBE_VT_FLAGS_VDRV_INVERT_LSB	 0
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ci#define GBE_VT_VCMAP_VCMAP_ON_MSB	23
17062306a36Sopenharmony_ci#define GBE_VT_VCMAP_VCMAP_ON_LSB	12
17162306a36Sopenharmony_ci#define GBE_VT_VCMAP_VCMAP_OFF_MSB	11
17262306a36Sopenharmony_ci#define GBE_VT_VCMAP_VCMAP_OFF_LSB	 0
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ci#define GBE_VT_HCMAP_HCMAP_ON_MSB	23
17562306a36Sopenharmony_ci#define GBE_VT_HCMAP_HCMAP_ON_LSB	12
17662306a36Sopenharmony_ci#define GBE_VT_HCMAP_HCMAP_OFF_MSB	11
17762306a36Sopenharmony_ci#define GBE_VT_HCMAP_HCMAP_OFF_LSB	 0
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci#define GBE_VT_XYMAX_MAXX_MSB	11
18062306a36Sopenharmony_ci#define GBE_VT_XYMAX_MAXX_LSB	 0
18162306a36Sopenharmony_ci#define GBE_VT_XYMAX_MAXY_MSB	23
18262306a36Sopenharmony_ci#define GBE_VT_XYMAX_MAXY_LSB	12
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci#define GBE_VT_HPIXEN_HPIXEN_ON_MSB	23
18562306a36Sopenharmony_ci#define GBE_VT_HPIXEN_HPIXEN_ON_LSB	12
18662306a36Sopenharmony_ci#define GBE_VT_HPIXEN_HPIXEN_OFF_MSB	11
18762306a36Sopenharmony_ci#define GBE_VT_HPIXEN_HPIXEN_OFF_LSB	 0
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ci#define GBE_VT_VPIXEN_VPIXEN_ON_MSB	23
19062306a36Sopenharmony_ci#define GBE_VT_VPIXEN_VPIXEN_ON_LSB	12
19162306a36Sopenharmony_ci#define GBE_VT_VPIXEN_VPIXEN_OFF_MSB	11
19262306a36Sopenharmony_ci#define GBE_VT_VPIXEN_VPIXEN_OFF_LSB	 0
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci#define GBE_OVR_CONTROL_OVR_DMA_ENABLE_MSB	 0
19562306a36Sopenharmony_ci#define GBE_OVR_CONTROL_OVR_DMA_ENABLE_LSB	 0
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci#define GBE_OVR_INHWCTRL_OVR_DMA_ENABLE_MSB	 0
19862306a36Sopenharmony_ci#define GBE_OVR_INHWCTRL_OVR_DMA_ENABLE_LSB	 0
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ci#define GBE_OVR_WIDTH_TILE_OVR_FIFO_RESET_MSB	13
20162306a36Sopenharmony_ci#define GBE_OVR_WIDTH_TILE_OVR_FIFO_RESET_LSB	13
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_DMA_ENABLE_MSB	 0
20462306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_DMA_ENABLE_LSB	 0
20562306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_TILE_PTR_MSB	31
20662306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_TILE_PTR_LSB	 9
20762306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_LINEAR_MSB		 1
20862306a36Sopenharmony_ci#define GBE_FRM_CONTROL_FRM_LINEAR_LSB		 1
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci#define GBE_FRM_INHWCTRL_FRM_DMA_ENABLE_MSB	 0
21162306a36Sopenharmony_ci#define GBE_FRM_INHWCTRL_FRM_DMA_ENABLE_LSB	 0
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_WIDTH_TILE_MSB	12
21462306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_WIDTH_TILE_LSB	 5
21562306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_RHS_MSB		 4
21662306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_RHS_LSB		 0
21762306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_DEPTH_MSB		14
21862306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_DEPTH_LSB		13
21962306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_FIFO_RESET_MSB	15
22062306a36Sopenharmony_ci#define GBE_FRM_SIZE_TILE_FRM_FIFO_RESET_LSB	15
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci#define GBE_FRM_SIZE_PIXEL_FB_HEIGHT_PIX_MSB	31
22362306a36Sopenharmony_ci#define GBE_FRM_SIZE_PIXEL_FB_HEIGHT_PIX_LSB	16
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ci#define GBE_DID_CONTROL_DID_DMA_ENABLE_MSB	 0
22662306a36Sopenharmony_ci#define GBE_DID_CONTROL_DID_DMA_ENABLE_LSB	 0
22762306a36Sopenharmony_ci#define GBE_DID_INHWCTRL_DID_DMA_ENABLE_MSB	 0
22862306a36Sopenharmony_ci#define GBE_DID_INHWCTRL_DID_DMA_ENABLE_LSB	 0
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ci#define GBE_DID_START_XY_DID_STARTY_MSB		23
23162306a36Sopenharmony_ci#define GBE_DID_START_XY_DID_STARTY_LSB		12
23262306a36Sopenharmony_ci#define GBE_DID_START_XY_DID_STARTX_MSB		11
23362306a36Sopenharmony_ci#define GBE_DID_START_XY_DID_STARTX_LSB		 0
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci#define GBE_CRS_START_XY_CRS_STARTY_MSB		23
23662306a36Sopenharmony_ci#define GBE_CRS_START_XY_CRS_STARTY_LSB		12
23762306a36Sopenharmony_ci#define GBE_CRS_START_XY_CRS_STARTX_MSB		11
23862306a36Sopenharmony_ci#define GBE_CRS_START_XY_CRS_STARTX_LSB		 0
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci#define GBE_WID_AUX_MSB		12
24162306a36Sopenharmony_ci#define GBE_WID_AUX_LSB		11
24262306a36Sopenharmony_ci#define GBE_WID_GAMMA_MSB	10
24362306a36Sopenharmony_ci#define GBE_WID_GAMMA_LSB	10
24462306a36Sopenharmony_ci#define GBE_WID_CM_MSB		 9
24562306a36Sopenharmony_ci#define GBE_WID_CM_LSB		 5
24662306a36Sopenharmony_ci#define GBE_WID_TYP_MSB		 4
24762306a36Sopenharmony_ci#define GBE_WID_TYP_LSB		 2
24862306a36Sopenharmony_ci#define GBE_WID_BUF_MSB		 1
24962306a36Sopenharmony_ci#define GBE_WID_BUF_LSB		 0
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ci#define GBE_VC_START_XY_VC_STARTY_MSB	23
25262306a36Sopenharmony_ci#define GBE_VC_START_XY_VC_STARTY_LSB	12
25362306a36Sopenharmony_ci#define GBE_VC_START_XY_VC_STARTX_MSB	11
25462306a36Sopenharmony_ci#define GBE_VC_START_XY_VC_STARTX_LSB	 0
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ci/* Constants */
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci#define GBE_FRM_DEPTH_8		0
25962306a36Sopenharmony_ci#define GBE_FRM_DEPTH_16	1
26062306a36Sopenharmony_ci#define GBE_FRM_DEPTH_32	2
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci#define GBE_CMODE_I8		0
26362306a36Sopenharmony_ci#define GBE_CMODE_I12		1
26462306a36Sopenharmony_ci#define GBE_CMODE_RG3B2		2
26562306a36Sopenharmony_ci#define GBE_CMODE_RGB4		3
26662306a36Sopenharmony_ci#define GBE_CMODE_ARGB5		4
26762306a36Sopenharmony_ci#define GBE_CMODE_RGB8		5
26862306a36Sopenharmony_ci#define GBE_CMODE_RGBA5		6
26962306a36Sopenharmony_ci#define GBE_CMODE_RGB10		7
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ci#define GBE_BMODE_BOTH		3
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ci#define GBE_CRS_MAGIC		54
27462306a36Sopenharmony_ci#define GBE_PIXEN_MAGIC_ON	19
27562306a36Sopenharmony_ci#define GBE_PIXEN_MAGIC_OFF	 2
27662306a36Sopenharmony_ci
27762306a36Sopenharmony_ci#define GBE_TLB_SIZE		128
27862306a36Sopenharmony_ci
27962306a36Sopenharmony_ci/* [1] - only GBE revision 2 and later */
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci/*
28262306a36Sopenharmony_ci * Video Timing Data Structure
28362306a36Sopenharmony_ci */
28462306a36Sopenharmony_ci
28562306a36Sopenharmony_cistruct gbe_timing_info {
28662306a36Sopenharmony_ci	int flags;
28762306a36Sopenharmony_ci	short width;		/* Monitor resolution */
28862306a36Sopenharmony_ci	short height;
28962306a36Sopenharmony_ci	int fields_sec;		/* fields/sec  (Hz -3 dec. places */
29062306a36Sopenharmony_ci	int cfreq;		/* pixel clock frequency (MHz -3 dec. places) */
29162306a36Sopenharmony_ci	short htotal;		/* Horizontal total pixels */
29262306a36Sopenharmony_ci	short hblank_start;	/* Horizontal blank start */
29362306a36Sopenharmony_ci	short hblank_end;	/* Horizontal blank end */
29462306a36Sopenharmony_ci	short hsync_start;	/* Horizontal sync start */
29562306a36Sopenharmony_ci	short hsync_end;	/* Horizontal sync end */
29662306a36Sopenharmony_ci	short vtotal;		/* Vertical total lines */
29762306a36Sopenharmony_ci	short vblank_start;	/* Vertical blank start */
29862306a36Sopenharmony_ci	short vblank_end;	/* Vertical blank end */
29962306a36Sopenharmony_ci	short vsync_start;	/* Vertical sync start */
30062306a36Sopenharmony_ci	short vsync_end;	/* Vertical sync end */
30162306a36Sopenharmony_ci	short pll_m;		/* PLL M parameter */
30262306a36Sopenharmony_ci	short pll_n;		/* PLL P parameter */
30362306a36Sopenharmony_ci	short pll_p;		/* PLL N parameter */
30462306a36Sopenharmony_ci};
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci/* Defines for gbe_vof_info_t flags */
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ci#define GBE_VOF_UNKNOWNMON	1
30962306a36Sopenharmony_ci#define GBE_VOF_STEREO		2
31062306a36Sopenharmony_ci#define GBE_VOF_DO_GENSYNC	4	/* enable incoming sync */
31162306a36Sopenharmony_ci#define GBE_VOF_SYNC_ON_GREEN	8	/* sync on green */
31262306a36Sopenharmony_ci#define GBE_VOF_FLATPANEL	0x1000	/* FLATPANEL Timing */
31362306a36Sopenharmony_ci#define GBE_VOF_MAGICKEY	0x2000	/* Backdoor key */
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ci#endif		/* ! __GBE_H__ */
316