18c2ecf20Sopenharmony_ci/* $XConsortium: nvreg.h /main/2 1996/10/28 05:13:41 kaleb $ */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 1996-1997  David J. McKay
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
68c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
78c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation
88c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
98c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
108c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in
138c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software.
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
168c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
178c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
188c2ecf20Sopenharmony_ci * DAVID J. MCKAY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
198c2ecf20Sopenharmony_ci * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
208c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
218c2ecf20Sopenharmony_ci * SOFTWARE.
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nvreg.h,v 1.6 2002/01/25 21:56:06 tsi Exp $ */
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#ifndef __NVREG_H_
278c2ecf20Sopenharmony_ci#define __NVREG_H_
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#define NV_PMC_OFFSET               0x00000000
308c2ecf20Sopenharmony_ci#define NV_PMC_SIZE                 0x00001000
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#define NV_PBUS_OFFSET              0x00001000
338c2ecf20Sopenharmony_ci#define NV_PBUS_SIZE                0x00001000
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#define NV_PFIFO_OFFSET             0x00002000
368c2ecf20Sopenharmony_ci#define NV_PFIFO_SIZE               0x00002000
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#define NV_HDIAG_OFFSET             0x00005000
398c2ecf20Sopenharmony_ci#define NV_HDIAG_SIZE               0x00001000
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#define NV_PRAM_OFFSET              0x00006000
428c2ecf20Sopenharmony_ci#define NV_PRAM_SIZE                0x00001000
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#define NV_PVIDEO_OFFSET            0x00008000
458c2ecf20Sopenharmony_ci#define NV_PVIDEO_SIZE              0x00001000
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#define NV_PTIMER_OFFSET            0x00009000
488c2ecf20Sopenharmony_ci#define NV_PTIMER_SIZE              0x00001000
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci#define NV_PPM_OFFSET               0x0000A000
518c2ecf20Sopenharmony_ci#define NV_PPM_SIZE                 0x00001000
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define NV_PTV_OFFSET               0x0000D000
548c2ecf20Sopenharmony_ci#define NV_PTV_SIZE                 0x00001000
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define NV_PRMVGA_OFFSET            0x000A0000
578c2ecf20Sopenharmony_ci#define NV_PRMVGA_SIZE              0x00020000
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define NV_PRMVIO0_OFFSET           0x000C0000
608c2ecf20Sopenharmony_ci#define NV_PRMVIO_SIZE              0x00002000
618c2ecf20Sopenharmony_ci#define NV_PRMVIO1_OFFSET           0x000C2000
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci#define NV_PFB_OFFSET               0x00100000
648c2ecf20Sopenharmony_ci#define NV_PFB_SIZE                 0x00001000
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci#define NV_PEXTDEV_OFFSET           0x00101000
678c2ecf20Sopenharmony_ci#define NV_PEXTDEV_SIZE             0x00001000
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci#define NV_PME_OFFSET               0x00200000
708c2ecf20Sopenharmony_ci#define NV_PME_SIZE                 0x00001000
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define NV_PROM_OFFSET              0x00300000
738c2ecf20Sopenharmony_ci#define NV_PROM_SIZE                0x00010000
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci#define NV_PGRAPH_OFFSET            0x00400000
768c2ecf20Sopenharmony_ci#define NV_PGRAPH_SIZE              0x00010000
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#define NV_PCRTC0_OFFSET            0x00600000
798c2ecf20Sopenharmony_ci#define NV_PCRTC0_SIZE              0x00002000 /* empirical */
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci#define NV_PRMCIO0_OFFSET           0x00601000
828c2ecf20Sopenharmony_ci#define NV_PRMCIO_SIZE              0x00002000
838c2ecf20Sopenharmony_ci#define NV_PRMCIO1_OFFSET           0x00603000
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci#define NV50_DISPLAY_OFFSET           0x00610000
868c2ecf20Sopenharmony_ci#define NV50_DISPLAY_SIZE             0x0000FFFF
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci#define NV_PRAMDAC0_OFFSET          0x00680000
898c2ecf20Sopenharmony_ci#define NV_PRAMDAC0_SIZE            0x00002000
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#define NV_PRMDIO0_OFFSET           0x00681000
928c2ecf20Sopenharmony_ci#define NV_PRMDIO_SIZE              0x00002000
938c2ecf20Sopenharmony_ci#define NV_PRMDIO1_OFFSET           0x00683000
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci#define NV_PRAMIN_OFFSET            0x00700000
968c2ecf20Sopenharmony_ci#define NV_PRAMIN_SIZE              0x00100000
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci#define NV_FIFO_OFFSET              0x00800000
998c2ecf20Sopenharmony_ci#define NV_FIFO_SIZE                0x00800000
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci#define NV_PMC_BOOT_0			0x00000000
1028c2ecf20Sopenharmony_ci#define NV_PMC_ENABLE			0x00000200
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci#define NV_VIO_VSE2			0x000003c3
1058c2ecf20Sopenharmony_ci#define NV_VIO_SRX			0x000003c4
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci#define NV_CIO_CRX__COLOR		0x000003d4
1088c2ecf20Sopenharmony_ci#define NV_CIO_CR__COLOR		0x000003d5
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci#define NV_PBUS_DEBUG_1			0x00001084
1118c2ecf20Sopenharmony_ci#define NV_PBUS_DEBUG_4			0x00001098
1128c2ecf20Sopenharmony_ci#define NV_PBUS_DEBUG_DUALHEAD_CTL	0x000010f0
1138c2ecf20Sopenharmony_ci#define NV_PBUS_POWERCTRL_1		0x00001584
1148c2ecf20Sopenharmony_ci#define NV_PBUS_POWERCTRL_2		0x00001588
1158c2ecf20Sopenharmony_ci#define NV_PBUS_POWERCTRL_4		0x00001590
1168c2ecf20Sopenharmony_ci#define NV_PBUS_PCI_NV_19		0x0000184C
1178c2ecf20Sopenharmony_ci#define NV_PBUS_PCI_NV_20		0x00001850
1188c2ecf20Sopenharmony_ci#	define NV_PBUS_PCI_NV_20_ROM_SHADOW_DISABLED	(0 << 0)
1198c2ecf20Sopenharmony_ci#	define NV_PBUS_PCI_NV_20_ROM_SHADOW_ENABLED	(1 << 0)
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci#define NV_PFIFO_RAMHT			0x00002210
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci#define NV_PTV_TV_INDEX			0x0000d220
1248c2ecf20Sopenharmony_ci#define NV_PTV_TV_DATA			0x0000d224
1258c2ecf20Sopenharmony_ci#define NV_PTV_HFILTER			0x0000d310
1268c2ecf20Sopenharmony_ci#define NV_PTV_HFILTER2			0x0000d390
1278c2ecf20Sopenharmony_ci#define NV_PTV_VFILTER			0x0000d510
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci#define NV_PRMVIO_MISC__WRITE		0x000c03c2
1308c2ecf20Sopenharmony_ci#define NV_PRMVIO_SRX			0x000c03c4
1318c2ecf20Sopenharmony_ci#define NV_PRMVIO_SR			0x000c03c5
1328c2ecf20Sopenharmony_ci#	define NV_VIO_SR_RESET_INDEX		0x00
1338c2ecf20Sopenharmony_ci#	define NV_VIO_SR_CLOCK_INDEX		0x01
1348c2ecf20Sopenharmony_ci#	define NV_VIO_SR_PLANE_MASK_INDEX	0x02
1358c2ecf20Sopenharmony_ci#	define NV_VIO_SR_CHAR_MAP_INDEX		0x03
1368c2ecf20Sopenharmony_ci#	define NV_VIO_SR_MEM_MODE_INDEX		0x04
1378c2ecf20Sopenharmony_ci#define NV_PRMVIO_MISC__READ		0x000c03cc
1388c2ecf20Sopenharmony_ci#define NV_PRMVIO_GRX			0x000c03ce
1398c2ecf20Sopenharmony_ci#define NV_PRMVIO_GX			0x000c03cf
1408c2ecf20Sopenharmony_ci#	define NV_VIO_GX_SR_INDEX		0x00
1418c2ecf20Sopenharmony_ci#	define NV_VIO_GX_SREN_INDEX		0x01
1428c2ecf20Sopenharmony_ci#	define NV_VIO_GX_CCOMP_INDEX		0x02
1438c2ecf20Sopenharmony_ci#	define NV_VIO_GX_ROP_INDEX		0x03
1448c2ecf20Sopenharmony_ci#	define NV_VIO_GX_READ_MAP_INDEX		0x04
1458c2ecf20Sopenharmony_ci#	define NV_VIO_GX_MODE_INDEX		0x05
1468c2ecf20Sopenharmony_ci#	define NV_VIO_GX_MISC_INDEX		0x06
1478c2ecf20Sopenharmony_ci#	define NV_VIO_GX_DONT_CARE_INDEX	0x07
1488c2ecf20Sopenharmony_ci#	define NV_VIO_GX_BIT_MASK_INDEX		0x08
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci#define NV_PCRTC_INTR_0					0x00600100
1518c2ecf20Sopenharmony_ci#	define NV_PCRTC_INTR_0_VBLANK				(1 << 0)
1528c2ecf20Sopenharmony_ci#define NV_PCRTC_INTR_EN_0				0x00600140
1538c2ecf20Sopenharmony_ci#define NV_PCRTC_START					0x00600800
1548c2ecf20Sopenharmony_ci#define NV_PCRTC_CONFIG					0x00600804
1558c2ecf20Sopenharmony_ci#	define NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA		(1 << 0)
1568c2ecf20Sopenharmony_ci#	define NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC		(4 << 0)
1578c2ecf20Sopenharmony_ci#	define NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC		(2 << 0)
1588c2ecf20Sopenharmony_ci#define NV_PCRTC_CURSOR_CONFIG				0x00600810
1598c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE		(1 << 0)
1608c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE	(1 << 4)
1618c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_ADDRESS_SPACE_PNVM	(1 << 8)
1628c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_CUR_BPP_32		(1 << 12)
1638c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_CUR_PIXELS_64		(1 << 16)
1648c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_CUR_LINES_32		(2 << 24)
1658c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_CUR_LINES_64		(4 << 24)
1668c2ecf20Sopenharmony_ci#	define NV_PCRTC_CURSOR_CONFIG_CUR_BLEND_ALPHA		(1 << 28)
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci/* note: PCRTC_GPIO is not available on nv10, and in fact aliases 0x600810 */
1698c2ecf20Sopenharmony_ci#define NV_PCRTC_GPIO					0x00600818
1708c2ecf20Sopenharmony_ci#define NV_PCRTC_GPIO_EXT				0x0060081c
1718c2ecf20Sopenharmony_ci#define NV_PCRTC_830					0x00600830
1728c2ecf20Sopenharmony_ci#define NV_PCRTC_834					0x00600834
1738c2ecf20Sopenharmony_ci#define NV_PCRTC_850					0x00600850
1748c2ecf20Sopenharmony_ci#define NV_PCRTC_ENGINE_CTRL				0x00600860
1758c2ecf20Sopenharmony_ci#	define NV_CRTC_FSEL_I2C					(1 << 4)
1768c2ecf20Sopenharmony_ci#	define NV_CRTC_FSEL_OVERLAY				(1 << 12)
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci#define NV_PRMCIO_ARX			0x006013c0
1798c2ecf20Sopenharmony_ci#define NV_PRMCIO_AR__WRITE		0x006013c0
1808c2ecf20Sopenharmony_ci#define NV_PRMCIO_AR__READ		0x006013c1
1818c2ecf20Sopenharmony_ci#	define NV_CIO_AR_MODE_INDEX		0x10
1828c2ecf20Sopenharmony_ci#	define NV_CIO_AR_OSCAN_INDEX		0x11
1838c2ecf20Sopenharmony_ci#	define NV_CIO_AR_PLANE_INDEX		0x12
1848c2ecf20Sopenharmony_ci#	define NV_CIO_AR_HPP_INDEX		0x13
1858c2ecf20Sopenharmony_ci#	define NV_CIO_AR_CSEL_INDEX		0x14
1868c2ecf20Sopenharmony_ci#define NV_PRMCIO_INP0			0x006013c2
1878c2ecf20Sopenharmony_ci#define NV_PRMCIO_CRX__COLOR		0x006013d4
1888c2ecf20Sopenharmony_ci#define NV_PRMCIO_CR__COLOR		0x006013d5
1898c2ecf20Sopenharmony_ci	/* Standard VGA CRTC registers */
1908c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HDT_INDEX		0x00	/* horizontal display total */
1918c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HDE_INDEX		0x01	/* horizontal display end */
1928c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HBS_INDEX		0x02	/* horizontal blanking start */
1938c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HBE_INDEX		0x03	/* horizontal blanking end */
1948c2ecf20Sopenharmony_ci#		define NV_CIO_CR_HBE_4_0		4:0
1958c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HRS_INDEX		0x04	/* horizontal retrace start */
1968c2ecf20Sopenharmony_ci#	define NV_CIO_CR_HRE_INDEX		0x05	/* horizontal retrace end */
1978c2ecf20Sopenharmony_ci#		define NV_CIO_CR_HRE_4_0		4:0
1988c2ecf20Sopenharmony_ci#		define NV_CIO_CR_HRE_HBE_5		7:7
1998c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VDT_INDEX		0x06	/* vertical display total */
2008c2ecf20Sopenharmony_ci#	define NV_CIO_CR_OVL_INDEX		0x07	/* overflow bits */
2018c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VDT_8		0:0
2028c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VDE_8		1:1
2038c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VRS_8		2:2
2048c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VBS_8		3:3
2058c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VDT_9		5:5
2068c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VDE_9		6:6
2078c2ecf20Sopenharmony_ci#		define NV_CIO_CR_OVL_VRS_9		7:7
2088c2ecf20Sopenharmony_ci#	define NV_CIO_CR_RSAL_INDEX		0x08	/* normally "preset row scan" */
2098c2ecf20Sopenharmony_ci#	define NV_CIO_CR_CELL_HT_INDEX		0x09	/* cell height?! normally "max scan line" */
2108c2ecf20Sopenharmony_ci#		define NV_CIO_CR_CELL_HT_VBS_9		5:5
2118c2ecf20Sopenharmony_ci#		define NV_CIO_CR_CELL_HT_SCANDBL	7:7
2128c2ecf20Sopenharmony_ci#	define NV_CIO_CR_CURS_ST_INDEX		0x0a	/* cursor start */
2138c2ecf20Sopenharmony_ci#	define NV_CIO_CR_CURS_END_INDEX		0x0b	/* cursor end */
2148c2ecf20Sopenharmony_ci#	define NV_CIO_CR_SA_HI_INDEX		0x0c	/* screen start address high */
2158c2ecf20Sopenharmony_ci#	define NV_CIO_CR_SA_LO_INDEX		0x0d	/* screen start address low */
2168c2ecf20Sopenharmony_ci#	define NV_CIO_CR_TCOFF_HI_INDEX		0x0e	/* cursor offset high */
2178c2ecf20Sopenharmony_ci#	define NV_CIO_CR_TCOFF_LO_INDEX		0x0f	/* cursor offset low */
2188c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VRS_INDEX		0x10	/* vertical retrace start */
2198c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VRE_INDEX		0x11	/* vertical retrace end */
2208c2ecf20Sopenharmony_ci#		define NV_CIO_CR_VRE_3_0		3:0
2218c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VDE_INDEX		0x12	/* vertical display end */
2228c2ecf20Sopenharmony_ci#	define NV_CIO_CR_OFFSET_INDEX		0x13	/* sets screen pitch */
2238c2ecf20Sopenharmony_ci#	define NV_CIO_CR_ULINE_INDEX		0x14	/* underline location */
2248c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VBS_INDEX		0x15	/* vertical blank start */
2258c2ecf20Sopenharmony_ci#	define NV_CIO_CR_VBE_INDEX		0x16	/* vertical blank end */
2268c2ecf20Sopenharmony_ci#	define NV_CIO_CR_MODE_INDEX		0x17	/* crtc mode control */
2278c2ecf20Sopenharmony_ci#	define NV_CIO_CR_LCOMP_INDEX		0x18	/* line compare */
2288c2ecf20Sopenharmony_ci	/* Extended VGA CRTC registers */
2298c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_RPC0_INDEX		0x19	/* repaint control 0 */
2308c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_RPC0_OFFSET_10_8	7:5
2318c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_RPC1_INDEX		0x1a	/* repaint control 1 */
2328c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_RPC1_LARGE		2:2
2338c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_FF_INDEX		0x1b	/* fifo control */
2348c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_ENH_INDEX		0x1c	/* enhanced? */
2358c2ecf20Sopenharmony_ci#	define NV_CIO_SR_LOCK_INDEX		0x1f	/* crtc lock */
2368c2ecf20Sopenharmony_ci#		define NV_CIO_SR_UNLOCK_RW_VALUE	0x57
2378c2ecf20Sopenharmony_ci#		define NV_CIO_SR_LOCK_VALUE		0x99
2388c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_FFLWM__INDEX		0x20	/* fifo low water mark */
2398c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_21			0x21	/* vga shadow crtc lock */
2408c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_LSR_INDEX		0x25	/* ? */
2418c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LSR_VDT_10		0:0
2428c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LSR_VDE_10		1:1
2438c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LSR_VRS_10		2:2
2448c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LSR_VBS_10		3:3
2458c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LSR_HBE_6		4:4
2468c2ecf20Sopenharmony_ci#	define NV_CIO_CR_ARX_INDEX		0x26	/* attribute index -- ro copy of 0x60.3c0 */
2478c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_CHIP_ID_INDEX		0x27	/* chip revision */
2488c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_PIXEL_INDEX		0x28
2498c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_PIXEL_FORMAT		1:0
2508c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_HEB__INDEX		0x2d	/* horizontal extra bits? */
2518c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HEB_HDT_8		0:0
2528c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HEB_HDE_8		1:1
2538c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HEB_HBS_8		2:2
2548c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HEB_HRS_8		3:3
2558c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HEB_ILC_8		4:4
2568c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_2E			0x2e	/* some scratch or dummy reg to force writes to sink in */
2578c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_HCUR_ADDR2_INDEX	0x2f	/* cursor */
2588c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_HCUR_ADDR0_INDEX	0x30		/* pixmap */
2598c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HCUR_ADDR0_ADR	6:0
2608c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HCUR_ASI		7:7
2618c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_HCUR_ADDR1_INDEX	0x31			/* address */
2628c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HCUR_ADDR1_ENABLE	0:0
2638c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HCUR_ADDR1_CUR_DBL	1:1
2648c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_HCUR_ADDR1_ADR	7:2
2658c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_LCD__INDEX		0x33
2668c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LCD_LCD_SELECT	0:0
2678c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_LCD_ROUTE_MASK	0x3b
2688c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_DDC0_STATUS__INDEX	0x36
2698c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_DDC0_WR__INDEX	0x37
2708c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_ILACE__INDEX		0x39	/* interlace */
2718c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_SCRATCH3__INDEX	0x3b
2728c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_SCRATCH4__INDEX	0x3c
2738c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_DDC_STATUS__INDEX	0x3e
2748c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_DDC_WR__INDEX		0x3f
2758c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_EBR_INDEX		0x41	/* extra bits ? (vertical) */
2768c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_EBR_VDT_11		0:0
2778c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_EBR_VDE_11		2:2
2788c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_EBR_VRS_11		4:4
2798c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_EBR_VBS_11		6:6
2808c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_42			0x42
2818c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_42_OFFSET_11		6:6
2828c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_43			0x43
2838c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_44			0x44	/* head control */
2848c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_CSB			0x45	/* colour saturation boost */
2858c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_RCR			0x46
2868c2ecf20Sopenharmony_ci#		define NV_CIO_CRE_RCR_ENDIAN_BIG	7:7
2878c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_47			0x47	/* extended fifo lwm, used on nv30+ */
2888c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_49			0x49
2898c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_4B			0x4b	/* given patterns in 0x[2-3][a-c] regs, probably scratch 6 */
2908c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_TVOUT_LATENCY		0x52
2918c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_53			0x53	/* `fp_htiming' according to Haiku */
2928c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_54			0x54	/* `fp_vtiming' according to Haiku */
2938c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_57			0x57	/* index reg for cr58 */
2948c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_58			0x58	/* data reg for cr57 */
2958c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_59			0x59	/* related to on/off-chip-ness of digital outputs */
2968c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_5B			0x5B	/* newer colour saturation reg */
2978c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_85			0x85
2988c2ecf20Sopenharmony_ci#	define NV_CIO_CRE_86			0x86
2998c2ecf20Sopenharmony_ci#define NV_PRMCIO_INP0__COLOR		0x006013da
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci#define NV_PRAMDAC_CU_START_POS				0x00680300
3028c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_CU_START_POS_X			15:0
3038c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_CU_START_POS_Y			31:16
3048c2ecf20Sopenharmony_ci#define NV_RAMDAC_NV10_CURSYNC				0x00680404
3058c2ecf20Sopenharmony_ci
3068c2ecf20Sopenharmony_ci#define NV_PRAMDAC_NVPLL_COEFF				0x00680500
3078c2ecf20Sopenharmony_ci#define NV_PRAMDAC_MPLL_COEFF				0x00680504
3088c2ecf20Sopenharmony_ci#define NV_PRAMDAC_VPLL_COEFF				0x00680508
3098c2ecf20Sopenharmony_ci#	define NV30_RAMDAC_ENABLE_VCO2				(8 << 4)
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ci#define NV_PRAMDAC_PLL_COEFF_SELECT			0x0068050c
3128c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_USE_VPLL2_TRUE	(4 << 0)
3138c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_MPLL	(1 << 8)
3148c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_VPLL	(2 << 8)
3158c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_NVPLL	(4 << 8)
3168c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_PLL_SOURCE_VPLL2	(8 << 8)
3178c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_TV_VSCLK1		(1 << 16)
3188c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_TV_PCLK1		(2 << 16)
3198c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_TV_VSCLK2		(4 << 16)
3208c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_TV_PCLK2		(8 << 16)
3218c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_TV_CLK_SOURCE_VIP	(1 << 20)
3228c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_VCLK_RATIO_DB2	(1 << 28)
3238c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_PLL_COEFF_SELECT_VCLK2_RATIO_DB2	(2 << 28)
3248c2ecf20Sopenharmony_ci
3258c2ecf20Sopenharmony_ci#define NV_PRAMDAC_PLL_SETUP_CONTROL			0x00680510
3268c2ecf20Sopenharmony_ci#define NV_RAMDAC_VPLL2					0x00680520
3278c2ecf20Sopenharmony_ci#define NV_PRAMDAC_SEL_CLK				0x00680524
3288c2ecf20Sopenharmony_ci#define NV_RAMDAC_DITHER_NV11				0x00680528
3298c2ecf20Sopenharmony_ci#define NV_PRAMDAC_DACCLK				0x0068052c
3308c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_DACCLK_SEL_DACCLK			(1 << 0)
3318c2ecf20Sopenharmony_ci
3328c2ecf20Sopenharmony_ci#define NV_RAMDAC_NVPLL_B				0x00680570
3338c2ecf20Sopenharmony_ci#define NV_RAMDAC_MPLL_B				0x00680574
3348c2ecf20Sopenharmony_ci#define NV_RAMDAC_VPLL_B				0x00680578
3358c2ecf20Sopenharmony_ci#define NV_RAMDAC_VPLL2_B				0x0068057c
3368c2ecf20Sopenharmony_ci#	define NV31_RAMDAC_ENABLE_VCO2				(8 << 28)
3378c2ecf20Sopenharmony_ci#define NV_PRAMDAC_580					0x00680580
3388c2ecf20Sopenharmony_ci#	define NV_RAMDAC_580_VPLL1_ACTIVE			(1 << 8)
3398c2ecf20Sopenharmony_ci#	define NV_RAMDAC_580_VPLL2_ACTIVE			(1 << 28)
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci#define NV_PRAMDAC_GENERAL_CONTROL			0x00680600
3428c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_PIXMIX_ON		(3 << 4)
3438c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_VGA_STATE_SEL		(1 << 8)
3448c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_ALT_MODE_SEL		(1 << 12)
3458c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_TERMINATION_75OHM	(2 << 16)
3468c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_BPC_8BITS		(1 << 20)
3478c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_GENERAL_CONTROL_PIPE_LONG		(2 << 28)
3488c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TEST_CONTROL				0x00680608
3498c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_TEST_CONTROL_TP_INS_EN_ASSERTED	(1 << 12)
3508c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_TEST_CONTROL_PWRDWN_DAC_OFF		(1 << 16)
3518c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI		(1 << 28)
3528c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TESTPOINT_DATA			0x00680610
3538c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_TESTPOINT_DATA_NOTBLANK		(8 << 28)
3548c2ecf20Sopenharmony_ci#define NV_PRAMDAC_630					0x00680630
3558c2ecf20Sopenharmony_ci#define NV_PRAMDAC_634					0x00680634
3568c2ecf20Sopenharmony_ci
3578c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_SETUP				0x00680700
3588c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_VTOTAL				0x00680720
3598c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_VSKEW				0x00680724
3608c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_VSYNC_DELAY			0x00680728
3618c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_HTOTAL				0x0068072c
3628c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_HSKEW				0x00680730
3638c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_HSYNC_DELAY			0x00680734
3648c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_HSYNC_DELAY2			0x00680738
3658c2ecf20Sopenharmony_ci
3668c2ecf20Sopenharmony_ci#define NV_PRAMDAC_TV_SETUP                             0x00680700
3678c2ecf20Sopenharmony_ci
3688c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VDISPLAY_END			0x00680800
3698c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VTOTAL				0x00680804
3708c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VCRTC				0x00680808
3718c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VSYNC_START			0x0068080c
3728c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VSYNC_END				0x00680810
3738c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VVALID_START			0x00680814
3748c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_VVALID_END			0x00680818
3758c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HDISPLAY_END			0x00680820
3768c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HTOTAL				0x00680824
3778c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HCRTC				0x00680828
3788c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HSYNC_START			0x0068082c
3798c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HSYNC_END				0x00680830
3808c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HVALID_START			0x00680834
3818c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_HVALID_END			0x00680838
3828c2ecf20Sopenharmony_ci
3838c2ecf20Sopenharmony_ci#define NV_RAMDAC_FP_DITHER				0x0068083c
3848c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_TG_CONTROL			0x00680848
3858c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_VSYNC_POS		(1 << 0)
3868c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_VSYNC_DISABLE		(2 << 0)
3878c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_HSYNC_POS		(1 << 4)
3888c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_HSYNC_DISABLE		(2 << 4)
3898c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_SCALE		(0 << 8)
3908c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_CENTER		(1 << 8)
3918c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_NATIVE		(2 << 8)
3928c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_READ_PROG		(1 << 20)
3938c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_WIDTH_12		(1 << 24)
3948c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_DISPEN_POS		(1 << 28)
3958c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TG_CONTROL_DISPEN_DISABLE		(2 << 28)
3968c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_MARGIN_COLOR			0x0068084c
3978c2ecf20Sopenharmony_ci#define NV_PRAMDAC_850					0x00680850
3988c2ecf20Sopenharmony_ci#define NV_PRAMDAC_85C					0x0068085c
3998c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_DEBUG_0				0x00680880
4008c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_XSCALE_ENABLE		(1 << 0)
4018c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_YSCALE_ENABLE		(1 << 4)
4028c2ecf20Sopenharmony_ci/* This doesn't seem to be essential for tmds, but still often set */
4038c2ecf20Sopenharmony_ci#	define NV_RAMDAC_FP_DEBUG_0_TMDS_ENABLED		(8 << 4)
4048c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_XINTERP_BILINEAR		(1 << 8)
4058c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_YINTERP_BILINEAR		(1 << 12)
4068c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_XWEIGHT_ROUND		(1 << 20)
4078c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_0_YWEIGHT_ROUND		(1 << 24)
4088c2ecf20Sopenharmony_ci#       define NV_PRAMDAC_FP_DEBUG_0_PWRDOWN_FPCLK              (1 << 28)
4098c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_DEBUG_1				0x00680884
4108c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_1_XSCALE_VALUE		11:0
4118c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_1_XSCALE_TESTMODE_ENABLE	(1 << 12)
4128c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_1_YSCALE_VALUE		27:16
4138c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_DEBUG_1_YSCALE_TESTMODE_ENABLE	(1 << 28)
4148c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_DEBUG_2				0x00680888
4158c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_DEBUG_3				0x0068088C
4168c2ecf20Sopenharmony_ci
4178c2ecf20Sopenharmony_ci/* see NV_PRAMDAC_INDIR_TMDS in rules.xml */
4188c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_TMDS_CONTROL			0x006808b0
4198c2ecf20Sopenharmony_ci#	define NV_PRAMDAC_FP_TMDS_CONTROL_WRITE_DISABLE		(1 << 16)
4208c2ecf20Sopenharmony_ci#define NV_PRAMDAC_FP_TMDS_DATA				0x006808b4
4218c2ecf20Sopenharmony_ci
4228c2ecf20Sopenharmony_ci#define NV_PRAMDAC_8C0                                  0x006808c0
4238c2ecf20Sopenharmony_ci
4248c2ecf20Sopenharmony_ci/* Some kind of switch */
4258c2ecf20Sopenharmony_ci#define NV_PRAMDAC_900					0x00680900
4268c2ecf20Sopenharmony_ci#define NV_PRAMDAC_A20					0x00680A20
4278c2ecf20Sopenharmony_ci#define NV_PRAMDAC_A24					0x00680A24
4288c2ecf20Sopenharmony_ci#define NV_PRAMDAC_A34					0x00680A34
4298c2ecf20Sopenharmony_ci
4308c2ecf20Sopenharmony_ci#define NV_PRAMDAC_CTV					0x00680c00
4318c2ecf20Sopenharmony_ci
4328c2ecf20Sopenharmony_ci/* names fabricated from NV_USER_DAC info */
4338c2ecf20Sopenharmony_ci#define NV_PRMDIO_PIXEL_MASK		0x006813c6
4348c2ecf20Sopenharmony_ci#	define NV_PRMDIO_PIXEL_MASK_MASK	0xff
4358c2ecf20Sopenharmony_ci#define NV_PRMDIO_READ_MODE_ADDRESS	0x006813c7
4368c2ecf20Sopenharmony_ci#define NV_PRMDIO_WRITE_MODE_ADDRESS	0x006813c8
4378c2ecf20Sopenharmony_ci#define NV_PRMDIO_PALETTE_DATA		0x006813c9
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_0		0x00400080
4408c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_1		0x00400084
4418c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_2_NV04		0x00400088
4428c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_2		0x00400620
4438c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_3		0x0040008c
4448c2ecf20Sopenharmony_ci#define NV_PGRAPH_DEBUG_4		0x00400090
4458c2ecf20Sopenharmony_ci#define NV_PGRAPH_INTR			0x00400100
4468c2ecf20Sopenharmony_ci#define NV_PGRAPH_INTR_EN		0x00400140
4478c2ecf20Sopenharmony_ci#define NV_PGRAPH_CTX_CONTROL		0x00400144
4488c2ecf20Sopenharmony_ci#define NV_PGRAPH_CTX_CONTROL_NV04	0x00400170
4498c2ecf20Sopenharmony_ci#define NV_PGRAPH_ABS_UCLIP_XMIN	0x0040053C
4508c2ecf20Sopenharmony_ci#define NV_PGRAPH_ABS_UCLIP_YMIN	0x00400540
4518c2ecf20Sopenharmony_ci#define NV_PGRAPH_ABS_UCLIP_XMAX	0x00400544
4528c2ecf20Sopenharmony_ci#define NV_PGRAPH_ABS_UCLIP_YMAX	0x00400548
4538c2ecf20Sopenharmony_ci#define NV_PGRAPH_BETA_AND		0x00400608
4548c2ecf20Sopenharmony_ci#define NV_PGRAPH_LIMIT_VIOL_PIX	0x00400610
4558c2ecf20Sopenharmony_ci#define NV_PGRAPH_BOFFSET0		0x00400640
4568c2ecf20Sopenharmony_ci#define NV_PGRAPH_BOFFSET1		0x00400644
4578c2ecf20Sopenharmony_ci#define NV_PGRAPH_BOFFSET2		0x00400648
4588c2ecf20Sopenharmony_ci#define NV_PGRAPH_BLIMIT0		0x00400684
4598c2ecf20Sopenharmony_ci#define NV_PGRAPH_BLIMIT1		0x00400688
4608c2ecf20Sopenharmony_ci#define NV_PGRAPH_BLIMIT2		0x0040068c
4618c2ecf20Sopenharmony_ci#define NV_PGRAPH_STATUS		0x00400700
4628c2ecf20Sopenharmony_ci#define NV_PGRAPH_SURFACE		0x00400710
4638c2ecf20Sopenharmony_ci#define NV_PGRAPH_STATE			0x00400714
4648c2ecf20Sopenharmony_ci#define NV_PGRAPH_FIFO			0x00400720
4658c2ecf20Sopenharmony_ci#define NV_PGRAPH_PATTERN_SHAPE		0x00400810
4668c2ecf20Sopenharmony_ci#define NV_PGRAPH_TILE			0x00400b00
4678c2ecf20Sopenharmony_ci
4688c2ecf20Sopenharmony_ci#define NV_PVIDEO_INTR_EN		0x00008140
4698c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFFER		0x00008700
4708c2ecf20Sopenharmony_ci#define NV_PVIDEO_STOP			0x00008704
4718c2ecf20Sopenharmony_ci#define NV_PVIDEO_UVPLANE_BASE(buff)	(0x00008800+(buff)*4)
4728c2ecf20Sopenharmony_ci#define NV_PVIDEO_UVPLANE_LIMIT(buff)	(0x00008808+(buff)*4)
4738c2ecf20Sopenharmony_ci#define NV_PVIDEO_UVPLANE_OFFSET_BUFF(buff)	(0x00008820+(buff)*4)
4748c2ecf20Sopenharmony_ci#define NV_PVIDEO_BASE(buff)		(0x00008900+(buff)*4)
4758c2ecf20Sopenharmony_ci#define NV_PVIDEO_LIMIT(buff)		(0x00008908+(buff)*4)
4768c2ecf20Sopenharmony_ci#define NV_PVIDEO_LUMINANCE(buff)	(0x00008910+(buff)*4)
4778c2ecf20Sopenharmony_ci#define NV_PVIDEO_CHROMINANCE(buff)	(0x00008918+(buff)*4)
4788c2ecf20Sopenharmony_ci#define NV_PVIDEO_OFFSET_BUFF(buff)	(0x00008920+(buff)*4)
4798c2ecf20Sopenharmony_ci#define NV_PVIDEO_SIZE_IN(buff)		(0x00008928+(buff)*4)
4808c2ecf20Sopenharmony_ci#define NV_PVIDEO_POINT_IN(buff)	(0x00008930+(buff)*4)
4818c2ecf20Sopenharmony_ci#define NV_PVIDEO_DS_DX(buff)		(0x00008938+(buff)*4)
4828c2ecf20Sopenharmony_ci#define NV_PVIDEO_DT_DY(buff)		(0x00008940+(buff)*4)
4838c2ecf20Sopenharmony_ci#define NV_PVIDEO_POINT_OUT(buff)	(0x00008948+(buff)*4)
4848c2ecf20Sopenharmony_ci#define NV_PVIDEO_SIZE_OUT(buff)	(0x00008950+(buff)*4)
4858c2ecf20Sopenharmony_ci#define NV_PVIDEO_FORMAT(buff)		(0x00008958+(buff)*4)
4868c2ecf20Sopenharmony_ci#	define NV_PVIDEO_FORMAT_PLANAR			(1 << 0)
4878c2ecf20Sopenharmony_ci#	define NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8	(1 << 16)
4888c2ecf20Sopenharmony_ci#	define NV_PVIDEO_FORMAT_DISPLAY_COLOR_KEY	(1 << 20)
4898c2ecf20Sopenharmony_ci#	define NV_PVIDEO_FORMAT_MATRIX_ITURBT709	(1 << 24)
4908c2ecf20Sopenharmony_ci#define NV_PVIDEO_COLOR_KEY		0x00008B00
4918c2ecf20Sopenharmony_ci
4928c2ecf20Sopenharmony_ci/* NV04 overlay defines from VIDIX & Haiku */
4938c2ecf20Sopenharmony_ci#define NV_PVIDEO_INTR_EN_0		0x00680140
4948c2ecf20Sopenharmony_ci#define NV_PVIDEO_STEP_SIZE		0x00680200
4958c2ecf20Sopenharmony_ci#define NV_PVIDEO_CONTROL_Y		0x00680204
4968c2ecf20Sopenharmony_ci#define NV_PVIDEO_CONTROL_X		0x00680208
4978c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF0_START_ADDRESS	0x0068020c
4988c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF0_PITCH_LENGTH	0x00680214
4998c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF0_OFFSET		0x0068021c
5008c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF1_START_ADDRESS	0x00680210
5018c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF1_PITCH_LENGTH	0x00680218
5028c2ecf20Sopenharmony_ci#define NV_PVIDEO_BUFF1_OFFSET		0x00680220
5038c2ecf20Sopenharmony_ci#define NV_PVIDEO_OE_STATE		0x00680224
5048c2ecf20Sopenharmony_ci#define NV_PVIDEO_SU_STATE		0x00680228
5058c2ecf20Sopenharmony_ci#define NV_PVIDEO_RM_STATE		0x0068022c
5068c2ecf20Sopenharmony_ci#define NV_PVIDEO_WINDOW_START		0x00680230
5078c2ecf20Sopenharmony_ci#define NV_PVIDEO_WINDOW_SIZE		0x00680234
5088c2ecf20Sopenharmony_ci#define NV_PVIDEO_FIFO_THRES_SIZE	0x00680238
5098c2ecf20Sopenharmony_ci#define NV_PVIDEO_FIFO_BURST_LENGTH	0x0068023c
5108c2ecf20Sopenharmony_ci#define NV_PVIDEO_KEY			0x00680240
5118c2ecf20Sopenharmony_ci#define NV_PVIDEO_OVERLAY		0x00680244
5128c2ecf20Sopenharmony_ci#define NV_PVIDEO_RED_CSC_OFFSET	0x00680280
5138c2ecf20Sopenharmony_ci#define NV_PVIDEO_GREEN_CSC_OFFSET	0x00680284
5148c2ecf20Sopenharmony_ci#define NV_PVIDEO_BLUE_CSC_OFFSET	0x00680288
5158c2ecf20Sopenharmony_ci#define NV_PVIDEO_CSC_ADJUST		0x0068028c
5168c2ecf20Sopenharmony_ci
5178c2ecf20Sopenharmony_ci#endif
518