1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #ifndef DC_HW_TYPES_H
27 #define DC_HW_TYPES_H
28
29 #include "os_types.h"
30 #include "fixed31_32.h"
31 #include "signal_types.h"
32
33
34
35
36
37
38
39
40
41
42
43
44
45 union large_integer {
46 struct {
47 uint32_t low_part;
48 int32_t high_part;
49 };
50
51 struct {
52 uint32_t low_part;
53 int32_t high_part;
54 } u;
55
56 int64_t quad_part;
57 };
58
59 #define PHYSICAL_ADDRESS_LOC union large_integer
60
61 enum dc_plane_addr_type {
62 PLN_ADDR_TYPE_GRAPHICS = 0,
63 PLN_ADDR_TYPE_GRPH_STEREO,
64 PLN_ADDR_TYPE_VIDEO_PROGRESSIVE,
65 };
66
67 struct dc_plane_address {
68 enum dc_plane_addr_type type;
69 bool tmz_surface;
70 union {
71 struct{
72 PHYSICAL_ADDRESS_LOC addr;
73 PHYSICAL_ADDRESS_LOC meta_addr;
74 union large_integer dcc_const_color;
75 } grph;
76
77
78 struct {
79 PHYSICAL_ADDRESS_LOC left_addr;
80 PHYSICAL_ADDRESS_LOC left_meta_addr;
81 union large_integer left_dcc_const_color;
82
83 PHYSICAL_ADDRESS_LOC right_addr;
84 PHYSICAL_ADDRESS_LOC right_meta_addr;
85 union large_integer right_dcc_const_color;
86
87 } grph_stereo;
88
89
90 struct {
91 PHYSICAL_ADDRESS_LOC luma_addr;
92 PHYSICAL_ADDRESS_LOC luma_meta_addr;
93 union large_integer luma_dcc_const_color;
94
95 PHYSICAL_ADDRESS_LOC chroma_addr;
96 PHYSICAL_ADDRESS_LOC chroma_meta_addr;
97 union large_integer chroma_dcc_const_color;
98 } video_progressive;
99 };
100
101 union large_integer page_table_base;
102
103 uint8_t vmid;
104 };
105
106 struct dc_size {
107 int width;
108 int height;
109 };
110
111 struct rect {
112 int x;
113 int y;
114 int width;
115 int height;
116 };
117
118 struct plane_size {
119
120
121
122
123 int surface_pitch;
124 int chroma_pitch;
125 struct rect surface_size;
126 struct rect chroma_size;
127
128 union {
129 struct {
130 struct rect surface_size;
131 int surface_pitch;
132 } grph;
133
134 struct {
135 struct rect luma_size;
136 int luma_pitch;
137 struct rect chroma_size;
138 int chroma_pitch;
139 } video;
140 };
141 };
142
143 struct dc_plane_dcc_param {
144 bool enable;
145
146 int meta_pitch;
147 bool independent_64b_blks;
148
149 int meta_pitch_c;
150 bool independent_64b_blks_c;
151
152 union {
153 struct {
154 int meta_pitch;
155 bool independent_64b_blks;
156 } grph;
157
158 struct {
159 int meta_pitch_l;
160 bool independent_64b_blks_l;
161
162 int meta_pitch_c;
163 bool independent_64b_blks_c;
164 } video;
165 };
166 };
167
168
169 enum surface_pixel_format {
170 SURFACE_PIXEL_FORMAT_GRPH_BEGIN = 0,
171
172 SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS =
173 SURFACE_PIXEL_FORMAT_GRPH_BEGIN,
174
175 SURFACE_PIXEL_FORMAT_GRPH_ARGB1555,
176
177 SURFACE_PIXEL_FORMAT_GRPH_RGB565,
178
179 SURFACE_PIXEL_FORMAT_GRPH_ARGB8888,
180
181 SURFACE_PIXEL_FORMAT_GRPH_ABGR8888,
182
183 SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010,
184
185 SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010,
186
187
188
189 SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS,
190
191 SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616,
192
193 SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F,
194
195 SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F,
196
197 #if defined(CONFIG_DRM_AMD_DC_DCN2_0)
198 SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FIX,
199 SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FIX,
200 SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FLOAT,
201 SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FLOAT,
202 #endif
203 SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
204 SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr =
205 SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
206 SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,
207 SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
208 SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
209 SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
210 #if defined(CONFIG_DRM_AMD_DC_DCN2_0)
211 SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010,
212 SURFACE_PIXEL_FORMAT_VIDEO_CrYCbA1010102,
213 #endif
214 SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888,
215 SURFACE_PIXEL_FORMAT_INVALID
216
217
218 };
219
220
221
222
223 enum pixel_format {
224
225 PIXEL_FORMAT_UNINITIALIZED,
226 PIXEL_FORMAT_INDEX8,
227 PIXEL_FORMAT_RGB565,
228 PIXEL_FORMAT_ARGB8888,
229 PIXEL_FORMAT_ARGB2101010,
230 PIXEL_FORMAT_ARGB2101010_XRBIAS,
231 PIXEL_FORMAT_FP16,
232
233 PIXEL_FORMAT_420BPP8,
234 PIXEL_FORMAT_420BPP10,
235
236 PIXEL_FORMAT_INVALID,
237
238 PIXEL_FORMAT_GRPH_BEGIN = PIXEL_FORMAT_INDEX8,
239 PIXEL_FORMAT_GRPH_END = PIXEL_FORMAT_FP16,
240 PIXEL_FORMAT_VIDEO_BEGIN = PIXEL_FORMAT_420BPP8,
241 PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_420BPP10,
242 PIXEL_FORMAT_UNKNOWN
243 };
244
245 enum tile_split_values {
246 DC_DISPLAY_MICRO_TILING = 0x0,
247 DC_THIN_MICRO_TILING = 0x1,
248 DC_DEPTH_MICRO_TILING = 0x2,
249 DC_ROTATED_MICRO_TILING = 0x3,
250 };
251
252 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
253 enum tripleBuffer_enable {
254 DC_TRIPLEBUFFER_DISABLE = 0x0,
255 DC_TRIPLEBUFFER_ENABLE = 0x1,
256 };
257 #endif
258
259
260
261
262 enum array_mode_values {
263 DC_ARRAY_LINEAR_GENERAL = 0,
264 DC_ARRAY_LINEAR_ALLIGNED,
265 DC_ARRAY_1D_TILED_THIN1,
266 DC_ARRAY_1D_TILED_THICK,
267 DC_ARRAY_2D_TILED_THIN1,
268 DC_ARRAY_PRT_TILED_THIN1,
269 DC_ARRAY_PRT_2D_TILED_THIN1,
270 DC_ARRAY_2D_TILED_THICK,
271 DC_ARRAY_2D_TILED_X_THICK,
272 DC_ARRAY_PRT_TILED_THICK,
273 DC_ARRAY_PRT_2D_TILED_THICK,
274 DC_ARRAY_PRT_3D_TILED_THIN1,
275 DC_ARRAY_3D_TILED_THIN1,
276 DC_ARRAY_3D_TILED_THICK,
277 DC_ARRAY_3D_TILED_X_THICK,
278 DC_ARRAY_PRT_3D_TILED_THICK,
279 };
280
281 enum tile_mode_values {
282 DC_ADDR_SURF_MICRO_TILING_DISPLAY = 0x0,
283 DC_ADDR_SURF_MICRO_TILING_NON_DISPLAY = 0x1,
284 };
285
286 enum swizzle_mode_values {
287 DC_SW_LINEAR = 0,
288 DC_SW_256B_S = 1,
289 DC_SW_256_D = 2,
290 DC_SW_256_R = 3,
291 DC_SW_4KB_S = 5,
292 DC_SW_4KB_D = 6,
293 DC_SW_4KB_R = 7,
294 DC_SW_64KB_S = 9,
295 DC_SW_64KB_D = 10,
296 DC_SW_64KB_R = 11,
297 DC_SW_VAR_S = 13,
298 DC_SW_VAR_D = 14,
299 DC_SW_VAR_R = 15,
300 DC_SW_64KB_S_T = 17,
301 DC_SW_64KB_D_T = 18,
302 DC_SW_4KB_S_X = 21,
303 DC_SW_4KB_D_X = 22,
304 DC_SW_4KB_R_X = 23,
305 DC_SW_64KB_S_X = 25,
306 DC_SW_64KB_D_X = 26,
307 DC_SW_64KB_R_X = 27,
308 DC_SW_VAR_S_X = 29,
309 DC_SW_VAR_D_X = 30,
310 DC_SW_VAR_R_X = 31,
311 DC_SW_MAX = 32,
312 DC_SW_UNKNOWN = DC_SW_MAX
313 };
314
315 union dc_tiling_info {
316
317 struct {
318
319
320
321
322
323 unsigned int num_banks;
324
325
326
327
328
329 unsigned int bank_width;
330 unsigned int bank_width_c;
331
332
333
334
335
336 unsigned int bank_height;
337 unsigned int bank_height_c;
338
339
340
341 unsigned int tile_aspect;
342 unsigned int tile_aspect_c;
343
344
345
346
347
348
349
350
351
352 enum tile_split_values tile_split;
353 enum tile_split_values tile_split_c;
354
355
356
357
358
359
360 enum tile_mode_values tile_mode;
361 enum tile_mode_values tile_mode_c;
362
363
364
365
366
367 unsigned int pipe_config;
368
369
370
371
372
373
374
375
376 enum array_mode_values array_mode;
377 } gfx8;
378
379 struct {
380 enum swizzle_mode_values swizzle;
381 unsigned int num_pipes;
382 unsigned int max_compressed_frags;
383 unsigned int pipe_interleave;
384
385 unsigned int num_banks;
386 unsigned int num_shader_engines;
387 unsigned int num_rb_per_se;
388 bool shaderEnable;
389
390 bool meta_linear;
391 bool rb_aligned;
392 bool pipe_aligned;
393 } gfx9;
394 };
395
396
397 enum dc_rotation_angle {
398 ROTATION_ANGLE_0 = 0,
399 ROTATION_ANGLE_90,
400 ROTATION_ANGLE_180,
401 ROTATION_ANGLE_270,
402 ROTATION_ANGLE_COUNT
403 };
404
405 enum dc_scan_direction {
406 SCAN_DIRECTION_UNKNOWN = 0,
407 SCAN_DIRECTION_HORIZONTAL = 1,
408 SCAN_DIRECTION_VERTICAL = 2,
409 };
410
411 struct dc_cursor_position {
412 uint32_t x;
413 uint32_t y;
414
415 uint32_t x_hotspot;
416 uint32_t y_hotspot;
417
418
419
420
421 bool enable;
422
423 };
424
425 struct dc_cursor_mi_param {
426 unsigned int pixel_clk_khz;
427 unsigned int ref_clk_khz;
428 struct rect viewport;
429 struct fixed31_32 h_scale_ratio;
430 struct fixed31_32 v_scale_ratio;
431 enum dc_rotation_angle rotation;
432 bool mirror;
433 };
434
435
436
437 enum {
438 GAMMA_RGB_256_ENTRIES = 256,
439 GAMMA_RGB_FLOAT_1024_ENTRIES = 1024,
440 GAMMA_CS_TFM_1D_ENTRIES = 4096,
441 GAMMA_CUSTOM_ENTRIES = 4096,
442 GAMMA_MAX_ENTRIES = 4096
443 };
444
445 enum dc_gamma_type {
446 GAMMA_RGB_256 = 1,
447 GAMMA_RGB_FLOAT_1024 = 2,
448 GAMMA_CS_TFM_1D = 3,
449 GAMMA_CUSTOM = 4,
450 };
451
452 struct dc_csc_transform {
453 uint16_t matrix[12];
454 bool enable_adjustment;
455 };
456
457 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
458 struct dc_rgb_fixed {
459 struct fixed31_32 red;
460 struct fixed31_32 green;
461 struct fixed31_32 blue;
462 };
463 #endif
464
465 struct dc_gamma {
466 struct kref refcount;
467 enum dc_gamma_type type;
468 unsigned int num_entries;
469
470 struct dc_gamma_entries {
471 struct fixed31_32 red[GAMMA_MAX_ENTRIES];
472 struct fixed31_32 green[GAMMA_MAX_ENTRIES];
473 struct fixed31_32 blue[GAMMA_MAX_ENTRIES];
474 } entries;
475
476
477 struct dc_context *ctx;
478
479
480
481
482 bool is_identity;
483 };
484
485
486
487
488
489
490
491
492
493 enum dc_cursor_color_format {
494 CURSOR_MODE_MONO,
495 CURSOR_MODE_COLOR_1BIT_AND,
496 CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA,
497 CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA,
498 #if defined(CONFIG_DRM_AMD_DC_DCN2_0)
499 CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED,
500 CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED
501 #endif
502 };
503
504
505
506
507
508
509
510 union dc_cursor_attribute_flags {
511 struct {
512 uint32_t ENABLE_MAGNIFICATION:1;
513 uint32_t INVERSE_TRANSPARENT_CLAMPING:1;
514 uint32_t HORIZONTAL_MIRROR:1;
515 uint32_t VERTICAL_MIRROR:1;
516 uint32_t INVERT_PIXEL_DATA:1;
517 uint32_t ZERO_EXPANSION:1;
518 uint32_t MIN_MAX_INVERT:1;
519 uint32_t ENABLE_CURSOR_DEGAMMA:1;
520 uint32_t RESERVED:24;
521 } bits;
522 uint32_t value;
523 };
524
525 struct dc_cursor_attributes {
526 PHYSICAL_ADDRESS_LOC address;
527 uint32_t pitch;
528
529
530 uint32_t width;
531 uint32_t height;
532
533 enum dc_cursor_color_format color_format;
534 uint32_t sdr_white_level;
535
536
537 enum dc_rotation_angle rotation_angle;
538
539 union dc_cursor_attribute_flags attribute_flags;
540 };
541
542 struct dpp_cursor_attributes {
543 int bias;
544 int scale;
545 };
546
547
548
549 enum dc_color_space {
550 COLOR_SPACE_UNKNOWN,
551 COLOR_SPACE_SRGB,
552 COLOR_SPACE_XR_RGB,
553 COLOR_SPACE_SRGB_LIMITED,
554 COLOR_SPACE_MSREF_SCRGB,
555 COLOR_SPACE_YCBCR601,
556 COLOR_SPACE_YCBCR709,
557 COLOR_SPACE_XV_YCC_709,
558 COLOR_SPACE_XV_YCC_601,
559 COLOR_SPACE_YCBCR601_LIMITED,
560 COLOR_SPACE_YCBCR709_LIMITED,
561 COLOR_SPACE_2020_RGB_FULLRANGE,
562 COLOR_SPACE_2020_RGB_LIMITEDRANGE,
563 COLOR_SPACE_2020_YCBCR,
564 COLOR_SPACE_ADOBERGB,
565 COLOR_SPACE_DCIP3,
566 COLOR_SPACE_DISPLAYNATIVE,
567 COLOR_SPACE_DOLBYVISION,
568 COLOR_SPACE_APPCTRL,
569 COLOR_SPACE_CUSTOMPOINTS,
570 COLOR_SPACE_YCBCR709_BLACK,
571 };
572
573 enum dc_dither_option {
574 DITHER_OPTION_DEFAULT,
575 DITHER_OPTION_DISABLE,
576 DITHER_OPTION_FM6,
577 DITHER_OPTION_FM8,
578 DITHER_OPTION_FM10,
579 DITHER_OPTION_SPATIAL6_FRAME_RANDOM,
580 DITHER_OPTION_SPATIAL8_FRAME_RANDOM,
581 DITHER_OPTION_SPATIAL10_FRAME_RANDOM,
582 DITHER_OPTION_SPATIAL6,
583 DITHER_OPTION_SPATIAL8,
584 DITHER_OPTION_SPATIAL10,
585 DITHER_OPTION_TRUN6,
586 DITHER_OPTION_TRUN8,
587 DITHER_OPTION_TRUN10,
588 DITHER_OPTION_TRUN10_SPATIAL8,
589 DITHER_OPTION_TRUN10_SPATIAL6,
590 DITHER_OPTION_TRUN10_FM8,
591 DITHER_OPTION_TRUN10_FM6,
592 DITHER_OPTION_TRUN10_SPATIAL8_FM6,
593 DITHER_OPTION_SPATIAL10_FM8,
594 DITHER_OPTION_SPATIAL10_FM6,
595 DITHER_OPTION_TRUN8_SPATIAL6,
596 DITHER_OPTION_TRUN8_FM6,
597 DITHER_OPTION_SPATIAL8_FM6,
598 DITHER_OPTION_MAX = DITHER_OPTION_SPATIAL8_FM6,
599 DITHER_OPTION_INVALID
600 };
601
602 enum dc_quantization_range {
603 QUANTIZATION_RANGE_UNKNOWN,
604 QUANTIZATION_RANGE_FULL,
605 QUANTIZATION_RANGE_LIMITED
606 };
607
608
609
610
611 struct scaling_taps {
612 uint32_t v_taps;
613 uint32_t h_taps;
614 uint32_t v_taps_c;
615 uint32_t h_taps_c;
616 bool integer_scaling;
617 };
618
619 enum dc_timing_standard {
620 DC_TIMING_STANDARD_UNDEFINED,
621 DC_TIMING_STANDARD_DMT,
622 DC_TIMING_STANDARD_GTF,
623 DC_TIMING_STANDARD_CVT,
624 DC_TIMING_STANDARD_CVT_RB,
625 DC_TIMING_STANDARD_CEA770,
626 DC_TIMING_STANDARD_CEA861,
627 DC_TIMING_STANDARD_HDMI,
628 DC_TIMING_STANDARD_TV_NTSC,
629 DC_TIMING_STANDARD_TV_NTSC_J,
630 DC_TIMING_STANDARD_TV_PAL,
631 DC_TIMING_STANDARD_TV_PAL_M,
632 DC_TIMING_STANDARD_TV_PAL_CN,
633 DC_TIMING_STANDARD_TV_SECAM,
634 DC_TIMING_STANDARD_EXPLICIT,
635
636 DC_TIMING_STANDARD_USER_OVERRIDE,
637
638 DC_TIMING_STANDARD_MAX
639 };
640
641 enum dc_color_depth {
642 COLOR_DEPTH_UNDEFINED,
643 COLOR_DEPTH_666,
644 COLOR_DEPTH_888,
645 COLOR_DEPTH_101010,
646 COLOR_DEPTH_121212,
647 COLOR_DEPTH_141414,
648 COLOR_DEPTH_161616,
649 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
650 COLOR_DEPTH_999,
651 COLOR_DEPTH_111111,
652 #endif
653 COLOR_DEPTH_COUNT
654 };
655
656 enum dc_pixel_encoding {
657 PIXEL_ENCODING_UNDEFINED,
658 PIXEL_ENCODING_RGB,
659 PIXEL_ENCODING_YCBCR422,
660 PIXEL_ENCODING_YCBCR444,
661 PIXEL_ENCODING_YCBCR420,
662 PIXEL_ENCODING_COUNT
663 };
664
665 enum dc_aspect_ratio {
666 ASPECT_RATIO_NO_DATA,
667 ASPECT_RATIO_4_3,
668 ASPECT_RATIO_16_9,
669 ASPECT_RATIO_64_27,
670 ASPECT_RATIO_256_135,
671 ASPECT_RATIO_FUTURE
672 };
673
674 enum scanning_type {
675 SCANNING_TYPE_NODATA = 0,
676 SCANNING_TYPE_OVERSCAN,
677 SCANNING_TYPE_UNDERSCAN,
678 SCANNING_TYPE_FUTURE,
679 SCANNING_TYPE_UNDEFINED
680 };
681
682 struct dc_crtc_timing_flags {
683 uint32_t INTERLACE :1;
684 uint32_t HSYNC_POSITIVE_POLARITY :1;
685
686 uint32_t VSYNC_POSITIVE_POLARITY :1;
687
688
689 uint32_t HORZ_COUNT_BY_TWO:1;
690
691 uint32_t EXCLUSIVE_3D :1;
692
693
694 uint32_t RIGHT_EYE_3D_POLARITY :1;
695
696 uint32_t SUB_SAMPLE_3D :1;
697
698 uint32_t USE_IN_3D_VIEW_ONLY :1;
699
700 uint32_t STEREO_3D_PREFERENCE :1;
701
702 uint32_t Y_ONLY :1;
703
704 uint32_t YCBCR420 :1;
705 uint32_t DTD_COUNTER :5;
706
707 uint32_t FORCE_HDR :1;
708
709
710
711 uint32_t LTE_340MCSC_SCRAMBLE:1;
712
713 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
714 uint32_t DSC : 1;
715 #endif
716 };
717
718 enum dc_timing_3d_format {
719 TIMING_3D_FORMAT_NONE,
720 TIMING_3D_FORMAT_FRAME_ALTERNATE,
721 TIMING_3D_FORMAT_INBAND_FA,
722 TIMING_3D_FORMAT_DP_HDMI_INBAND_FA,
723
724 TIMING_3D_FORMAT_SIDEBAND_FA,
725 TIMING_3D_FORMAT_HW_FRAME_PACKING,
726 TIMING_3D_FORMAT_SW_FRAME_PACKING,
727 TIMING_3D_FORMAT_ROW_INTERLEAVE,
728 TIMING_3D_FORMAT_COLUMN_INTERLEAVE,
729 TIMING_3D_FORMAT_PIXEL_INTERLEAVE,
730 TIMING_3D_FORMAT_SIDE_BY_SIDE,
731 TIMING_3D_FORMAT_TOP_AND_BOTTOM,
732 TIMING_3D_FORMAT_SBS_SW_PACKED,
733
734 TIMING_3D_FORMAT_TB_SW_PACKED,
735
736
737 TIMING_3D_FORMAT_MAX,
738 };
739
740 enum trigger_delay {
741 TRIGGER_DELAY_NEXT_PIXEL = 0,
742 TRIGGER_DELAY_NEXT_LINE,
743 };
744
745 enum crtc_event {
746 CRTC_EVENT_VSYNC_RISING = 0,
747 CRTC_EVENT_VSYNC_FALLING
748 };
749
750 struct crtc_trigger_info {
751 bool enabled;
752 struct dc_stream_state *event_source;
753 enum crtc_event event;
754 enum trigger_delay delay;
755 };
756
757 struct dc_crtc_timing_adjust {
758 uint32_t v_total_min;
759 uint32_t v_total_max;
760 uint32_t v_total_mid;
761 uint32_t v_total_mid_frame_num;
762 };
763
764 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
765 struct dc_dsc_config {
766 uint32_t num_slices_h;
767 uint32_t num_slices_v;
768 uint32_t bits_per_pixel;
769 bool block_pred_enable;
770 uint32_t linebuf_depth;
771 uint32_t version_minor;
772 bool ycbcr422_simple;
773 int32_t rc_buffer_size;
774 };
775 #endif
776 struct dc_crtc_timing {
777 uint32_t h_total;
778 uint32_t h_border_left;
779 uint32_t h_addressable;
780 uint32_t h_border_right;
781 uint32_t h_front_porch;
782 uint32_t h_sync_width;
783
784 uint32_t v_total;
785 uint32_t v_border_top;
786 uint32_t v_addressable;
787 uint32_t v_border_bottom;
788 uint32_t v_front_porch;
789 uint32_t v_sync_width;
790
791 uint32_t pix_clk_100hz;
792
793 uint32_t vic;
794 uint32_t hdmi_vic;
795 enum dc_timing_3d_format timing_3d_format;
796 enum dc_color_depth display_color_depth;
797 enum dc_pixel_encoding pixel_encoding;
798 enum dc_aspect_ratio aspect_ratio;
799 enum scanning_type scan_type;
800
801 struct dc_crtc_timing_flags flags;
802 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
803 struct dc_dsc_config dsc_cfg;
804 #endif
805 };
806
807
808 enum vram_type {
809 VIDEO_MEMORY_TYPE_GDDR5 = 2,
810 VIDEO_MEMORY_TYPE_DDR3 = 3,
811 VIDEO_MEMORY_TYPE_DDR4 = 4,
812 VIDEO_MEMORY_TYPE_HBM = 5,
813 VIDEO_MEMORY_TYPE_GDDR6 = 6,
814 };
815
816 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
817 enum dwb_cnv_out_bpc {
818 DWB_CNV_OUT_BPC_8BPC = 0,
819 DWB_CNV_OUT_BPC_10BPC = 1,
820 };
821
822 enum dwb_output_depth {
823 DWB_OUTPUT_PIXEL_DEPTH_8BPC = 0,
824 DWB_OUTPUT_PIXEL_DEPTH_10BPC = 1,
825 };
826
827 enum dwb_capture_rate {
828 dwb_capture_rate_0 = 0,
829 dwb_capture_rate_1 = 1,
830 dwb_capture_rate_2 = 2,
831 dwb_capture_rate_3 = 3,
832 };
833
834 enum dwb_scaler_mode {
835 dwb_scaler_mode_bypass444 = 0,
836 dwb_scaler_mode_rgb444 = 1,
837 dwb_scaler_mode_yuv444 = 2,
838 dwb_scaler_mode_yuv420 = 3
839 };
840
841 enum dwb_subsample_position {
842 DWB_INTERSTITIAL_SUBSAMPLING = 0,
843 DWB_COSITED_SUBSAMPLING = 1
844 };
845
846 enum dwb_stereo_eye_select {
847 DWB_STEREO_EYE_LEFT = 1,
848 DWB_STEREO_EYE_RIGHT = 2,
849 };
850
851 enum dwb_stereo_type {
852 DWB_STEREO_TYPE_FRAME_PACKING = 0,
853 DWB_STEREO_TYPE_FRAME_SEQUENTIAL = 3,
854 };
855
856 #define MCIF_BUF_COUNT 4
857
858 struct mcif_buf_params {
859 unsigned long long luma_address[MCIF_BUF_COUNT];
860 unsigned long long chroma_address[MCIF_BUF_COUNT];
861 unsigned int luma_pitch;
862 unsigned int chroma_pitch;
863 unsigned int warmup_pitch;
864 unsigned int swlock;
865 };
866
867 #endif
868
869 #define MAX_TG_COLOR_VALUE 0x3FF
870 struct tg_color {
871
872 uint16_t color_r_cr;
873 uint16_t color_g_y;
874 uint16_t color_b_cb;
875 };
876
877 #endif
878