xref: /dflybsd-src/sys/dev/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h (revision b843c749addef9340ee7d4e250b09fdd492602a1)
1*b843c749SSergey Zigachev /*
2*b843c749SSergey Zigachev  * Copyright 2012-15 Advanced Micro Devices, Inc.
3*b843c749SSergey Zigachev  *
4*b843c749SSergey Zigachev  * Permission is hereby granted, free of charge, to any person obtaining a
5*b843c749SSergey Zigachev  * copy of this software and associated documentation files (the "Software"),
6*b843c749SSergey Zigachev  * to deal in the Software without restriction, including without limitation
7*b843c749SSergey Zigachev  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*b843c749SSergey Zigachev  *  and/or sell copies of the Software, and to permit persons to whom the
9*b843c749SSergey Zigachev  * Software is furnished to do so, subject to the following conditions:
10*b843c749SSergey Zigachev  *
11*b843c749SSergey Zigachev  * The above copyright notice and this permission notice shall be included in
12*b843c749SSergey Zigachev  * all copies or substantial portions of the Software.
13*b843c749SSergey Zigachev  *
14*b843c749SSergey Zigachev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*b843c749SSergey Zigachev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*b843c749SSergey Zigachev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*b843c749SSergey Zigachev  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*b843c749SSergey Zigachev  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*b843c749SSergey Zigachev  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*b843c749SSergey Zigachev  * OTHER DEALINGS IN THE SOFTWARE.
21*b843c749SSergey Zigachev  *
22*b843c749SSergey Zigachev  * Authors: AMD
23*b843c749SSergey Zigachev  *
24*b843c749SSergey Zigachev  */
25*b843c749SSergey Zigachev 
26*b843c749SSergey Zigachev #ifndef __DC_STREAM_ENCODER_DCN10_H__
27*b843c749SSergey Zigachev #define __DC_STREAM_ENCODER_DCN10_H__
28*b843c749SSergey Zigachev 
29*b843c749SSergey Zigachev #include "stream_encoder.h"
30*b843c749SSergey Zigachev 
31*b843c749SSergey Zigachev #define DCN10STRENC_FROM_STRENC(stream_encoder)\
32*b843c749SSergey Zigachev 	container_of(stream_encoder, struct dcn10_stream_encoder, base)
33*b843c749SSergey Zigachev 
34*b843c749SSergey Zigachev #define SE_COMMON_DCN_REG_LIST(id) \
35*b843c749SSergey Zigachev 	SRI(AFMT_CNTL, DIG, id), \
36*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_0, DIG, id), \
37*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_1, DIG, id), \
38*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_2, DIG, id), \
39*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_3, DIG, id), \
40*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_4, DIG, id), \
41*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_5, DIG, id), \
42*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_6, DIG, id), \
43*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_7, DIG, id), \
44*b843c749SSergey Zigachev 	SRI(AFMT_GENERIC_HDR, DIG, id), \
45*b843c749SSergey Zigachev 	SRI(AFMT_INFOFRAME_CONTROL0, DIG, id), \
46*b843c749SSergey Zigachev 	SRI(AFMT_VBI_PACKET_CONTROL, DIG, id), \
47*b843c749SSergey Zigachev 	SRI(AFMT_VBI_PACKET_CONTROL1, DIG, id), \
48*b843c749SSergey Zigachev 	SRI(AFMT_AUDIO_PACKET_CONTROL, DIG, id), \
49*b843c749SSergey Zigachev 	SRI(AFMT_AUDIO_PACKET_CONTROL2, DIG, id), \
50*b843c749SSergey Zigachev 	SRI(AFMT_AUDIO_SRC_CONTROL, DIG, id), \
51*b843c749SSergey Zigachev 	SRI(AFMT_60958_0, DIG, id), \
52*b843c749SSergey Zigachev 	SRI(AFMT_60958_1, DIG, id), \
53*b843c749SSergey Zigachev 	SRI(AFMT_60958_2, DIG, id), \
54*b843c749SSergey Zigachev 	SRI(DIG_FE_CNTL, DIG, id), \
55*b843c749SSergey Zigachev 	SRI(HDMI_CONTROL, DIG, id), \
56*b843c749SSergey Zigachev 	SRI(HDMI_DB_CONTROL, DIG, id), \
57*b843c749SSergey Zigachev 	SRI(HDMI_GC, DIG, id), \
58*b843c749SSergey Zigachev 	SRI(HDMI_GENERIC_PACKET_CONTROL0, DIG, id), \
59*b843c749SSergey Zigachev 	SRI(HDMI_GENERIC_PACKET_CONTROL1, DIG, id), \
60*b843c749SSergey Zigachev 	SRI(HDMI_GENERIC_PACKET_CONTROL2, DIG, id), \
61*b843c749SSergey Zigachev 	SRI(HDMI_GENERIC_PACKET_CONTROL3, DIG, id), \
62*b843c749SSergey Zigachev 	SRI(HDMI_INFOFRAME_CONTROL0, DIG, id), \
63*b843c749SSergey Zigachev 	SRI(HDMI_INFOFRAME_CONTROL1, DIG, id), \
64*b843c749SSergey Zigachev 	SRI(HDMI_VBI_PACKET_CONTROL, DIG, id), \
65*b843c749SSergey Zigachev 	SRI(HDMI_AUDIO_PACKET_CONTROL, DIG, id),\
66*b843c749SSergey Zigachev 	SRI(HDMI_ACR_PACKET_CONTROL, DIG, id),\
67*b843c749SSergey Zigachev 	SRI(HDMI_ACR_32_0, DIG, id),\
68*b843c749SSergey Zigachev 	SRI(HDMI_ACR_32_1, DIG, id),\
69*b843c749SSergey Zigachev 	SRI(HDMI_ACR_44_0, DIG, id),\
70*b843c749SSergey Zigachev 	SRI(HDMI_ACR_44_1, DIG, id),\
71*b843c749SSergey Zigachev 	SRI(HDMI_ACR_48_0, DIG, id),\
72*b843c749SSergey Zigachev 	SRI(HDMI_ACR_48_1, DIG, id),\
73*b843c749SSergey Zigachev 	SRI(DP_DB_CNTL, DP, id), \
74*b843c749SSergey Zigachev 	SRI(DP_MSA_MISC, DP, id), \
75*b843c749SSergey Zigachev 	SRI(DP_MSA_COLORIMETRY, DP, id), \
76*b843c749SSergey Zigachev 	SRI(DP_MSA_TIMING_PARAM1, DP, id), \
77*b843c749SSergey Zigachev 	SRI(DP_MSA_TIMING_PARAM2, DP, id), \
78*b843c749SSergey Zigachev 	SRI(DP_MSA_TIMING_PARAM3, DP, id), \
79*b843c749SSergey Zigachev 	SRI(DP_MSA_TIMING_PARAM4, DP, id), \
80*b843c749SSergey Zigachev 	SRI(DP_MSE_RATE_CNTL, DP, id), \
81*b843c749SSergey Zigachev 	SRI(DP_MSE_RATE_UPDATE, DP, id), \
82*b843c749SSergey Zigachev 	SRI(DP_PIXEL_FORMAT, DP, id), \
83*b843c749SSergey Zigachev 	SRI(DP_SEC_CNTL, DP, id), \
84*b843c749SSergey Zigachev 	SRI(DP_STEER_FIFO, DP, id), \
85*b843c749SSergey Zigachev 	SRI(DP_VID_M, DP, id), \
86*b843c749SSergey Zigachev 	SRI(DP_VID_N, DP, id), \
87*b843c749SSergey Zigachev 	SRI(DP_VID_STREAM_CNTL, DP, id), \
88*b843c749SSergey Zigachev 	SRI(DP_VID_TIMING, DP, id), \
89*b843c749SSergey Zigachev 	SRI(DP_SEC_AUD_N, DP, id), \
90*b843c749SSergey Zigachev 	SRI(DP_SEC_TIMESTAMP, DP, id)
91*b843c749SSergey Zigachev 
92*b843c749SSergey Zigachev #define SE_DCN_REG_LIST(id)\
93*b843c749SSergey Zigachev 	SE_COMMON_DCN_REG_LIST(id)
94*b843c749SSergey Zigachev 
95*b843c749SSergey Zigachev 
96*b843c749SSergey Zigachev struct dcn10_stream_enc_registers {
97*b843c749SSergey Zigachev 	uint32_t AFMT_CNTL;
98*b843c749SSergey Zigachev 	uint32_t AFMT_AVI_INFO0;
99*b843c749SSergey Zigachev 	uint32_t AFMT_AVI_INFO1;
100*b843c749SSergey Zigachev 	uint32_t AFMT_AVI_INFO2;
101*b843c749SSergey Zigachev 	uint32_t AFMT_AVI_INFO3;
102*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_0;
103*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_1;
104*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_2;
105*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_3;
106*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_4;
107*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_5;
108*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_6;
109*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_7;
110*b843c749SSergey Zigachev 	uint32_t AFMT_GENERIC_HDR;
111*b843c749SSergey Zigachev 	uint32_t AFMT_INFOFRAME_CONTROL0;
112*b843c749SSergey Zigachev 	uint32_t AFMT_VBI_PACKET_CONTROL;
113*b843c749SSergey Zigachev 	uint32_t AFMT_VBI_PACKET_CONTROL1;
114*b843c749SSergey Zigachev 	uint32_t AFMT_AUDIO_PACKET_CONTROL;
115*b843c749SSergey Zigachev 	uint32_t AFMT_AUDIO_PACKET_CONTROL2;
116*b843c749SSergey Zigachev 	uint32_t AFMT_AUDIO_SRC_CONTROL;
117*b843c749SSergey Zigachev 	uint32_t AFMT_60958_0;
118*b843c749SSergey Zigachev 	uint32_t AFMT_60958_1;
119*b843c749SSergey Zigachev 	uint32_t AFMT_60958_2;
120*b843c749SSergey Zigachev 	uint32_t DIG_FE_CNTL;
121*b843c749SSergey Zigachev 	uint32_t DP_MSE_RATE_CNTL;
122*b843c749SSergey Zigachev 	uint32_t DP_MSE_RATE_UPDATE;
123*b843c749SSergey Zigachev 	uint32_t DP_PIXEL_FORMAT;
124*b843c749SSergey Zigachev 	uint32_t DP_SEC_CNTL;
125*b843c749SSergey Zigachev 	uint32_t DP_STEER_FIFO;
126*b843c749SSergey Zigachev 	uint32_t DP_VID_M;
127*b843c749SSergey Zigachev 	uint32_t DP_VID_N;
128*b843c749SSergey Zigachev 	uint32_t DP_VID_STREAM_CNTL;
129*b843c749SSergey Zigachev 	uint32_t DP_VID_TIMING;
130*b843c749SSergey Zigachev 	uint32_t DP_SEC_AUD_N;
131*b843c749SSergey Zigachev 	uint32_t DP_SEC_TIMESTAMP;
132*b843c749SSergey Zigachev 	uint32_t HDMI_CONTROL;
133*b843c749SSergey Zigachev 	uint32_t HDMI_GC;
134*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL0;
135*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL1;
136*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL2;
137*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL3;
138*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL4;
139*b843c749SSergey Zigachev 	uint32_t HDMI_GENERIC_PACKET_CONTROL5;
140*b843c749SSergey Zigachev 	uint32_t HDMI_INFOFRAME_CONTROL0;
141*b843c749SSergey Zigachev 	uint32_t HDMI_INFOFRAME_CONTROL1;
142*b843c749SSergey Zigachev 	uint32_t HDMI_VBI_PACKET_CONTROL;
143*b843c749SSergey Zigachev 	uint32_t HDMI_AUDIO_PACKET_CONTROL;
144*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_PACKET_CONTROL;
145*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_32_0;
146*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_32_1;
147*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_44_0;
148*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_44_1;
149*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_48_0;
150*b843c749SSergey Zigachev 	uint32_t HDMI_ACR_48_1;
151*b843c749SSergey Zigachev 	uint32_t DP_DB_CNTL;
152*b843c749SSergey Zigachev 	uint32_t DP_MSA_MISC;
153*b843c749SSergey Zigachev 	uint32_t DP_MSA_COLORIMETRY;
154*b843c749SSergey Zigachev 	uint32_t DP_MSA_TIMING_PARAM1;
155*b843c749SSergey Zigachev 	uint32_t DP_MSA_TIMING_PARAM2;
156*b843c749SSergey Zigachev 	uint32_t DP_MSA_TIMING_PARAM3;
157*b843c749SSergey Zigachev 	uint32_t DP_MSA_TIMING_PARAM4;
158*b843c749SSergey Zigachev 	uint32_t HDMI_DB_CONTROL;
159*b843c749SSergey Zigachev };
160*b843c749SSergey Zigachev 
161*b843c749SSergey Zigachev 
162*b843c749SSergey Zigachev #define SE_SF(reg_name, field_name, post_fix)\
163*b843c749SSergey Zigachev 	.field_name = reg_name ## __ ## field_name ## post_fix
164*b843c749SSergey Zigachev 
165*b843c749SSergey Zigachev #define SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)\
166*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_INDEX, mask_sh),\
167*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_GENERIC_HDR, AFMT_GENERIC_HB0, mask_sh),\
168*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_GENERIC_HDR, AFMT_GENERIC_HB1, mask_sh),\
169*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_GENERIC_HDR, AFMT_GENERIC_HB2, mask_sh),\
170*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_GENERIC_HDR, AFMT_GENERIC_HB3, mask_sh),\
171*b843c749SSergey Zigachev 	SE_SF(DP0_DP_PIXEL_FORMAT, DP_PIXEL_ENCODING, mask_sh),\
172*b843c749SSergey Zigachev 	SE_SF(DP0_DP_PIXEL_FORMAT, DP_COMPONENT_DEPTH, mask_sh),\
173*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_PACKET_GEN_VERSION, mask_sh),\
174*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_KEEPOUT_MODE, mask_sh),\
175*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_DEEP_COLOR_ENABLE, mask_sh),\
176*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_DEEP_COLOR_DEPTH, mask_sh),\
177*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_DATA_SCRAMBLE_EN, mask_sh),\
178*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_VBI_PACKET_CONTROL, HDMI_GC_CONT, mask_sh),\
179*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_VBI_PACKET_CONTROL, HDMI_GC_SEND, mask_sh),\
180*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_VBI_PACKET_CONTROL, HDMI_NULL_SEND, mask_sh),\
181*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_INFOFRAME_CONTROL0, HDMI_AUDIO_INFO_SEND, mask_sh),\
182*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_INFOFRAME_CONTROL0, AFMT_AUDIO_INFO_UPDATE, mask_sh),\
183*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_INFOFRAME_CONTROL1, HDMI_AUDIO_INFO_LINE, mask_sh),\
184*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GC, HDMI_GC_AVMUTE, mask_sh),\
185*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSE_RATE_CNTL, DP_MSE_RATE_X, mask_sh),\
186*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSE_RATE_CNTL, DP_MSE_RATE_Y, mask_sh),\
187*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSE_RATE_UPDATE, DP_MSE_RATE_UPDATE_PENDING, mask_sh),\
188*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP0_ENABLE, mask_sh),\
189*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_STREAM_ENABLE, mask_sh),\
190*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP1_ENABLE, mask_sh),\
191*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP2_ENABLE, mask_sh),\
192*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP3_ENABLE, mask_sh),\
193*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_MPG_ENABLE, mask_sh),\
194*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_STREAM_CNTL, DP_VID_STREAM_DIS_DEFER, mask_sh),\
195*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_STREAM_CNTL, DP_VID_STREAM_ENABLE, mask_sh),\
196*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_STREAM_CNTL, DP_VID_STREAM_STATUS, mask_sh),\
197*b843c749SSergey Zigachev 	SE_SF(DP0_DP_STEER_FIFO, DP_STEER_FIFO_RESET, mask_sh),\
198*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_TIMING, DP_VID_M_N_GEN_EN, mask_sh),\
199*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_N, DP_VID_N, mask_sh),\
200*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_M, DP_VID_M, mask_sh),\
201*b843c749SSergey Zigachev 	SE_SF(DIG0_DIG_FE_CNTL, DIG_START, mask_sh),\
202*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_SRC_CONTROL, AFMT_AUDIO_SRC_SELECT, mask_sh),\
203*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_PACKET_CONTROL2, AFMT_AUDIO_CHANNEL_ENABLE, mask_sh),\
204*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_AUDIO_PACKET_CONTROL, HDMI_AUDIO_PACKETS_PER_LINE, mask_sh),\
205*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_AUDIO_PACKET_CONTROL, HDMI_AUDIO_DELAY_EN, mask_sh),\
206*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_PACKET_CONTROL, AFMT_60958_CS_UPDATE, mask_sh),\
207*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_PACKET_CONTROL2, AFMT_AUDIO_LAYOUT_OVRD, mask_sh),\
208*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_PACKET_CONTROL2, AFMT_60958_OSF_OVRD, mask_sh),\
209*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_PACKET_CONTROL, HDMI_ACR_AUTO_SEND, mask_sh),\
210*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_PACKET_CONTROL, HDMI_ACR_SOURCE, mask_sh),\
211*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_PACKET_CONTROL, HDMI_ACR_AUDIO_PRIORITY, mask_sh),\
212*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_32_0, HDMI_ACR_CTS_32, mask_sh),\
213*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_32_1, HDMI_ACR_N_32, mask_sh),\
214*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_44_0, HDMI_ACR_CTS_44, mask_sh),\
215*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_44_1, HDMI_ACR_N_44, mask_sh),\
216*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_48_0, HDMI_ACR_CTS_48, mask_sh),\
217*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_ACR_48_1, HDMI_ACR_N_48, mask_sh),\
218*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_0, AFMT_60958_CS_CHANNEL_NUMBER_L, mask_sh),\
219*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_0, AFMT_60958_CS_CLOCK_ACCURACY, mask_sh),\
220*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_1, AFMT_60958_CS_CHANNEL_NUMBER_R, mask_sh),\
221*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_2, mask_sh),\
222*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_3, mask_sh),\
223*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_4, mask_sh),\
224*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_5, mask_sh),\
225*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_6, mask_sh),\
226*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_60958_2, AFMT_60958_CS_CHANNEL_NUMBER_7, mask_sh),\
227*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_AUD_N, DP_SEC_AUD_N, mask_sh),\
228*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_TIMESTAMP, DP_SEC_TIMESTAMP_MODE, mask_sh),\
229*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_ASP_ENABLE, mask_sh),\
230*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_ATP_ENABLE, mask_sh),\
231*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_AIP_ENABLE, mask_sh),\
232*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_ACM_ENABLE, mask_sh),\
233*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_AUDIO_PACKET_CONTROL, AFMT_AUDIO_SAMPLE_SEND, mask_sh),\
234*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, mask_sh),\
235*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_CONTROL, HDMI_CLOCK_CHANNEL_RATE, mask_sh),\
236*b843c749SSergey Zigachev 	SE_SF(DIG0_DIG_FE_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\
237*b843c749SSergey Zigachev 	SE_SF(DIG0_DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh),\
238*b843c749SSergey Zigachev 	SE_SF(DIG0_DIG_FE_CNTL, DIG_STEREOSYNC_SELECT, mask_sh),\
239*b843c749SSergey Zigachev 	SE_SF(DIG0_DIG_FE_CNTL, DIG_STEREOSYNC_GATE_EN, mask_sh),\
240*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_LOCK_STATUS, mask_sh),\
241*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_CONFLICT, mask_sh),\
242*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_CONFLICT_CLR, mask_sh),\
243*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC0_FRAME_UPDATE_PENDING, mask_sh),\
244*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC1_FRAME_UPDATE_PENDING, mask_sh),\
245*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC2_FRAME_UPDATE_PENDING, mask_sh),\
246*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC3_FRAME_UPDATE_PENDING, mask_sh),\
247*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC4_FRAME_UPDATE_PENDING, mask_sh),\
248*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC5_FRAME_UPDATE_PENDING, mask_sh),\
249*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC6_FRAME_UPDATE_PENDING, mask_sh),\
250*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC7_FRAME_UPDATE_PENDING, mask_sh),\
251*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC0_FRAME_UPDATE, mask_sh),\
252*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC1_FRAME_UPDATE, mask_sh),\
253*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC2_FRAME_UPDATE, mask_sh),\
254*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC3_FRAME_UPDATE, mask_sh),\
255*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC4_FRAME_UPDATE, mask_sh),\
256*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC5_FRAME_UPDATE, mask_sh),\
257*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC6_FRAME_UPDATE, mask_sh),\
258*b843c749SSergey Zigachev 	SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL1, AFMT_GENERIC7_FRAME_UPDATE, mask_sh),\
259*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP4_ENABLE, mask_sh),\
260*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP5_ENABLE, mask_sh),\
261*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP6_ENABLE, mask_sh),\
262*b843c749SSergey Zigachev 	SE_SF(DP0_DP_SEC_CNTL, DP_SEC_GSP7_ENABLE, mask_sh),\
263*b843c749SSergey Zigachev 	SE_SF(DP0_DP_DB_CNTL, DP_DB_DISABLE, mask_sh),\
264*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_COLORIMETRY, DP_MSA_MISC0, mask_sh),\
265*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM1, DP_MSA_HTOTAL, mask_sh),\
266*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM1, DP_MSA_VTOTAL, mask_sh),\
267*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM2, DP_MSA_HSTART, mask_sh),\
268*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM2, DP_MSA_VSTART, mask_sh),\
269*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM3, DP_MSA_HSYNCWIDTH, mask_sh),\
270*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM3, DP_MSA_HSYNCPOLARITY, mask_sh),\
271*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM3, DP_MSA_VSYNCWIDTH, mask_sh),\
272*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM3, DP_MSA_VSYNCPOLARITY, mask_sh),\
273*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM4, DP_MSA_HWIDTH, mask_sh),\
274*b843c749SSergey Zigachev 	SE_SF(DP0_DP_MSA_TIMING_PARAM4, DP_MSA_VHEIGHT, mask_sh),\
275*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_DB_CONTROL, HDMI_DB_DISABLE, mask_sh),\
276*b843c749SSergey Zigachev 	SE_SF(DP0_DP_VID_TIMING, DP_VID_N_MUL, mask_sh)
277*b843c749SSergey Zigachev 
278*b843c749SSergey Zigachev #define SE_COMMON_MASK_SH_LIST_SOC(mask_sh)\
279*b843c749SSergey Zigachev 	SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)
280*b843c749SSergey Zigachev 
281*b843c749SSergey Zigachev #define SE_COMMON_MASK_SH_LIST_DCN10(mask_sh)\
282*b843c749SSergey Zigachev 	SE_COMMON_MASK_SH_LIST_SOC(mask_sh),\
283*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC0_CONT, mask_sh),\
284*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC0_SEND, mask_sh),\
285*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC0_LINE, mask_sh),\
286*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC1_CONT, mask_sh),\
287*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC1_SEND, mask_sh),\
288*b843c749SSergey Zigachev 	SE_SF(DIG0_HDMI_GENERIC_PACKET_CONTROL0, HDMI_GENERIC1_LINE, mask_sh)
289*b843c749SSergey Zigachev 
290*b843c749SSergey Zigachev 
291*b843c749SSergey Zigachev #define SE_REG_FIELD_LIST_DCN1_0(type) \
292*b843c749SSergey Zigachev 	type AFMT_GENERIC_INDEX;\
293*b843c749SSergey Zigachev 	type AFMT_GENERIC_HB0;\
294*b843c749SSergey Zigachev 	type AFMT_GENERIC_HB1;\
295*b843c749SSergey Zigachev 	type AFMT_GENERIC_HB2;\
296*b843c749SSergey Zigachev 	type AFMT_GENERIC_HB3;\
297*b843c749SSergey Zigachev 	type AFMT_GENERIC_LOCK_STATUS;\
298*b843c749SSergey Zigachev 	type AFMT_GENERIC_CONFLICT;\
299*b843c749SSergey Zigachev 	type AFMT_GENERIC_CONFLICT_CLR;\
300*b843c749SSergey Zigachev 	type AFMT_GENERIC0_FRAME_UPDATE_PENDING;\
301*b843c749SSergey Zigachev 	type AFMT_GENERIC1_FRAME_UPDATE_PENDING;\
302*b843c749SSergey Zigachev 	type AFMT_GENERIC2_FRAME_UPDATE_PENDING;\
303*b843c749SSergey Zigachev 	type AFMT_GENERIC3_FRAME_UPDATE_PENDING;\
304*b843c749SSergey Zigachev 	type AFMT_GENERIC4_FRAME_UPDATE_PENDING;\
305*b843c749SSergey Zigachev 	type AFMT_GENERIC5_FRAME_UPDATE_PENDING;\
306*b843c749SSergey Zigachev 	type AFMT_GENERIC6_FRAME_UPDATE_PENDING;\
307*b843c749SSergey Zigachev 	type AFMT_GENERIC7_FRAME_UPDATE_PENDING;\
308*b843c749SSergey Zigachev 	type AFMT_GENERIC0_FRAME_UPDATE;\
309*b843c749SSergey Zigachev 	type AFMT_GENERIC1_FRAME_UPDATE;\
310*b843c749SSergey Zigachev 	type AFMT_GENERIC2_FRAME_UPDATE;\
311*b843c749SSergey Zigachev 	type AFMT_GENERIC3_FRAME_UPDATE;\
312*b843c749SSergey Zigachev 	type AFMT_GENERIC4_FRAME_UPDATE;\
313*b843c749SSergey Zigachev 	type AFMT_GENERIC5_FRAME_UPDATE;\
314*b843c749SSergey Zigachev 	type AFMT_GENERIC6_FRAME_UPDATE;\
315*b843c749SSergey Zigachev 	type AFMT_GENERIC7_FRAME_UPDATE;\
316*b843c749SSergey Zigachev 	type HDMI_GENERIC0_CONT;\
317*b843c749SSergey Zigachev 	type HDMI_GENERIC0_SEND;\
318*b843c749SSergey Zigachev 	type HDMI_GENERIC0_LINE;\
319*b843c749SSergey Zigachev 	type HDMI_GENERIC1_CONT;\
320*b843c749SSergey Zigachev 	type HDMI_GENERIC1_SEND;\
321*b843c749SSergey Zigachev 	type HDMI_GENERIC1_LINE;\
322*b843c749SSergey Zigachev 	type HDMI_GENERIC2_CONT;\
323*b843c749SSergey Zigachev 	type HDMI_GENERIC2_SEND;\
324*b843c749SSergey Zigachev 	type HDMI_GENERIC2_LINE;\
325*b843c749SSergey Zigachev 	type HDMI_GENERIC3_CONT;\
326*b843c749SSergey Zigachev 	type HDMI_GENERIC3_SEND;\
327*b843c749SSergey Zigachev 	type HDMI_GENERIC3_LINE;\
328*b843c749SSergey Zigachev 	type HDMI_GENERIC4_CONT;\
329*b843c749SSergey Zigachev 	type HDMI_GENERIC4_SEND;\
330*b843c749SSergey Zigachev 	type HDMI_GENERIC4_LINE;\
331*b843c749SSergey Zigachev 	type HDMI_GENERIC5_CONT;\
332*b843c749SSergey Zigachev 	type HDMI_GENERIC5_SEND;\
333*b843c749SSergey Zigachev 	type HDMI_GENERIC5_LINE;\
334*b843c749SSergey Zigachev 	type HDMI_GENERIC6_CONT;\
335*b843c749SSergey Zigachev 	type HDMI_GENERIC6_SEND;\
336*b843c749SSergey Zigachev 	type HDMI_GENERIC6_LINE;\
337*b843c749SSergey Zigachev 	type HDMI_GENERIC7_CONT;\
338*b843c749SSergey Zigachev 	type HDMI_GENERIC7_SEND;\
339*b843c749SSergey Zigachev 	type HDMI_GENERIC7_LINE;\
340*b843c749SSergey Zigachev 	type DP_PIXEL_ENCODING;\
341*b843c749SSergey Zigachev 	type DP_COMPONENT_DEPTH;\
342*b843c749SSergey Zigachev 	type HDMI_PACKET_GEN_VERSION;\
343*b843c749SSergey Zigachev 	type HDMI_KEEPOUT_MODE;\
344*b843c749SSergey Zigachev 	type HDMI_DEEP_COLOR_ENABLE;\
345*b843c749SSergey Zigachev 	type HDMI_CLOCK_CHANNEL_RATE;\
346*b843c749SSergey Zigachev 	type HDMI_DEEP_COLOR_DEPTH;\
347*b843c749SSergey Zigachev 	type HDMI_GC_CONT;\
348*b843c749SSergey Zigachev 	type HDMI_GC_SEND;\
349*b843c749SSergey Zigachev 	type HDMI_NULL_SEND;\
350*b843c749SSergey Zigachev 	type HDMI_DATA_SCRAMBLE_EN;\
351*b843c749SSergey Zigachev 	type HDMI_AUDIO_INFO_SEND;\
352*b843c749SSergey Zigachev 	type AFMT_AUDIO_INFO_UPDATE;\
353*b843c749SSergey Zigachev 	type HDMI_AUDIO_INFO_LINE;\
354*b843c749SSergey Zigachev 	type HDMI_GC_AVMUTE;\
355*b843c749SSergey Zigachev 	type DP_MSE_RATE_X;\
356*b843c749SSergey Zigachev 	type DP_MSE_RATE_Y;\
357*b843c749SSergey Zigachev 	type DP_MSE_RATE_UPDATE_PENDING;\
358*b843c749SSergey Zigachev 	type DP_SEC_GSP0_ENABLE;\
359*b843c749SSergey Zigachev 	type DP_SEC_STREAM_ENABLE;\
360*b843c749SSergey Zigachev 	type DP_SEC_GSP1_ENABLE;\
361*b843c749SSergey Zigachev 	type DP_SEC_GSP2_ENABLE;\
362*b843c749SSergey Zigachev 	type DP_SEC_GSP3_ENABLE;\
363*b843c749SSergey Zigachev 	type DP_SEC_GSP4_ENABLE;\
364*b843c749SSergey Zigachev 	type DP_SEC_GSP5_ENABLE;\
365*b843c749SSergey Zigachev 	type DP_SEC_GSP6_ENABLE;\
366*b843c749SSergey Zigachev 	type DP_SEC_GSP7_ENABLE;\
367*b843c749SSergey Zigachev 	type DP_SEC_MPG_ENABLE;\
368*b843c749SSergey Zigachev 	type DP_VID_STREAM_DIS_DEFER;\
369*b843c749SSergey Zigachev 	type DP_VID_STREAM_ENABLE;\
370*b843c749SSergey Zigachev 	type DP_VID_STREAM_STATUS;\
371*b843c749SSergey Zigachev 	type DP_STEER_FIFO_RESET;\
372*b843c749SSergey Zigachev 	type DP_VID_M_N_GEN_EN;\
373*b843c749SSergey Zigachev 	type DP_VID_N;\
374*b843c749SSergey Zigachev 	type DP_VID_M;\
375*b843c749SSergey Zigachev 	type DIG_START;\
376*b843c749SSergey Zigachev 	type AFMT_AUDIO_SRC_SELECT;\
377*b843c749SSergey Zigachev 	type AFMT_AUDIO_CHANNEL_ENABLE;\
378*b843c749SSergey Zigachev 	type HDMI_AUDIO_PACKETS_PER_LINE;\
379*b843c749SSergey Zigachev 	type HDMI_AUDIO_DELAY_EN;\
380*b843c749SSergey Zigachev 	type AFMT_60958_CS_UPDATE;\
381*b843c749SSergey Zigachev 	type AFMT_AUDIO_LAYOUT_OVRD;\
382*b843c749SSergey Zigachev 	type AFMT_60958_OSF_OVRD;\
383*b843c749SSergey Zigachev 	type HDMI_ACR_AUTO_SEND;\
384*b843c749SSergey Zigachev 	type HDMI_ACR_SOURCE;\
385*b843c749SSergey Zigachev 	type HDMI_ACR_AUDIO_PRIORITY;\
386*b843c749SSergey Zigachev 	type HDMI_ACR_CTS_32;\
387*b843c749SSergey Zigachev 	type HDMI_ACR_N_32;\
388*b843c749SSergey Zigachev 	type HDMI_ACR_CTS_44;\
389*b843c749SSergey Zigachev 	type HDMI_ACR_N_44;\
390*b843c749SSergey Zigachev 	type HDMI_ACR_CTS_48;\
391*b843c749SSergey Zigachev 	type HDMI_ACR_N_48;\
392*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_L;\
393*b843c749SSergey Zigachev 	type AFMT_60958_CS_CLOCK_ACCURACY;\
394*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_R;\
395*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_2;\
396*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_3;\
397*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_4;\
398*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_5;\
399*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_6;\
400*b843c749SSergey Zigachev 	type AFMT_60958_CS_CHANNEL_NUMBER_7;\
401*b843c749SSergey Zigachev 	type DP_SEC_AUD_N;\
402*b843c749SSergey Zigachev 	type DP_SEC_TIMESTAMP_MODE;\
403*b843c749SSergey Zigachev 	type DP_SEC_ASP_ENABLE;\
404*b843c749SSergey Zigachev 	type DP_SEC_ATP_ENABLE;\
405*b843c749SSergey Zigachev 	type DP_SEC_AIP_ENABLE;\
406*b843c749SSergey Zigachev 	type DP_SEC_ACM_ENABLE;\
407*b843c749SSergey Zigachev 	type AFMT_AUDIO_SAMPLE_SEND;\
408*b843c749SSergey Zigachev 	type AFMT_AUDIO_CLOCK_EN;\
409*b843c749SSergey Zigachev 	type TMDS_PIXEL_ENCODING;\
410*b843c749SSergey Zigachev 	type TMDS_COLOR_FORMAT;\
411*b843c749SSergey Zigachev 	type DIG_STEREOSYNC_SELECT;\
412*b843c749SSergey Zigachev 	type DIG_STEREOSYNC_GATE_EN;\
413*b843c749SSergey Zigachev 	type DP_DB_DISABLE;\
414*b843c749SSergey Zigachev 	type DP_MSA_MISC0;\
415*b843c749SSergey Zigachev 	type DP_MSA_HTOTAL;\
416*b843c749SSergey Zigachev 	type DP_MSA_VTOTAL;\
417*b843c749SSergey Zigachev 	type DP_MSA_HSTART;\
418*b843c749SSergey Zigachev 	type DP_MSA_VSTART;\
419*b843c749SSergey Zigachev 	type DP_MSA_HSYNCWIDTH;\
420*b843c749SSergey Zigachev 	type DP_MSA_HSYNCPOLARITY;\
421*b843c749SSergey Zigachev 	type DP_MSA_VSYNCWIDTH;\
422*b843c749SSergey Zigachev 	type DP_MSA_VSYNCPOLARITY;\
423*b843c749SSergey Zigachev 	type DP_MSA_HWIDTH;\
424*b843c749SSergey Zigachev 	type DP_MSA_VHEIGHT;\
425*b843c749SSergey Zigachev 	type HDMI_DB_DISABLE;\
426*b843c749SSergey Zigachev 	type DP_VID_N_MUL;\
427*b843c749SSergey Zigachev 	type DP_VID_M_DOUBLE_VALUE_EN
428*b843c749SSergey Zigachev 
429*b843c749SSergey Zigachev struct dcn10_stream_encoder_shift {
430*b843c749SSergey Zigachev 	SE_REG_FIELD_LIST_DCN1_0(uint8_t);
431*b843c749SSergey Zigachev };
432*b843c749SSergey Zigachev 
433*b843c749SSergey Zigachev struct dcn10_stream_encoder_mask {
434*b843c749SSergey Zigachev 	SE_REG_FIELD_LIST_DCN1_0(uint32_t);
435*b843c749SSergey Zigachev };
436*b843c749SSergey Zigachev 
437*b843c749SSergey Zigachev struct dcn10_stream_encoder {
438*b843c749SSergey Zigachev 	struct stream_encoder base;
439*b843c749SSergey Zigachev 	const struct dcn10_stream_enc_registers *regs;
440*b843c749SSergey Zigachev 	const struct dcn10_stream_encoder_shift *se_shift;
441*b843c749SSergey Zigachev 	const struct dcn10_stream_encoder_mask *se_mask;
442*b843c749SSergey Zigachev };
443*b843c749SSergey Zigachev 
444*b843c749SSergey Zigachev void dcn10_stream_encoder_construct(
445*b843c749SSergey Zigachev 	struct dcn10_stream_encoder *enc1,
446*b843c749SSergey Zigachev 	struct dc_context *ctx,
447*b843c749SSergey Zigachev 	struct dc_bios *bp,
448*b843c749SSergey Zigachev 	enum engine_id eng_id,
449*b843c749SSergey Zigachev 	const struct dcn10_stream_enc_registers *regs,
450*b843c749SSergey Zigachev 	const struct dcn10_stream_encoder_shift *se_shift,
451*b843c749SSergey Zigachev 	const struct dcn10_stream_encoder_mask *se_mask);
452*b843c749SSergey Zigachev 
453*b843c749SSergey Zigachev void enc1_update_generic_info_packet(
454*b843c749SSergey Zigachev 	struct dcn10_stream_encoder *enc1,
455*b843c749SSergey Zigachev 	uint32_t packet_index,
456*b843c749SSergey Zigachev 	const struct dc_info_packet *info_packet);
457*b843c749SSergey Zigachev 
458*b843c749SSergey Zigachev void enc1_stream_encoder_dp_set_stream_attribute(
459*b843c749SSergey Zigachev 	struct stream_encoder *enc,
460*b843c749SSergey Zigachev 	struct dc_crtc_timing *crtc_timing,
461*b843c749SSergey Zigachev 	enum dc_color_space output_color_space);
462*b843c749SSergey Zigachev 
463*b843c749SSergey Zigachev void enc1_stream_encoder_hdmi_set_stream_attribute(
464*b843c749SSergey Zigachev 	struct stream_encoder *enc,
465*b843c749SSergey Zigachev 	struct dc_crtc_timing *crtc_timing,
466*b843c749SSergey Zigachev 	int actual_pix_clk_khz,
467*b843c749SSergey Zigachev 	bool enable_audio);
468*b843c749SSergey Zigachev 
469*b843c749SSergey Zigachev void enc1_stream_encoder_dvi_set_stream_attribute(
470*b843c749SSergey Zigachev 	struct stream_encoder *enc,
471*b843c749SSergey Zigachev 	struct dc_crtc_timing *crtc_timing,
472*b843c749SSergey Zigachev 	bool is_dual_link);
473*b843c749SSergey Zigachev 
474*b843c749SSergey Zigachev void enc1_stream_encoder_set_mst_bandwidth(
475*b843c749SSergey Zigachev 	struct stream_encoder *enc,
476*b843c749SSergey Zigachev 	struct fixed31_32 avg_time_slots_per_mtp);
477*b843c749SSergey Zigachev 
478*b843c749SSergey Zigachev void enc1_stream_encoder_update_dp_info_packets(
479*b843c749SSergey Zigachev 	struct stream_encoder *enc,
480*b843c749SSergey Zigachev 	const struct encoder_info_frame *info_frame);
481*b843c749SSergey Zigachev 
482*b843c749SSergey Zigachev void enc1_stream_encoder_stop_dp_info_packets(
483*b843c749SSergey Zigachev 	struct stream_encoder *enc);
484*b843c749SSergey Zigachev 
485*b843c749SSergey Zigachev void enc1_stream_encoder_dp_blank(
486*b843c749SSergey Zigachev 	struct stream_encoder *enc);
487*b843c749SSergey Zigachev 
488*b843c749SSergey Zigachev void enc1_stream_encoder_dp_unblank(
489*b843c749SSergey Zigachev 	struct stream_encoder *enc,
490*b843c749SSergey Zigachev 	const struct encoder_unblank_param *param);
491*b843c749SSergey Zigachev 
492*b843c749SSergey Zigachev void enc1_setup_stereo_sync(
493*b843c749SSergey Zigachev 	struct stream_encoder *enc,
494*b843c749SSergey Zigachev 	int tg_inst, bool enable);
495*b843c749SSergey Zigachev 
496*b843c749SSergey Zigachev void enc1_stream_encoder_set_avmute(
497*b843c749SSergey Zigachev 	struct stream_encoder *enc,
498*b843c749SSergey Zigachev 	bool enable);
499*b843c749SSergey Zigachev 
500*b843c749SSergey Zigachev void enc1_se_audio_mute_control(
501*b843c749SSergey Zigachev 	struct stream_encoder *enc,
502*b843c749SSergey Zigachev 	bool mute);
503*b843c749SSergey Zigachev 
504*b843c749SSergey Zigachev void enc1_se_dp_audio_setup(
505*b843c749SSergey Zigachev 	struct stream_encoder *enc,
506*b843c749SSergey Zigachev 	unsigned int az_inst,
507*b843c749SSergey Zigachev 	struct audio_info *info);
508*b843c749SSergey Zigachev 
509*b843c749SSergey Zigachev void enc1_se_dp_audio_enable(
510*b843c749SSergey Zigachev 	struct stream_encoder *enc);
511*b843c749SSergey Zigachev 
512*b843c749SSergey Zigachev void enc1_se_dp_audio_disable(
513*b843c749SSergey Zigachev 	struct stream_encoder *enc);
514*b843c749SSergey Zigachev 
515*b843c749SSergey Zigachev void enc1_se_hdmi_audio_setup(
516*b843c749SSergey Zigachev 	struct stream_encoder *enc,
517*b843c749SSergey Zigachev 	unsigned int az_inst,
518*b843c749SSergey Zigachev 	struct audio_info *info,
519*b843c749SSergey Zigachev 	struct audio_crtc_info *audio_crtc_info);
520*b843c749SSergey Zigachev 
521*b843c749SSergey Zigachev void enc1_se_hdmi_audio_disable(
522*b843c749SSergey Zigachev 	struct stream_encoder *enc);
523*b843c749SSergey Zigachev 
524*b843c749SSergey Zigachev #endif /* __DC_STREAM_ENCODER_DCN10_H__ */
525