xref: /dflybsd-src/sys/dev/drm/radeon/avivod.h (revision 57e252bfa9ffec9f583f486376e43c8b2c0b8809)
1*926deccbSFrançois Tigeot /*
2*926deccbSFrançois Tigeot  * Copyright 2009 Advanced Micro Devices, Inc.
3*926deccbSFrançois Tigeot  * Copyright 2009 Red Hat Inc.
4*926deccbSFrançois Tigeot  *
5*926deccbSFrançois Tigeot  * Permission is hereby granted, free of charge, to any person obtaining a
6*926deccbSFrançois Tigeot  * copy of this software and associated documentation files (the "Software"),
7*926deccbSFrançois Tigeot  * to deal in the Software without restriction, including without limitation
8*926deccbSFrançois Tigeot  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9*926deccbSFrançois Tigeot  * and/or sell copies of the Software, and to permit persons to whom the
10*926deccbSFrançois Tigeot  * Software is furnished to do so, subject to the following conditions:
11*926deccbSFrançois Tigeot  *
12*926deccbSFrançois Tigeot  * The above copyright notice and this permission notice shall be included in
13*926deccbSFrançois Tigeot  * all copies or substantial portions of the Software.
14*926deccbSFrançois Tigeot  *
15*926deccbSFrançois Tigeot  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16*926deccbSFrançois Tigeot  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*926deccbSFrançois Tigeot  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18*926deccbSFrançois Tigeot  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19*926deccbSFrançois Tigeot  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20*926deccbSFrançois Tigeot  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21*926deccbSFrançois Tigeot  * OTHER DEALINGS IN THE SOFTWARE.
22*926deccbSFrançois Tigeot  *
23*926deccbSFrançois Tigeot  * Authors: Dave Airlie
24*926deccbSFrançois Tigeot  *          Alex Deucher
25*926deccbSFrançois Tigeot  *          Jerome Glisse
26*926deccbSFrançois Tigeot  */
27*926deccbSFrançois Tigeot #ifndef AVIVOD_H
28*926deccbSFrançois Tigeot #define AVIVOD_H
29*926deccbSFrançois Tigeot 
30*926deccbSFrançois Tigeot 
31*926deccbSFrançois Tigeot #define	D1CRTC_CONTROL					0x6080
32*926deccbSFrançois Tigeot #define		CRTC_EN						(1 << 0)
33*926deccbSFrançois Tigeot #define	D1CRTC_STATUS					0x609c
34*926deccbSFrançois Tigeot #define	D1CRTC_UPDATE_LOCK				0x60E8
35*926deccbSFrançois Tigeot #define	D1GRPH_PRIMARY_SURFACE_ADDRESS			0x6110
36*926deccbSFrançois Tigeot #define	D1GRPH_SECONDARY_SURFACE_ADDRESS		0x6118
37*926deccbSFrançois Tigeot 
38*926deccbSFrançois Tigeot #define	D2CRTC_CONTROL					0x6880
39*926deccbSFrançois Tigeot #define	D2CRTC_STATUS					0x689c
40*926deccbSFrançois Tigeot #define	D2CRTC_UPDATE_LOCK				0x68E8
41*926deccbSFrançois Tigeot #define	D2GRPH_PRIMARY_SURFACE_ADDRESS			0x6910
42*926deccbSFrançois Tigeot #define	D2GRPH_SECONDARY_SURFACE_ADDRESS		0x6918
43*926deccbSFrançois Tigeot 
44*926deccbSFrançois Tigeot #define	D1VGA_CONTROL					0x0330
45*926deccbSFrançois Tigeot #define		DVGA_CONTROL_MODE_ENABLE			(1 << 0)
46*926deccbSFrançois Tigeot #define		DVGA_CONTROL_TIMING_SELECT			(1 << 8)
47*926deccbSFrançois Tigeot #define		DVGA_CONTROL_SYNC_POLARITY_SELECT		(1 << 9)
48*926deccbSFrançois Tigeot #define		DVGA_CONTROL_OVERSCAN_TIMING_SELECT		(1 << 10)
49*926deccbSFrançois Tigeot #define		DVGA_CONTROL_OVERSCAN_COLOR_EN			(1 << 16)
50*926deccbSFrançois Tigeot #define		DVGA_CONTROL_ROTATE				(1 << 24)
51*926deccbSFrançois Tigeot #define D2VGA_CONTROL					0x0338
52*926deccbSFrançois Tigeot 
53*926deccbSFrançois Tigeot #define	VGA_HDP_CONTROL					0x328
54*926deccbSFrançois Tigeot #define		VGA_MEM_PAGE_SELECT_EN				(1 << 0)
55*926deccbSFrançois Tigeot #define		VGA_MEMORY_DISABLE				(1 << 4)
56*926deccbSFrançois Tigeot #define		VGA_RBBM_LOCK_DISABLE				(1 << 8)
57*926deccbSFrançois Tigeot #define		VGA_SOFT_RESET					(1 << 16)
58*926deccbSFrançois Tigeot #define	VGA_MEMORY_BASE_ADDRESS				0x0310
59*926deccbSFrançois Tigeot #define	VGA_RENDER_CONTROL				0x0300
60*926deccbSFrançois Tigeot #define		VGA_VSTATUS_CNTL_MASK				0x00030000
61*926deccbSFrançois Tigeot 
62*926deccbSFrançois Tigeot #endif
63