xref: /dragonfly/sys/dev/drm/radeon/ni_reg.h (revision 926deccb)
1*926deccbSFrançois Tigeot /*
2*926deccbSFrançois Tigeot  * Copyright 2010 Advanced Micro Devices, Inc.
3*926deccbSFrançois Tigeot  *
4*926deccbSFrançois Tigeot  * Permission is hereby granted, free of charge, to any person obtaining a
5*926deccbSFrançois Tigeot  * copy of this software and associated documentation files (the "Software"),
6*926deccbSFrançois Tigeot  * to deal in the Software without restriction, including without limitation
7*926deccbSFrançois Tigeot  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*926deccbSFrançois Tigeot  * and/or sell copies of the Software, and to permit persons to whom the
9*926deccbSFrançois Tigeot  * Software is furnished to do so, subject to the following conditions:
10*926deccbSFrançois Tigeot  *
11*926deccbSFrançois Tigeot  * The above copyright notice and this permission notice shall be included in
12*926deccbSFrançois Tigeot  * all copies or substantial portions of the Software.
13*926deccbSFrançois Tigeot  *
14*926deccbSFrançois Tigeot  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*926deccbSFrançois Tigeot  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*926deccbSFrançois Tigeot  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*926deccbSFrançois Tigeot  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*926deccbSFrançois Tigeot  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*926deccbSFrançois Tigeot  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*926deccbSFrançois Tigeot  * OTHER DEALINGS IN THE SOFTWARE.
21*926deccbSFrançois Tigeot  *
22*926deccbSFrançois Tigeot  * Authors: Alex Deucher
23*926deccbSFrançois Tigeot  *
24*926deccbSFrançois Tigeot  * $FreeBSD: head/sys/dev/drm2/radeon/ni_reg.h 254885 2013-08-25 19:37:15Z dumbbell $
25*926deccbSFrançois Tigeot  */
26*926deccbSFrançois Tigeot #ifndef __NI_REG_H__
27*926deccbSFrançois Tigeot #define __NI_REG_H__
28*926deccbSFrançois Tigeot 
29*926deccbSFrançois Tigeot /* northern islands - DCE5 */
30*926deccbSFrançois Tigeot 
31*926deccbSFrançois Tigeot #define NI_INPUT_GAMMA_CONTROL                         0x6840
32*926deccbSFrançois Tigeot #       define NI_GRPH_INPUT_GAMMA_MODE(x)             (((x) & 0x3) << 0)
33*926deccbSFrançois Tigeot #       define NI_INPUT_GAMMA_USE_LUT                  0
34*926deccbSFrançois Tigeot #       define NI_INPUT_GAMMA_BYPASS                   1
35*926deccbSFrançois Tigeot #       define NI_INPUT_GAMMA_SRGB_24                  2
36*926deccbSFrançois Tigeot #       define NI_INPUT_GAMMA_XVYCC_222                3
37*926deccbSFrançois Tigeot #       define NI_OVL_INPUT_GAMMA_MODE(x)              (((x) & 0x3) << 4)
38*926deccbSFrançois Tigeot 
39*926deccbSFrançois Tigeot #define NI_PRESCALE_GRPH_CONTROL                       0x68b4
40*926deccbSFrançois Tigeot #       define NI_GRPH_PRESCALE_BYPASS                 (1 << 4)
41*926deccbSFrançois Tigeot 
42*926deccbSFrançois Tigeot #define NI_PRESCALE_OVL_CONTROL                        0x68c4
43*926deccbSFrançois Tigeot #       define NI_OVL_PRESCALE_BYPASS                  (1 << 4)
44*926deccbSFrançois Tigeot 
45*926deccbSFrançois Tigeot #define NI_INPUT_CSC_CONTROL                           0x68d4
46*926deccbSFrançois Tigeot #       define NI_INPUT_CSC_GRPH_MODE(x)               (((x) & 0x3) << 0)
47*926deccbSFrançois Tigeot #       define NI_INPUT_CSC_BYPASS                     0
48*926deccbSFrançois Tigeot #       define NI_INPUT_CSC_PROG_COEFF                 1
49*926deccbSFrançois Tigeot #       define NI_INPUT_CSC_PROG_SHARED_MATRIXA        2
50*926deccbSFrançois Tigeot #       define NI_INPUT_CSC_OVL_MODE(x)                (((x) & 0x3) << 4)
51*926deccbSFrançois Tigeot 
52*926deccbSFrançois Tigeot #define NI_OUTPUT_CSC_CONTROL                          0x68f0
53*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_GRPH_MODE(x)              (((x) & 0x7) << 0)
54*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_BYPASS                    0
55*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_TV_RGB                    1
56*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_YCBCR_601                 2
57*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_YCBCR_709                 3
58*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_PROG_COEFF                4
59*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_PROG_SHARED_MATRIXB       5
60*926deccbSFrançois Tigeot #       define NI_OUTPUT_CSC_OVL_MODE(x)               (((x) & 0x7) << 4)
61*926deccbSFrançois Tigeot 
62*926deccbSFrançois Tigeot #define NI_DEGAMMA_CONTROL                             0x6960
63*926deccbSFrançois Tigeot #       define NI_GRPH_DEGAMMA_MODE(x)                 (((x) & 0x3) << 0)
64*926deccbSFrançois Tigeot #       define NI_DEGAMMA_BYPASS                       0
65*926deccbSFrançois Tigeot #       define NI_DEGAMMA_SRGB_24                      1
66*926deccbSFrançois Tigeot #       define NI_DEGAMMA_XVYCC_222                    2
67*926deccbSFrançois Tigeot #       define NI_OVL_DEGAMMA_MODE(x)                  (((x) & 0x3) << 4)
68*926deccbSFrançois Tigeot #       define NI_ICON_DEGAMMA_MODE(x)                 (((x) & 0x3) << 8)
69*926deccbSFrançois Tigeot #       define NI_CURSOR_DEGAMMA_MODE(x)               (((x) & 0x3) << 12)
70*926deccbSFrançois Tigeot 
71*926deccbSFrançois Tigeot #define NI_GAMUT_REMAP_CONTROL                         0x6964
72*926deccbSFrançois Tigeot #       define NI_GRPH_GAMUT_REMAP_MODE(x)             (((x) & 0x3) << 0)
73*926deccbSFrançois Tigeot #       define NI_GAMUT_REMAP_BYPASS                   0
74*926deccbSFrançois Tigeot #       define NI_GAMUT_REMAP_PROG_COEFF               1
75*926deccbSFrançois Tigeot #       define NI_GAMUT_REMAP_PROG_SHARED_MATRIXA      2
76*926deccbSFrançois Tigeot #       define NI_GAMUT_REMAP_PROG_SHARED_MATRIXB      3
77*926deccbSFrançois Tigeot #       define NI_OVL_GAMUT_REMAP_MODE(x)              (((x) & 0x3) << 4)
78*926deccbSFrançois Tigeot 
79*926deccbSFrançois Tigeot #define NI_REGAMMA_CONTROL                             0x6a80
80*926deccbSFrançois Tigeot #       define NI_GRPH_REGAMMA_MODE(x)                 (((x) & 0x7) << 0)
81*926deccbSFrançois Tigeot #       define NI_REGAMMA_BYPASS                       0
82*926deccbSFrançois Tigeot #       define NI_REGAMMA_SRGB_24                      1
83*926deccbSFrançois Tigeot #       define NI_REGAMMA_XVYCC_222                    2
84*926deccbSFrançois Tigeot #       define NI_REGAMMA_PROG_A                       3
85*926deccbSFrançois Tigeot #       define NI_REGAMMA_PROG_B                       4
86*926deccbSFrançois Tigeot #       define NI_OVL_REGAMMA_MODE(x)                  (((x) & 0x7) << 4)
87*926deccbSFrançois Tigeot 
88*926deccbSFrançois Tigeot #endif
89