2 * Copyright 2016 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
30 #include "fixed31_32.h"
31 #include "signal_types.h"
33 /******************************************************************************
34 * Data types for Virtual HW Layer of DAL3.
35 * (see DAL3 design documents for HW Layer definition)
37 * The intended uses are:
38 * 1. Generation pseudocode sequences for HW programming.
39 * 2. Implementation of real HW programming by HW Sequencer of DAL3.
41 * Note: do *not* add any types which are *not* used for HW programming - this
42 * will ensure separation of Logic layer from HW layer.
43 ******************************************************************************/
59 #define PHYSICAL_ADDRESS_LOC union large_integer
61 enum dc_plane_addr_type {
62 PLN_ADDR_TYPE_GRAPHICS = 0,
63 PLN_ADDR_TYPE_GRPH_STEREO,
64 PLN_ADDR_TYPE_VIDEO_PROGRESSIVE,
67 struct dc_plane_address {
68 enum dc_plane_addr_type type;
72 PHYSICAL_ADDRESS_LOC addr;
73 PHYSICAL_ADDRESS_LOC meta_addr;
74 union large_integer dcc_const_color;
79 PHYSICAL_ADDRESS_LOC left_addr;
80 PHYSICAL_ADDRESS_LOC left_meta_addr;
81 union large_integer left_dcc_const_color;
83 PHYSICAL_ADDRESS_LOC right_addr;
84 PHYSICAL_ADDRESS_LOC right_meta_addr;
85 union large_integer right_dcc_const_color;
91 PHYSICAL_ADDRESS_LOC luma_addr;
92 PHYSICAL_ADDRESS_LOC luma_meta_addr;
93 union large_integer luma_dcc_const_color;
95 PHYSICAL_ADDRESS_LOC chroma_addr;
96 PHYSICAL_ADDRESS_LOC chroma_meta_addr;
97 union large_integer chroma_dcc_const_color;
101 union large_integer page_table_base;
119 /* Graphic surface pitch in pixels.
120 * In LINEAR_GENERAL mode, pitch
121 * is 32 pixel aligned.
125 struct rect surface_size;
126 struct rect chroma_size;
129 struct dc_plane_dcc_param {
133 bool independent_64b_blks;
136 bool independent_64b_blks_c;
139 /*Displayable pixel format in fb*/
140 enum surface_pixel_format {
141 SURFACE_PIXEL_FORMAT_GRPH_BEGIN = 0,
142 /*TOBE REMOVED paletta 256 colors*/
143 SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS =
144 SURFACE_PIXEL_FORMAT_GRPH_BEGIN,
146 SURFACE_PIXEL_FORMAT_GRPH_ARGB1555,
148 SURFACE_PIXEL_FORMAT_GRPH_RGB565,
150 SURFACE_PIXEL_FORMAT_GRPH_ARGB8888,
152 SURFACE_PIXEL_FORMAT_GRPH_ABGR8888,
154 SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010,
156 SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010,
157 /*TOBE REMOVED swaped, XR_BIAS has no differance
158 * for pixel layout than previous and we can
159 * delete this after discusion*/
160 SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS,
162 SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616,
164 SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F,
166 SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F,
167 /*grow graphics here if necessary */
168 SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FIX,
169 SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FIX,
170 SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FLOAT,
171 SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FLOAT,
172 SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
173 SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr =
174 SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
175 SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,
176 SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
177 SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
178 SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
179 SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010,
180 SURFACE_PIXEL_FORMAT_VIDEO_CrYCbA1010102,
181 SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888,
182 SURFACE_PIXEL_FORMAT_INVALID
184 /*grow 444 video here if necessary */
192 PIXEL_FORMAT_UNINITIALIZED,
195 PIXEL_FORMAT_ARGB8888,
196 PIXEL_FORMAT_ARGB2101010,
197 PIXEL_FORMAT_ARGB2101010_XRBIAS,
200 PIXEL_FORMAT_420BPP8,
201 PIXEL_FORMAT_420BPP10,
202 /*end of pixel format definition*/
203 PIXEL_FORMAT_INVALID,
205 PIXEL_FORMAT_GRPH_BEGIN = PIXEL_FORMAT_INDEX8,
206 PIXEL_FORMAT_GRPH_END = PIXEL_FORMAT_FP16,
207 PIXEL_FORMAT_VIDEO_BEGIN = PIXEL_FORMAT_420BPP8,
208 PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_420BPP10,
212 enum tile_split_values {
213 DC_DISPLAY_MICRO_TILING = 0x0,
214 DC_THIN_MICRO_TILING = 0x1,
215 DC_DEPTH_MICRO_TILING = 0x2,
216 DC_ROTATED_MICRO_TILING = 0x3,
219 enum tripleBuffer_enable {
220 DC_TRIPLEBUFFER_DISABLE = 0x0,
221 DC_TRIPLEBUFFER_ENABLE = 0x1,
224 /* TODO: These values come from hardware spec. We need to readdress this
225 * if they ever change.
227 enum array_mode_values {
228 DC_ARRAY_LINEAR_GENERAL = 0,
229 DC_ARRAY_LINEAR_ALLIGNED,
230 DC_ARRAY_1D_TILED_THIN1,
231 DC_ARRAY_1D_TILED_THICK,
232 DC_ARRAY_2D_TILED_THIN1,
233 DC_ARRAY_PRT_TILED_THIN1,
234 DC_ARRAY_PRT_2D_TILED_THIN1,
235 DC_ARRAY_2D_TILED_THICK,
236 DC_ARRAY_2D_TILED_X_THICK,
237 DC_ARRAY_PRT_TILED_THICK,
238 DC_ARRAY_PRT_2D_TILED_THICK,
239 DC_ARRAY_PRT_3D_TILED_THIN1,
240 DC_ARRAY_3D_TILED_THIN1,
241 DC_ARRAY_3D_TILED_THICK,
242 DC_ARRAY_3D_TILED_X_THICK,
243 DC_ARRAY_PRT_3D_TILED_THICK,
246 enum tile_mode_values {
247 DC_ADDR_SURF_MICRO_TILING_DISPLAY = 0x0,
248 DC_ADDR_SURF_MICRO_TILING_NON_DISPLAY = 0x1,
251 enum swizzle_mode_values {
277 DC_SW_UNKNOWN = DC_SW_MAX
280 union dc_tiling_info {
283 /* Specifies the number of memory banks for tiling
285 * Only applies to 2D and 3D tiling modes.
286 * POSSIBLE VALUES: 2,4,8,16
288 unsigned int num_banks;
289 /* Specifies the number of tiles in the x direction
290 * to be incorporated into the same bank.
291 * Only applies to 2D and 3D tiling modes.
292 * POSSIBLE VALUES: 1,2,4,8
294 unsigned int bank_width;
295 unsigned int bank_width_c;
296 /* Specifies the number of tiles in the y direction to
297 * be incorporated into the same bank.
298 * Only applies to 2D and 3D tiling modes.
299 * POSSIBLE VALUES: 1,2,4,8
301 unsigned int bank_height;
302 unsigned int bank_height_c;
303 /* Specifies the macro tile aspect ratio. Only applies
304 * to 2D and 3D tiling modes.
306 unsigned int tile_aspect;
307 unsigned int tile_aspect_c;
308 /* Specifies the number of bytes that will be stored
309 * contiguously for each tile.
310 * If the tile data requires more storage than this
311 * amount, it is split into multiple slices.
312 * This field must not be larger than
313 * GB_ADDR_CONFIG.DRAM_ROW_SIZE.
314 * Only applies to 2D and 3D tiling modes.
315 * For color render targets, TILE_SPLIT >= 256B.
317 enum tile_split_values tile_split;
318 enum tile_split_values tile_split_c;
319 /* Specifies the addressing within a tile.
320 * 0x0 - DISPLAY_MICRO_TILING
321 * 0x1 - THIN_MICRO_TILING
322 * 0x2 - DEPTH_MICRO_TILING
323 * 0x3 - ROTATED_MICRO_TILING
325 enum tile_mode_values tile_mode;
326 enum tile_mode_values tile_mode_c;
327 /* Specifies the number of pipes and how they are
328 * interleaved in the surface.
329 * Refer to memory addressing document for complete
330 * details and constraints.
332 unsigned int pipe_config;
333 /* Specifies the tiling mode of the surface.
334 * THIN tiles use an 8x8x1 tile size.
335 * THICK tiles use an 8x8x4 tile size.
336 * 2D tiling modes rotate banks for successive Z slices
337 * 3D tiling modes rotate pipes and banks for Z slices
338 * Refer to memory addressing document for complete
339 * details and constraints.
341 enum array_mode_values array_mode;
345 enum swizzle_mode_values swizzle;
346 unsigned int num_pipes;
347 unsigned int max_compressed_frags;
348 unsigned int pipe_interleave;
350 unsigned int num_banks;
351 unsigned int num_shader_engines;
352 unsigned int num_rb_per_se;
362 enum dc_rotation_angle {
363 ROTATION_ANGLE_0 = 0,
370 enum dc_scan_direction {
371 SCAN_DIRECTION_UNKNOWN = 0,
372 SCAN_DIRECTION_HORIZONTAL = 1, /* 0, 180 rotation */
373 SCAN_DIRECTION_VERTICAL = 2, /* 90, 270 rotation */
376 struct dc_cursor_position {
384 * This parameter indicates whether HW cursor should be enabled
390 struct dc_cursor_mi_param {
391 unsigned int pixel_clk_khz;
392 unsigned int ref_clk_khz;
393 struct rect viewport;
394 struct fixed31_32 h_scale_ratio;
395 struct fixed31_32 v_scale_ratio;
396 enum dc_rotation_angle rotation;
400 /* IPP related types */
403 GAMMA_RGB_256_ENTRIES = 256,
404 GAMMA_RGB_FLOAT_1024_ENTRIES = 1024,
405 GAMMA_CS_TFM_1D_ENTRIES = 4096,
406 GAMMA_CUSTOM_ENTRIES = 4096,
407 GAMMA_MAX_ENTRIES = 4096
412 GAMMA_RGB_FLOAT_1024 = 2,
417 struct dc_csc_transform {
419 bool enable_adjustment;
422 struct dc_rgb_fixed {
423 struct fixed31_32 red;
424 struct fixed31_32 green;
425 struct fixed31_32 blue;
429 struct kref refcount;
430 enum dc_gamma_type type;
431 unsigned int num_entries;
433 struct dc_gamma_entries {
434 struct fixed31_32 red[GAMMA_MAX_ENTRIES];
435 struct fixed31_32 green[GAMMA_MAX_ENTRIES];
436 struct fixed31_32 blue[GAMMA_MAX_ENTRIES];
439 /* private to DC core */
440 struct dc_context *ctx;
442 /* is_identity is used for RGB256 gamma identity which can also be programmed in INPUT_LUT.
443 * is_logical_identity indicates the given gamma ramp regardless of type is identity.
448 /* Used by both ipp amd opp functions*/
449 /* TODO: to be consolidated with enum color_space */
452 * This enum is for programming CURSOR_MODE register field. What this register
453 * should be programmed to depends on OS requested cursor shape flags and what
454 * we stored in the cursor surface.
456 enum dc_cursor_color_format {
458 CURSOR_MODE_COLOR_1BIT_AND,
459 CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA,
460 CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA,
461 CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED,
462 CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED
466 * This is all the parameters required by DAL in order to update the cursor
467 * attributes, including the new cursor image surface address, size, hotspot
468 * location, color format, etc.
471 union dc_cursor_attribute_flags {
473 uint32_t ENABLE_MAGNIFICATION:1;
474 uint32_t INVERSE_TRANSPARENT_CLAMPING:1;
475 uint32_t HORIZONTAL_MIRROR:1;
476 uint32_t VERTICAL_MIRROR:1;
477 uint32_t INVERT_PIXEL_DATA:1;
478 uint32_t ZERO_EXPANSION:1;
479 uint32_t MIN_MAX_INVERT:1;
480 uint32_t ENABLE_CURSOR_DEGAMMA:1;
481 uint32_t RESERVED:24;
486 struct dc_cursor_attributes {
487 PHYSICAL_ADDRESS_LOC address;
490 /* Width and height should correspond to cursor surface width x heigh */
494 enum dc_cursor_color_format color_format;
495 uint32_t sdr_white_level; // for boosting (SDR) cursor in HDR mode
497 /* In case we support HW Cursor rotation in the future */
498 enum dc_rotation_angle rotation_angle;
500 union dc_cursor_attribute_flags attribute_flags;
503 struct dpp_cursor_attributes {
510 enum dc_color_space {
514 COLOR_SPACE_SRGB_LIMITED,
515 COLOR_SPACE_MSREF_SCRGB,
516 COLOR_SPACE_YCBCR601,
517 COLOR_SPACE_YCBCR709,
518 COLOR_SPACE_XV_YCC_709,
519 COLOR_SPACE_XV_YCC_601,
520 COLOR_SPACE_YCBCR601_LIMITED,
521 COLOR_SPACE_YCBCR709_LIMITED,
522 COLOR_SPACE_2020_RGB_FULLRANGE,
523 COLOR_SPACE_2020_RGB_LIMITEDRANGE,
524 COLOR_SPACE_2020_YCBCR,
525 COLOR_SPACE_ADOBERGB,
527 COLOR_SPACE_DISPLAYNATIVE,
528 COLOR_SPACE_DOLBYVISION,
530 COLOR_SPACE_CUSTOMPOINTS,
531 COLOR_SPACE_YCBCR709_BLACK,
534 enum dc_dither_option {
535 DITHER_OPTION_DEFAULT,
536 DITHER_OPTION_DISABLE,
540 DITHER_OPTION_SPATIAL6_FRAME_RANDOM,
541 DITHER_OPTION_SPATIAL8_FRAME_RANDOM,
542 DITHER_OPTION_SPATIAL10_FRAME_RANDOM,
543 DITHER_OPTION_SPATIAL6,
544 DITHER_OPTION_SPATIAL8,
545 DITHER_OPTION_SPATIAL10,
548 DITHER_OPTION_TRUN10,
549 DITHER_OPTION_TRUN10_SPATIAL8,
550 DITHER_OPTION_TRUN10_SPATIAL6,
551 DITHER_OPTION_TRUN10_FM8,
552 DITHER_OPTION_TRUN10_FM6,
553 DITHER_OPTION_TRUN10_SPATIAL8_FM6,
554 DITHER_OPTION_SPATIAL10_FM8,
555 DITHER_OPTION_SPATIAL10_FM6,
556 DITHER_OPTION_TRUN8_SPATIAL6,
557 DITHER_OPTION_TRUN8_FM6,
558 DITHER_OPTION_SPATIAL8_FM6,
559 DITHER_OPTION_MAX = DITHER_OPTION_SPATIAL8_FM6,
560 DITHER_OPTION_INVALID
563 enum dc_quantization_range {
564 QUANTIZATION_RANGE_UNKNOWN,
565 QUANTIZATION_RANGE_FULL,
566 QUANTIZATION_RANGE_LIMITED
569 enum dc_dynamic_expansion {
571 DYN_EXPANSION_DISABLE
576 /* used in struct dc_plane_state */
577 struct scaling_taps {
582 bool integer_scaling;
585 enum dc_timing_standard {
586 DC_TIMING_STANDARD_UNDEFINED,
587 DC_TIMING_STANDARD_DMT,
588 DC_TIMING_STANDARD_GTF,
589 DC_TIMING_STANDARD_CVT,
590 DC_TIMING_STANDARD_CVT_RB,
591 DC_TIMING_STANDARD_CEA770,
592 DC_TIMING_STANDARD_CEA861,
593 DC_TIMING_STANDARD_HDMI,
594 DC_TIMING_STANDARD_TV_NTSC,
595 DC_TIMING_STANDARD_TV_NTSC_J,
596 DC_TIMING_STANDARD_TV_PAL,
597 DC_TIMING_STANDARD_TV_PAL_M,
598 DC_TIMING_STANDARD_TV_PAL_CN,
599 DC_TIMING_STANDARD_TV_SECAM,
600 DC_TIMING_STANDARD_EXPLICIT,
601 /*!< For explicit timings from EDID, VBIOS, etc.*/
602 DC_TIMING_STANDARD_USER_OVERRIDE,
603 /*!< For mode timing override by user*/
604 DC_TIMING_STANDARD_MAX
607 enum dc_color_depth {
608 COLOR_DEPTH_UNDEFINED,
620 enum dc_pixel_encoding {
621 PIXEL_ENCODING_UNDEFINED,
623 PIXEL_ENCODING_YCBCR422,
624 PIXEL_ENCODING_YCBCR444,
625 PIXEL_ENCODING_YCBCR420,
629 enum dc_aspect_ratio {
630 ASPECT_RATIO_NO_DATA,
634 ASPECT_RATIO_256_135,
639 SCANNING_TYPE_NODATA = 0,
640 SCANNING_TYPE_OVERSCAN,
641 SCANNING_TYPE_UNDERSCAN,
642 SCANNING_TYPE_FUTURE,
643 SCANNING_TYPE_UNDEFINED
646 struct dc_crtc_timing_flags {
647 uint32_t INTERLACE :1;
648 uint32_t HSYNC_POSITIVE_POLARITY :1; /* when set to 1,
649 it is positive polarity --reversed with dal1 or video bios define*/
650 uint32_t VSYNC_POSITIVE_POLARITY :1; /* when set to 1,
651 it is positive polarity --reversed with dal1 or video bios define*/
653 uint32_t HORZ_COUNT_BY_TWO:1;
655 uint32_t EXCLUSIVE_3D :1; /* if this bit set,
656 timing can be driven in 3D format only
657 and there is no corresponding 2D timing*/
658 uint32_t RIGHT_EYE_3D_POLARITY :1; /* 1 - means right eye polarity
659 (right eye = '1', left eye = '0') */
660 uint32_t SUB_SAMPLE_3D :1; /* 1 - means left/right images subsampled
661 when mixed into 3D image. 0 - means summation (3D timing is doubled)*/
662 uint32_t USE_IN_3D_VIEW_ONLY :1; /* Do not use this timing in 2D View,
663 because corresponding 2D timing also present in the list*/
664 uint32_t STEREO_3D_PREFERENCE :1; /* Means this is 2D timing
665 and we want to match priority of corresponding 3D timing*/
668 uint32_t YCBCR420 :1; /* TODO: shouldn't need this flag, should be a separate pixel format */
669 uint32_t DTD_COUNTER :5; /* values 1 to 16 */
671 uint32_t FORCE_HDR :1;
673 /* HDMI 2.0 - Support scrambling for TMDS character
674 * rates less than or equal to 340Mcsc */
675 uint32_t LTE_340MCSC_SCRAMBLE:1;
677 uint32_t DSC : 1; /* Use DSC with this timing */
680 enum dc_timing_3d_format {
681 TIMING_3D_FORMAT_NONE,
682 TIMING_3D_FORMAT_FRAME_ALTERNATE, /* No stereosync at all*/
683 TIMING_3D_FORMAT_INBAND_FA, /* Inband Frame Alternate (DVI/DP)*/
684 TIMING_3D_FORMAT_DP_HDMI_INBAND_FA, /* Inband FA to HDMI Frame Pack*/
685 /* for active DP-HDMI dongle*/
686 TIMING_3D_FORMAT_SIDEBAND_FA, /* Sideband Frame Alternate (eDP)*/
687 TIMING_3D_FORMAT_HW_FRAME_PACKING,
688 TIMING_3D_FORMAT_SW_FRAME_PACKING,
689 TIMING_3D_FORMAT_ROW_INTERLEAVE,
690 TIMING_3D_FORMAT_COLUMN_INTERLEAVE,
691 TIMING_3D_FORMAT_PIXEL_INTERLEAVE,
692 TIMING_3D_FORMAT_SIDE_BY_SIDE,
693 TIMING_3D_FORMAT_TOP_AND_BOTTOM,
694 TIMING_3D_FORMAT_SBS_SW_PACKED,
695 /* Side-by-side, packed by application/driver into 2D frame*/
696 TIMING_3D_FORMAT_TB_SW_PACKED,
697 /* Top-and-bottom, packed by application/driver into 2D frame*/
699 TIMING_3D_FORMAT_MAX,
702 struct dc_dsc_config {
703 uint32_t num_slices_h; /* Number of DSC slices - horizontal */
704 uint32_t num_slices_v; /* Number of DSC slices - vertical */
705 uint32_t bits_per_pixel; /* DSC target bitrate in 1/16 of bpp (e.g. 128 -> 8bpp) */
706 bool block_pred_enable; /* DSC block prediction enable */
707 uint32_t linebuf_depth; /* DSC line buffer depth */
708 uint32_t version_minor; /* DSC minor version. Full version is formed as 1.version_minor. */
709 bool ycbcr422_simple; /* Tell DSC engine to convert YCbCr 4:2:2 to 'YCbCr 4:2:2 simple'. */
710 int32_t rc_buffer_size; /* DSC RC buffer block size in bytes */
712 struct dc_crtc_timing {
714 uint32_t h_border_left;
715 uint32_t h_addressable;
716 uint32_t h_border_right;
717 uint32_t h_front_porch;
718 uint32_t h_sync_width;
721 uint32_t v_border_top;
722 uint32_t v_addressable;
723 uint32_t v_border_bottom;
724 uint32_t v_front_porch;
725 uint32_t v_sync_width;
727 uint32_t pix_clk_100hz;
731 enum dc_timing_3d_format timing_3d_format;
732 enum dc_color_depth display_color_depth;
733 enum dc_pixel_encoding pixel_encoding;
734 enum dc_aspect_ratio aspect_ratio;
735 enum scanning_type scan_type;
737 struct dc_crtc_timing_flags flags;
738 struct dc_dsc_config dsc_cfg;
742 TRIGGER_DELAY_NEXT_PIXEL = 0,
743 TRIGGER_DELAY_NEXT_LINE,
747 CRTC_EVENT_VSYNC_RISING = 0,
748 CRTC_EVENT_VSYNC_FALLING
751 struct crtc_trigger_info {
753 struct dc_stream_state *event_source;
754 enum crtc_event event;
755 enum trigger_delay delay;
758 struct dc_crtc_timing_adjust {
759 uint32_t v_total_min;
760 uint32_t v_total_max;
761 uint32_t v_total_mid;
762 uint32_t v_total_mid_frame_num;
768 VIDEO_MEMORY_TYPE_GDDR5 = 2,
769 VIDEO_MEMORY_TYPE_DDR3 = 3,
770 VIDEO_MEMORY_TYPE_DDR4 = 4,
771 VIDEO_MEMORY_TYPE_HBM = 5,
772 VIDEO_MEMORY_TYPE_GDDR6 = 6,
775 enum dwb_cnv_out_bpc {
776 DWB_CNV_OUT_BPC_8BPC = 0,
777 DWB_CNV_OUT_BPC_10BPC = 1,
780 enum dwb_output_depth {
781 DWB_OUTPUT_PIXEL_DEPTH_8BPC = 0,
782 DWB_OUTPUT_PIXEL_DEPTH_10BPC = 1,
785 enum dwb_capture_rate {
786 dwb_capture_rate_0 = 0, /* Every frame is captured. */
787 dwb_capture_rate_1 = 1, /* Every other frame is captured. */
788 dwb_capture_rate_2 = 2, /* Every 3rd frame is captured. */
789 dwb_capture_rate_3 = 3, /* Every 4th frame is captured. */
792 enum dwb_scaler_mode {
793 dwb_scaler_mode_bypass444 = 0,
794 dwb_scaler_mode_rgb444 = 1,
795 dwb_scaler_mode_yuv444 = 2,
796 dwb_scaler_mode_yuv420 = 3
799 enum dwb_subsample_position {
800 DWB_INTERSTITIAL_SUBSAMPLING = 0,
801 DWB_COSITED_SUBSAMPLING = 1
804 enum dwb_stereo_eye_select {
805 DWB_STEREO_EYE_LEFT = 1, /* Capture left eye only */
806 DWB_STEREO_EYE_RIGHT = 2, /* Capture right eye only */
809 enum dwb_stereo_type {
810 DWB_STEREO_TYPE_FRAME_PACKING = 0, /* Frame packing */
811 DWB_STEREO_TYPE_FRAME_SEQUENTIAL = 3, /* Frame sequential */
814 #define MCIF_BUF_COUNT 4
816 struct mcif_buf_params {
817 unsigned long long luma_address[MCIF_BUF_COUNT];
818 unsigned long long chroma_address[MCIF_BUF_COUNT];
819 unsigned int luma_pitch;
820 unsigned int chroma_pitch;
821 unsigned int warmup_pitch;
826 #define MAX_TG_COLOR_VALUE 0x3FF
828 /* Maximum 10 bits color value */
834 #endif /* DC_HW_TYPES_H */