1254885Sdumbbell/*
2254885Sdumbbell * Copyright 2010 Advanced Micro Devices, Inc.
3254885Sdumbbell *
4254885Sdumbbell * Permission is hereby granted, free of charge, to any person obtaining a
5254885Sdumbbell * copy of this software and associated documentation files (the "Software"),
6254885Sdumbbell * to deal in the Software without restriction, including without limitation
7254885Sdumbbell * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8254885Sdumbbell * and/or sell copies of the Software, and to permit persons to whom the
9254885Sdumbbell * Software is furnished to do so, subject to the following conditions:
10254885Sdumbbell *
11254885Sdumbbell * The above copyright notice and this permission notice shall be included in
12254885Sdumbbell * all copies or substantial portions of the Software.
13254885Sdumbbell *
14254885Sdumbbell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15254885Sdumbbell * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16254885Sdumbbell * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17254885Sdumbbell * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18254885Sdumbbell * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19254885Sdumbbell * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20254885Sdumbbell * OTHER DEALINGS IN THE SOFTWARE.
21254885Sdumbbell *
22254885Sdumbbell * Authors: Alex Deucher
23254885Sdumbbell */
24254885Sdumbbell#ifndef __NI_REG_H__
25254885Sdumbbell#define __NI_REG_H__
26254885Sdumbbell
27254885Sdumbbell#include <sys/cdefs.h>
28254885Sdumbbell__FBSDID("$FreeBSD: releng/11.0/sys/dev/drm2/radeon/ni_reg.h 254885 2013-08-25 19:37:15Z dumbbell $");
29254885Sdumbbell
30254885Sdumbbell/* northern islands - DCE5 */
31254885Sdumbbell
32254885Sdumbbell#define NI_INPUT_GAMMA_CONTROL                         0x6840
33254885Sdumbbell#       define NI_GRPH_INPUT_GAMMA_MODE(x)             (((x) & 0x3) << 0)
34254885Sdumbbell#       define NI_INPUT_GAMMA_USE_LUT                  0
35254885Sdumbbell#       define NI_INPUT_GAMMA_BYPASS                   1
36254885Sdumbbell#       define NI_INPUT_GAMMA_SRGB_24                  2
37254885Sdumbbell#       define NI_INPUT_GAMMA_XVYCC_222                3
38254885Sdumbbell#       define NI_OVL_INPUT_GAMMA_MODE(x)              (((x) & 0x3) << 4)
39254885Sdumbbell
40254885Sdumbbell#define NI_PRESCALE_GRPH_CONTROL                       0x68b4
41254885Sdumbbell#       define NI_GRPH_PRESCALE_BYPASS                 (1 << 4)
42254885Sdumbbell
43254885Sdumbbell#define NI_PRESCALE_OVL_CONTROL                        0x68c4
44254885Sdumbbell#       define NI_OVL_PRESCALE_BYPASS                  (1 << 4)
45254885Sdumbbell
46254885Sdumbbell#define NI_INPUT_CSC_CONTROL                           0x68d4
47254885Sdumbbell#       define NI_INPUT_CSC_GRPH_MODE(x)               (((x) & 0x3) << 0)
48254885Sdumbbell#       define NI_INPUT_CSC_BYPASS                     0
49254885Sdumbbell#       define NI_INPUT_CSC_PROG_COEFF                 1
50254885Sdumbbell#       define NI_INPUT_CSC_PROG_SHARED_MATRIXA        2
51254885Sdumbbell#       define NI_INPUT_CSC_OVL_MODE(x)                (((x) & 0x3) << 4)
52254885Sdumbbell
53254885Sdumbbell#define NI_OUTPUT_CSC_CONTROL                          0x68f0
54254885Sdumbbell#       define NI_OUTPUT_CSC_GRPH_MODE(x)              (((x) & 0x7) << 0)
55254885Sdumbbell#       define NI_OUTPUT_CSC_BYPASS                    0
56254885Sdumbbell#       define NI_OUTPUT_CSC_TV_RGB                    1
57254885Sdumbbell#       define NI_OUTPUT_CSC_YCBCR_601                 2
58254885Sdumbbell#       define NI_OUTPUT_CSC_YCBCR_709                 3
59254885Sdumbbell#       define NI_OUTPUT_CSC_PROG_COEFF                4
60254885Sdumbbell#       define NI_OUTPUT_CSC_PROG_SHARED_MATRIXB       5
61254885Sdumbbell#       define NI_OUTPUT_CSC_OVL_MODE(x)               (((x) & 0x7) << 4)
62254885Sdumbbell
63254885Sdumbbell#define NI_DEGAMMA_CONTROL                             0x6960
64254885Sdumbbell#       define NI_GRPH_DEGAMMA_MODE(x)                 (((x) & 0x3) << 0)
65254885Sdumbbell#       define NI_DEGAMMA_BYPASS                       0
66254885Sdumbbell#       define NI_DEGAMMA_SRGB_24                      1
67254885Sdumbbell#       define NI_DEGAMMA_XVYCC_222                    2
68254885Sdumbbell#       define NI_OVL_DEGAMMA_MODE(x)                  (((x) & 0x3) << 4)
69254885Sdumbbell#       define NI_ICON_DEGAMMA_MODE(x)                 (((x) & 0x3) << 8)
70254885Sdumbbell#       define NI_CURSOR_DEGAMMA_MODE(x)               (((x) & 0x3) << 12)
71254885Sdumbbell
72254885Sdumbbell#define NI_GAMUT_REMAP_CONTROL                         0x6964
73254885Sdumbbell#       define NI_GRPH_GAMUT_REMAP_MODE(x)             (((x) & 0x3) << 0)
74254885Sdumbbell#       define NI_GAMUT_REMAP_BYPASS                   0
75254885Sdumbbell#       define NI_GAMUT_REMAP_PROG_COEFF               1
76254885Sdumbbell#       define NI_GAMUT_REMAP_PROG_SHARED_MATRIXA      2
77254885Sdumbbell#       define NI_GAMUT_REMAP_PROG_SHARED_MATRIXB      3
78254885Sdumbbell#       define NI_OVL_GAMUT_REMAP_MODE(x)              (((x) & 0x3) << 4)
79254885Sdumbbell
80254885Sdumbbell#define NI_REGAMMA_CONTROL                             0x6a80
81254885Sdumbbell#       define NI_GRPH_REGAMMA_MODE(x)                 (((x) & 0x7) << 0)
82254885Sdumbbell#       define NI_REGAMMA_BYPASS                       0
83254885Sdumbbell#       define NI_REGAMMA_SRGB_24                      1
84254885Sdumbbell#       define NI_REGAMMA_XVYCC_222                    2
85254885Sdumbbell#       define NI_REGAMMA_PROG_A                       3
86254885Sdumbbell#       define NI_REGAMMA_PROG_B                       4
87254885Sdumbbell#       define NI_OVL_REGAMMA_MODE(x)                  (((x) & 0x7) << 4)
88254885Sdumbbell
89254885Sdumbbell#endif
90