2 * Copyright 2012-15 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.
28 /* AND EdidUtility only needs a portion
29 * of this file, including the rest only
30 * causes additional issues.
33 #include "fixed31_32.h"
34 #include "irq_types.h"
35 #include "dc_dp_types.h"
36 #include "dc_hw_types.h"
37 #include "dal_types.h"
38 #include "grph_object_defs.h"
40 #ifdef CONFIG_DRM_AMD_DC_HDCP
41 #include "dm_cp_psp.h"
44 /* forward declarations */
45 struct dc_plane_state;
46 struct dc_stream_state;
52 /********************************
53 * Environment definitions
54 ********************************/
55 enum dce_environment {
56 DCE_ENV_PRODUCTION_DRV = 0,
57 /* Emulation on FPGA, in "Maximus" System.
58 * This environment enforces that *only* DC registers accessed.
59 * (access to non-DC registers will hang FPGA) */
61 /* Emulation on real HW or on FPGA. Used by Diagnostics, enforces
62 * requirements of Diagnostics team. */
65 * Guest VM system, DC HW may exist but is not virtualized and
66 * should not be used. SW support for VDI only.
71 /* Note: use these macro definitions instead of direct comparison! */
72 #define IS_FPGA_MAXIMUS_DC(dce_environment) \
73 (dce_environment == DCE_ENV_FPGA_MAXIMUS)
75 #define IS_DIAG_DC(dce_environment) \
76 (IS_FPGA_MAXIMUS_DC(dce_environment) || (dce_environment == DCE_ENV_DIAG))
81 uint32_t pci_revision_id;
82 uint32_t hw_internal_rev;
85 uint32_t feature_flags;
86 uint32_t fake_paths_num;
87 void *atombios_base_address;
90 struct dc_perf_trace {
91 unsigned long read_count;
92 unsigned long write_count;
93 unsigned long last_entry_read;
94 unsigned long last_entry_write;
100 void *driver_context; /* e.g. amdgpu_device */
101 struct dc_perf_trace *perf_trace;
104 enum dce_environment dce_environment;
105 struct hw_asic_id asic_id;
107 /* todo: below should probably move to dc. to facilitate removal
108 * of AS we will store these here
110 enum dce_version dce_version;
111 struct dc_bios *dc_bios;
113 struct gpio_service *gpio_service;
114 uint32_t dc_sink_id_count;
115 uint32_t dc_stream_id_count;
116 uint64_t fbc_gpu_addr;
117 struct dc_dmub_srv *dmub_srv;
119 #ifdef CONFIG_DRM_AMD_DC_HDCP
120 struct cp_psp cp_psp;
125 #define DC_MAX_EDID_BUFFER_SIZE 1024
126 #define DC_EDID_BLOCK_SIZE 128
127 #define MAX_SURFACE_NUM 4
128 #define NUM_PIXEL_FORMATS 10
129 #define MAX_REPEATER_CNT 8
131 #include "dc_ddc_types.h"
140 enum view_3d_format {
141 VIEW_3D_FORMAT_NONE = 0,
142 VIEW_3D_FORMAT_FRAME_SEQUENTIAL,
143 VIEW_3D_FORMAT_SIDE_BY_SIDE,
144 VIEW_3D_FORMAT_TOP_AND_BOTTOM,
145 VIEW_3D_FORMAT_COUNT,
146 VIEW_3D_FORMAT_FIRST = VIEW_3D_FORMAT_FRAME_SEQUENTIAL
149 enum plane_stereo_format {
150 PLANE_STEREO_FORMAT_NONE = 0,
151 PLANE_STEREO_FORMAT_SIDE_BY_SIDE = 1,
152 PLANE_STEREO_FORMAT_TOP_AND_BOTTOM = 2,
153 PLANE_STEREO_FORMAT_FRAME_ALTERNATE = 3,
154 PLANE_STEREO_FORMAT_ROW_INTERLEAVED = 5,
155 PLANE_STEREO_FORMAT_COLUMN_INTERLEAVED = 6,
156 PLANE_STEREO_FORMAT_CHECKER_BOARD = 7
159 /* TODO: Find way to calculate number of bits
160 * Please increase if pixel_format enum increases
161 * num from PIXEL_FORMAT_INDEX8 to PIXEL_FORMAT_444BPP32
164 enum dc_edid_connector_type {
165 DC_EDID_CONNECTOR_UNKNOWN = 0,
166 DC_EDID_CONNECTOR_ANALOG = 1,
167 DC_EDID_CONNECTOR_DIGITAL = 10,
168 DC_EDID_CONNECTOR_DVI = 11,
169 DC_EDID_CONNECTOR_HDMIA = 12,
170 DC_EDID_CONNECTOR_MDDI = 14,
171 DC_EDID_CONNECTOR_DISPLAYPORT = 15
174 enum dc_edid_status {
182 enum act_return_status {
188 /* audio capability from EDID*/
189 struct dc_cea_audio_mode {
190 uint8_t format_code; /* ucData[0] [6:3]*/
191 uint8_t channel_count; /* ucData[0] [2:0]*/
192 uint8_t sample_rate; /* ucData[1]*/
194 uint8_t sample_size; /* for LPCM*/
195 /* for Audio Formats 2-8 (Max bit rate divided by 8 kHz)*/
196 uint8_t max_bit_rate;
197 uint8_t audio_codec_vendor_specific; /* for Audio Formats 9-15*/
203 uint8_t raw_edid[DC_MAX_EDID_BUFFER_SIZE];
206 /* When speaker location data block is not available, DEFAULT_SPEAKER_LOCATION
207 * is used. In this case we assume speaker location are: front left, front
208 * right and front center. */
209 #define DEFAULT_SPEAKER_LOCATION 5
211 #define DC_MAX_AUDIO_DESC_COUNT 16
213 #define AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS 20
215 union display_content_support {
218 unsigned int valid_content_type :1;
219 unsigned int game_content :1;
220 unsigned int cinema_content :1;
221 unsigned int photo_content :1;
222 unsigned int graphics_content :1;
223 unsigned int reserved :27;
227 struct dc_panel_patch {
228 unsigned int dppowerup_delay;
229 unsigned int extra_t12_ms;
230 unsigned int extra_delay_backlight_off;
231 unsigned int extra_t7_ms;
232 unsigned int skip_scdc_overwrite;
233 unsigned int delay_ignore_msa;
234 unsigned int disable_fec;
237 struct dc_edid_caps {
238 /* sink identification */
239 uint16_t manufacturer_id;
241 uint32_t serial_number;
242 uint8_t manufacture_week;
243 uint8_t manufacture_year;
244 uint8_t display_name[AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS];
247 uint8_t speaker_flags;
248 uint32_t audio_mode_count;
249 struct dc_cea_audio_mode audio_modes[DC_MAX_AUDIO_DESC_COUNT];
250 uint32_t audio_latency;
251 uint32_t video_latency;
253 union display_content_support content_support;
259 bool lte_340mcsc_scramble;
264 struct dc_panel_patch panel_patch;
272 struct dc_mode_flags {
273 /* note: part of refresh rate flag*/
274 uint32_t INTERLACE :1;
275 /* native display timing*/
277 /* preferred is the recommended mode, one per display */
278 uint32_t PREFERRED :1;
279 /* true if this mode should use reduced blanking timings
280 *_not_ related to the Reduced Blanking adjustment*/
281 uint32_t REDUCED_BLANKING :1;
282 /* note: part of refreshrate flag*/
283 uint32_t VIDEO_OPTIMIZED_RATE :1;
284 /* should be reported to upper layers as mode_flags*/
285 uint32_t PACKED_PIXEL_FORMAT :1;
287 uint32_t PREFERRED_VIEW :1;
288 /* this timing should be used only in tiled mode*/
289 uint32_t TILED_MODE :1;
290 uint32_t DSE_MODE :1;
291 /* Refresh rate divider when Miracast sink is using a
292 different rate than the output display device
293 Must be zero for wired displays and non-zero for
295 uint32_t MIRACAST_REFRESH_DIVIDER;
299 enum dc_timing_source {
300 TIMING_SOURCE_UNDEFINED,
302 /* explicitly specifed by user, most important*/
303 TIMING_SOURCE_USER_FORCED,
304 TIMING_SOURCE_USER_OVERRIDE,
305 TIMING_SOURCE_CUSTOM,
306 TIMING_SOURCE_EXPLICIT,
308 /* explicitly specified by the display device, more important*/
309 TIMING_SOURCE_EDID_CEA_SVD_3D,
310 TIMING_SOURCE_EDID_CEA_SVD_PREFERRED,
311 TIMING_SOURCE_EDID_CEA_SVD_420,
312 TIMING_SOURCE_EDID_DETAILED,
313 TIMING_SOURCE_EDID_ESTABLISHED,
314 TIMING_SOURCE_EDID_STANDARD,
315 TIMING_SOURCE_EDID_CEA_SVD,
316 TIMING_SOURCE_EDID_CVT_3BYTE,
317 TIMING_SOURCE_EDID_4BYTE,
321 TIMING_SOURCE_HDMI_VIC,
323 /* implicitly specified by display device, still safe but less important*/
324 TIMING_SOURCE_DEFAULT,
326 /* only used for custom base modes */
327 TIMING_SOURCE_CUSTOM_BASE,
329 /* these timing might not work, least important*/
330 TIMING_SOURCE_RANGELIMIT,
331 TIMING_SOURCE_OS_FORCED,
332 TIMING_SOURCE_IMPLICIT,
334 /* only used by default mode list*/
335 TIMING_SOURCE_BASICMODE,
341 struct stereo_3d_features {
346 bool singleFrameSWPacked;
349 enum dc_timing_support_method {
350 TIMING_SUPPORT_METHOD_UNDEFINED,
351 TIMING_SUPPORT_METHOD_EXPLICIT,
352 TIMING_SUPPORT_METHOD_IMPLICIT,
353 TIMING_SUPPORT_METHOD_NATIVE
356 struct dc_mode_info {
357 uint32_t pixel_width;
358 uint32_t pixel_height;
360 /* Vertical refresh rate for progressive modes.
361 * Field rate for interlaced modes.*/
363 enum dc_timing_standard timing_standard;
364 enum dc_timing_source timing_source;
365 struct dc_mode_flags flags;
368 enum dc_power_state {
369 DC_POWER_STATE_ON = 1,
370 DC_POWER_STATE_STANDBY,
371 DC_POWER_STATE_SUSPEND,
376 enum dc_video_power_state {
377 DC_VIDEO_POWER_UNSPECIFIED = 0,
378 DC_VIDEO_POWER_ON = 1,
379 DC_VIDEO_POWER_STANDBY,
380 DC_VIDEO_POWER_SUSPEND,
382 DC_VIDEO_POWER_HIBERNATE,
383 DC_VIDEO_POWER_SHUTDOWN,
384 DC_VIDEO_POWER_ULPS, /* BACO or Ultra-Light-Power-State */
385 DC_VIDEO_POWER_AFTER_RESET,
386 DC_VIDEO_POWER_MAXIMUM
389 enum dc_acpi_cm_power_state {
390 DC_ACPI_CM_POWER_STATE_D0 = 1,
391 DC_ACPI_CM_POWER_STATE_D1 = 2,
392 DC_ACPI_CM_POWER_STATE_D2 = 4,
393 DC_ACPI_CM_POWER_STATE_D3 = 8
396 enum dc_connection_type {
398 dc_connection_single,
399 dc_connection_mst_branch,
400 dc_connection_active_dongle
403 struct dc_csc_adjustments {
404 struct fixed31_32 contrast;
405 struct fixed31_32 saturation;
406 struct fixed31_32 brightness;
407 struct fixed31_32 hue;
410 enum dpcd_downstream_port_max_bpc {
411 DOWN_STREAM_MAX_8BPC = 0,
412 DOWN_STREAM_MAX_10BPC,
413 DOWN_STREAM_MAX_12BPC,
414 DOWN_STREAM_MAX_16BPC
418 enum link_training_offset {
420 LTTPR_PHY_REPEATER1 = 1,
421 LTTPR_PHY_REPEATER2 = 2,
422 LTTPR_PHY_REPEATER3 = 3,
423 LTTPR_PHY_REPEATER4 = 4,
424 LTTPR_PHY_REPEATER5 = 5,
425 LTTPR_PHY_REPEATER6 = 6,
426 LTTPR_PHY_REPEATER7 = 7,
427 LTTPR_PHY_REPEATER8 = 8
430 struct dc_lttpr_caps {
431 union dpcd_rev revision;
433 uint8_t max_lane_count;
434 uint8_t max_link_rate;
435 uint8_t phy_repeater_cnt;
436 uint8_t max_ext_timeout;
437 uint8_t aux_rd_interval[MAX_REPEATER_CNT - 1];
440 struct dc_dongle_caps {
441 /* dongle type (DP converter, CV smart dongle) */
442 enum display_dongle_type dongle_type;
443 bool extendedCapValid;
444 /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER,
445 indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/
446 bool is_dp_hdmi_s3d_converter;
447 bool is_dp_hdmi_ycbcr422_pass_through;
448 bool is_dp_hdmi_ycbcr420_pass_through;
449 bool is_dp_hdmi_ycbcr422_converter;
450 bool is_dp_hdmi_ycbcr420_converter;
451 uint32_t dp_hdmi_max_bpc;
452 uint32_t dp_hdmi_max_pixel_clk_in_khz;
455 enum scaling_transformation {
456 SCALING_TRANSFORMATION_UNINITIALIZED,
457 SCALING_TRANSFORMATION_IDENTITY = 0x0001,
458 SCALING_TRANSFORMATION_CENTER_TIMING = 0x0002,
459 SCALING_TRANSFORMATION_FULL_SCREEN_SCALE = 0x0004,
460 SCALING_TRANSFORMATION_PRESERVE_ASPECT_RATIO_SCALE = 0x0008,
461 SCALING_TRANSFORMATION_DAL_DECIDE = 0x0010,
462 SCALING_TRANSFORMATION_INVALID = 0x80000000,
464 /* Flag the first and last */
465 SCALING_TRANSFORMATION_BEGING = SCALING_TRANSFORMATION_IDENTITY,
466 SCALING_TRANSFORMATION_END =
467 SCALING_TRANSFORMATION_PRESERVE_ASPECT_RATIO_SCALE
470 enum display_content_type {
471 DISPLAY_CONTENT_TYPE_NO_DATA = 0,
472 DISPLAY_CONTENT_TYPE_GRAPHICS = 1,
473 DISPLAY_CONTENT_TYPE_PHOTO = 2,
474 DISPLAY_CONTENT_TYPE_CINEMA = 4,
475 DISPLAY_CONTENT_TYPE_GAME = 8
479 struct dwb_stereo_params {
480 bool stereo_enabled; /* false: normal mode, true: 3D stereo */
481 enum dwb_stereo_type stereo_type; /* indicates stereo format */
482 bool stereo_polarity; /* indicates left eye or right eye comes first in stereo mode */
483 enum dwb_stereo_eye_select stereo_eye_select; /* indicate which eye should be captured */
486 struct dc_dwb_cnv_params {
487 unsigned int src_width; /* input active width */
488 unsigned int src_height; /* input active height (half-active height in interlaced mode) */
489 unsigned int crop_width; /* cropped window width at cnv output */
490 bool crop_en; /* window cropping enable in cnv */
491 unsigned int crop_height; /* cropped window height at cnv output */
492 unsigned int crop_x; /* cropped window start x value at cnv output */
493 unsigned int crop_y; /* cropped window start y value at cnv output */
494 enum dwb_cnv_out_bpc cnv_out_bpc; /* cnv output pixel depth - 8bpc or 10bpc */
497 struct dc_dwb_params {
498 struct dc_dwb_cnv_params cnv_params; /* CNV source size and cropping window parameters */
499 unsigned int dest_width; /* Destination width */
500 unsigned int dest_height; /* Destination height */
501 enum dwb_scaler_mode out_format; /* default = YUV420 - TODO: limit this to 0 and 1 on dcn3 */
502 enum dwb_output_depth output_depth; /* output pixel depth - 8bpc or 10bpc */
503 enum dwb_capture_rate capture_rate; /* controls the frame capture rate */
504 struct scaling_taps scaler_taps; /* Scaling taps */
505 enum dwb_subsample_position subsample_position;
506 struct dc_transfer_func *out_transfer_func;
511 union audio_sample_rates {
512 struct sample_rates {
518 uint8_t RATE_176_4:1;
525 struct audio_speaker_flags {
533 uint32_t SUPPORT_AI:1;
536 struct audio_speaker_info {
537 uint32_t ALLSPEAKERS:7;
538 uint32_t SUPPORT_AI:1;
542 struct audio_info_flags {
546 struct audio_speaker_flags speaker_flags;
547 struct audio_speaker_info info;
553 enum audio_format_code {
554 AUDIO_FORMAT_CODE_FIRST = 1,
555 AUDIO_FORMAT_CODE_LINEARPCM = AUDIO_FORMAT_CODE_FIRST,
557 AUDIO_FORMAT_CODE_AC3,
559 AUDIO_FORMAT_CODE_MPEG1,
561 AUDIO_FORMAT_CODE_MP3,
563 AUDIO_FORMAT_CODE_MPEG2,
564 AUDIO_FORMAT_CODE_AAC,
565 AUDIO_FORMAT_CODE_DTS,
566 AUDIO_FORMAT_CODE_ATRAC,
567 AUDIO_FORMAT_CODE_1BITAUDIO,
568 AUDIO_FORMAT_CODE_DOLBYDIGITALPLUS,
569 AUDIO_FORMAT_CODE_DTS_HD,
570 AUDIO_FORMAT_CODE_MAT_MLP,
571 AUDIO_FORMAT_CODE_DST,
572 AUDIO_FORMAT_CODE_WMAPRO,
573 AUDIO_FORMAT_CODE_LAST,
574 AUDIO_FORMAT_CODE_COUNT =
575 AUDIO_FORMAT_CODE_LAST - AUDIO_FORMAT_CODE_FIRST
579 /* ucData[0] [6:3] */
580 enum audio_format_code format_code;
581 /* ucData[0] [2:0] */
582 uint8_t channel_count;
584 union audio_sample_rates sample_rates;
588 /* for Audio Formats 2-8 (Max bit rate divided by 8 kHz) */
589 uint8_t max_bit_rate;
590 /* for Audio Formats 9-15 */
591 uint8_t vendor_specific;
596 struct audio_info_flags flags;
597 uint32_t video_latency;
598 uint32_t audio_latency;
599 uint32_t display_index;
600 uint8_t display_name[AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS];
601 uint32_t manufacture_id;
603 /* PortID used for ContainerID when defined */
606 /* this field must be last in this struct */
607 struct audio_mode modes[DC_MAX_AUDIO_DESC_COUNT];
610 unsigned int audio_packet_type;
611 unsigned int max_audiosample_rate;
614 enum dc_infoframe_type {
615 DC_HDMI_INFOFRAME_TYPE_VENDOR = 0x81,
616 DC_HDMI_INFOFRAME_TYPE_AVI = 0x82,
617 DC_HDMI_INFOFRAME_TYPE_SPD = 0x83,
618 DC_HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
619 DC_DP_INFOFRAME_TYPE_PPS = 0x10,
622 struct dc_info_packet {
631 struct dc_info_packet_128 {
640 #define DC_PLANE_UPDATE_TIMES_MAX 10
642 struct dc_plane_flip_time {
643 unsigned int time_elapsed_in_us[DC_PLANE_UPDATE_TIMES_MAX];
645 unsigned int prev_update_time_in_us;
649 unsigned char psr_version;
650 unsigned int psr_rfb_setup_time;
651 bool psr_exit_link_training_required;
652 bool psr_frame_capture_indication_req;
653 unsigned int psr_sdp_transmit_line_num_deadline;
654 bool allow_smu_optimizations;
657 union dmcu_psr_level {
659 unsigned int SKIP_CRC:1;
660 unsigned int SKIP_DP_VID_STREAM_DISABLE:1;
661 unsigned int SKIP_PHY_POWER_DOWN:1;
662 unsigned int SKIP_AUX_ACK_CHECK:1;
663 unsigned int SKIP_CRTC_DISABLE:1;
664 unsigned int SKIP_AUX_RFB_CAPTURE_CHECK:1;
665 unsigned int SKIP_SMU_NOTIFICATION:1;
666 unsigned int SKIP_AUTO_STATE_ADVANCE:1;
667 unsigned int DISABLE_PSR_ENTRY_ABORT:1;
668 unsigned int SKIP_SINGLE_OTG_DISABLE:1;
669 unsigned int RESERVED:22;
674 enum physical_phy_id {
686 PHYLD_UNKNOWN = (-1L)
690 PHY_TYPE_UNKNOWN = 1,
691 PHY_TYPE_PCIE_PHY = 2,
697 enum channel_id channel;
699 enum transmitter transmitterId;
700 /* Engine Id is used for Dig Be source select */
701 enum engine_id engineId;
702 /* Controller Id used for Dig Fe source select */
703 enum controller_id controllerId;
705 enum phy_type phyType;
706 /* Physical PHY Id used by SMU interpretation */
707 enum physical_phy_id smuPhyId;
708 /* Vertical total pixels from crtc timing.
709 * This is used for static screen detection.
710 * ie. If we want to detect half a frame,
711 * we use this to determine the hyst lines.
713 unsigned int crtcTimingVerticalTotal;
714 /* PSR supported from panel capabilities and
715 * current display configuration
717 bool psrSupportedDisplayConfig;
718 /* Whether fast link training is supported by the panel */
719 bool psrExitLinkTrainingRequired;
720 /* If RFB setup time is greater than the total VBLANK time,
721 * it is not possible for the sink to capture the video frame
722 * in the same frame the SDP is sent. In this case,
723 * the frame capture indication bit should be set and an extra
724 * static frame should be transmitted to the sink.
726 bool psrFrameCaptureIndicationReq;
727 /* Set the last possible line SDP may be transmitted without violating
728 * the RFB setup time or entering the active video frame.
730 unsigned int sdpTransmitLineNumDeadline;
731 /* The VSync rate in Hz used to calculate the
732 * step size for smooth brightness feature
734 unsigned int vsync_rate_hz;
735 unsigned int skipPsrWaitForPllLock;
736 unsigned int numberOfControllers;
737 /* Unused, for future use. To indicate that first changed frame from
738 * state3 shouldn't result in psr_inactive, but rather to perform
739 * an automatic single frame rfb_update.
741 bool rfb_update_auto_en;
742 /* Number of frame before entering static screen */
743 unsigned int timehyst_frames;
744 /* Partial frames before entering static screen */
745 unsigned int hyst_lines;
746 /* # of repeated AUX transaction attempts to make before
747 * indicating failure to the driver
749 unsigned int aux_repeats;
750 /* Controls hw blocks to power down during PSR active state */
751 union dmcu_psr_level psr_level;
752 /* Controls additional delay after remote frame capture before
753 * continuing powerd own
755 unsigned int frame_delay;
756 bool allow_smu_optimizations;
759 struct colorspace_transform {
760 struct fixed31_32 matrix[12];
771 unsigned int memoryClock;
772 unsigned int displayClock;
773 unsigned int engineClock;
774 unsigned int maxSupportedDppClock;
775 unsigned int dppClock;
776 unsigned int socClock;
777 unsigned int dcfClockDeepSleep;
779 unsigned int phyClock;
784 DC_CLOCK_TYPE_DISPCLK = 0,
785 DC_CLOCK_TYPE_DPPCLK = 1,
788 struct dc_clock_config {
789 uint32_t max_clock_khz;
790 uint32_t min_clock_khz;
791 uint32_t bw_requirequired_clock_khz;
792 uint32_t current_clock_khz;/*current clock in use*/
795 /* DSC DPCD capabilities */
796 union dsc_slice_caps1 {
798 uint8_t NUM_SLICES_1 : 1;
799 uint8_t NUM_SLICES_2 : 1;
800 uint8_t RESERVED : 1;
801 uint8_t NUM_SLICES_4 : 1;
802 uint8_t NUM_SLICES_6 : 1;
803 uint8_t NUM_SLICES_8 : 1;
804 uint8_t NUM_SLICES_10 : 1;
805 uint8_t NUM_SLICES_12 : 1;
810 union dsc_slice_caps2 {
812 uint8_t NUM_SLICES_16 : 1;
813 uint8_t NUM_SLICES_20 : 1;
814 uint8_t NUM_SLICES_24 : 1;
815 uint8_t RESERVED : 5;
820 union dsc_color_formats {
823 uint8_t YCBCR_444 : 1;
824 uint8_t YCBCR_SIMPLE_422 : 1;
825 uint8_t YCBCR_NATIVE_422 : 1;
826 uint8_t YCBCR_NATIVE_420 : 1;
827 uint8_t RESERVED : 3;
832 union dsc_color_depth {
834 uint8_t RESERVED1 : 1;
835 uint8_t COLOR_DEPTH_8_BPC : 1;
836 uint8_t COLOR_DEPTH_10_BPC : 1;
837 uint8_t COLOR_DEPTH_12_BPC : 1;
838 uint8_t RESERVED2 : 3;
843 struct dsc_dec_dpcd_caps {
844 bool is_dsc_supported;
846 int32_t rc_buffer_size; /* DSC RC buffer block size in bytes */
847 union dsc_slice_caps1 slice_caps1;
848 union dsc_slice_caps2 slice_caps2;
849 int32_t lb_bit_depth;
850 bool is_block_pred_supported;
851 int32_t edp_max_bits_per_pixel; /* Valid only in eDP */
852 union dsc_color_formats color_formats;
853 union dsc_color_depth color_depth;
854 int32_t throughput_mode_0_mps; /* In MPs */
855 int32_t throughput_mode_1_mps; /* In MPs */
856 int32_t max_slice_width;
857 uint32_t bpp_increment_div; /* bpp increment divisor, e.g. if 16, it's 1/16th of a bit */
859 /* Extended DSC caps */
860 uint32_t branch_overall_throughput_0_mps; /* In MPs */
861 uint32_t branch_overall_throughput_1_mps; /* In MPs */
862 uint32_t branch_max_line_width;
865 #endif /* DC_TYPES_H_ */