1*b843c749SSergey Zigachev /* 2*b843c749SSergey Zigachev * Copyright 2012-14 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_INTERFACE_H_ 27*b843c749SSergey Zigachev #define DC_INTERFACE_H_ 28*b843c749SSergey Zigachev 29*b843c749SSergey Zigachev #include "dc_types.h" 30*b843c749SSergey Zigachev #include "grph_object_defs.h" 31*b843c749SSergey Zigachev #include "logger_types.h" 32*b843c749SSergey Zigachev #include "gpio_types.h" 33*b843c749SSergey Zigachev #include "link_service_types.h" 34*b843c749SSergey Zigachev #include "grph_object_ctrl_defs.h" 35*b843c749SSergey Zigachev #include <inc/hw/opp.h> 36*b843c749SSergey Zigachev 37*b843c749SSergey Zigachev #include "inc/hw_sequencer.h" 38*b843c749SSergey Zigachev #include "inc/compressor.h" 39*b843c749SSergey Zigachev #include "dml/display_mode_lib.h" 40*b843c749SSergey Zigachev 41*b843c749SSergey Zigachev #define DC_VER "3.1.59" 42*b843c749SSergey Zigachev 43*b843c749SSergey Zigachev #define MAX_SURFACES 3 44*b843c749SSergey Zigachev #define MAX_STREAMS 6 45*b843c749SSergey Zigachev #define MAX_SINKS_PER_LINK 4 46*b843c749SSergey Zigachev 47*b843c749SSergey Zigachev 48*b843c749SSergey Zigachev /******************************************************************************* 49*b843c749SSergey Zigachev * Display Core Interfaces 50*b843c749SSergey Zigachev ******************************************************************************/ 51*b843c749SSergey Zigachev struct dmcu_version { 52*b843c749SSergey Zigachev unsigned int date; 53*b843c749SSergey Zigachev unsigned int month; 54*b843c749SSergey Zigachev unsigned int year; 55*b843c749SSergey Zigachev unsigned int interface_version; 56*b843c749SSergey Zigachev }; 57*b843c749SSergey Zigachev 58*b843c749SSergey Zigachev struct dc_versions { 59*b843c749SSergey Zigachev const char *dc_ver; 60*b843c749SSergey Zigachev struct dmcu_version dmcu_version; 61*b843c749SSergey Zigachev }; 62*b843c749SSergey Zigachev 63*b843c749SSergey Zigachev struct dc_caps { 64*b843c749SSergey Zigachev uint32_t max_streams; 65*b843c749SSergey Zigachev uint32_t max_links; 66*b843c749SSergey Zigachev uint32_t max_audios; 67*b843c749SSergey Zigachev uint32_t max_slave_planes; 68*b843c749SSergey Zigachev uint32_t max_planes; 69*b843c749SSergey Zigachev uint32_t max_downscale_ratio; 70*b843c749SSergey Zigachev uint32_t i2c_speed_in_khz; 71*b843c749SSergey Zigachev uint32_t dmdata_alloc_size; 72*b843c749SSergey Zigachev unsigned int max_cursor_size; 73*b843c749SSergey Zigachev unsigned int max_video_width; 74*b843c749SSergey Zigachev int linear_pitch_alignment; 75*b843c749SSergey Zigachev bool dcc_const_color; 76*b843c749SSergey Zigachev bool dynamic_audio; 77*b843c749SSergey Zigachev bool is_apu; 78*b843c749SSergey Zigachev bool dual_link_dvi; 79*b843c749SSergey Zigachev bool post_blend_color_processing; 80*b843c749SSergey Zigachev bool force_dp_tps4_for_cp2520; 81*b843c749SSergey Zigachev bool disable_dp_clk_share; 82*b843c749SSergey Zigachev bool psp_setup_panel_mode; 83*b843c749SSergey Zigachev }; 84*b843c749SSergey Zigachev 85*b843c749SSergey Zigachev struct dc_dcc_surface_param { 86*b843c749SSergey Zigachev struct dc_size surface_size; 87*b843c749SSergey Zigachev enum surface_pixel_format format; 88*b843c749SSergey Zigachev enum swizzle_mode_values swizzle_mode; 89*b843c749SSergey Zigachev enum dc_scan_direction scan; 90*b843c749SSergey Zigachev }; 91*b843c749SSergey Zigachev 92*b843c749SSergey Zigachev struct dc_dcc_setting { 93*b843c749SSergey Zigachev unsigned int max_compressed_blk_size; 94*b843c749SSergey Zigachev unsigned int max_uncompressed_blk_size; 95*b843c749SSergey Zigachev bool independent_64b_blks; 96*b843c749SSergey Zigachev }; 97*b843c749SSergey Zigachev 98*b843c749SSergey Zigachev struct dc_surface_dcc_cap { 99*b843c749SSergey Zigachev union { 100*b843c749SSergey Zigachev struct { 101*b843c749SSergey Zigachev struct dc_dcc_setting rgb; 102*b843c749SSergey Zigachev } grph; 103*b843c749SSergey Zigachev 104*b843c749SSergey Zigachev struct { 105*b843c749SSergey Zigachev struct dc_dcc_setting luma; 106*b843c749SSergey Zigachev struct dc_dcc_setting chroma; 107*b843c749SSergey Zigachev } video; 108*b843c749SSergey Zigachev }; 109*b843c749SSergey Zigachev 110*b843c749SSergey Zigachev bool capable; 111*b843c749SSergey Zigachev bool const_color_support; 112*b843c749SSergey Zigachev }; 113*b843c749SSergey Zigachev 114*b843c749SSergey Zigachev struct dc_static_screen_events { 115*b843c749SSergey Zigachev bool force_trigger; 116*b843c749SSergey Zigachev bool cursor_update; 117*b843c749SSergey Zigachev bool surface_update; 118*b843c749SSergey Zigachev bool overlay_update; 119*b843c749SSergey Zigachev }; 120*b843c749SSergey Zigachev 121*b843c749SSergey Zigachev 122*b843c749SSergey Zigachev /* Surface update type is used by dc_update_surfaces_and_stream 123*b843c749SSergey Zigachev * The update type is determined at the very beginning of the function based 124*b843c749SSergey Zigachev * on parameters passed in and decides how much programming (or updating) is 125*b843c749SSergey Zigachev * going to be done during the call. 126*b843c749SSergey Zigachev * 127*b843c749SSergey Zigachev * UPDATE_TYPE_FAST is used for really fast updates that do not require much 128*b843c749SSergey Zigachev * logical calculations or hardware register programming. This update MUST be 129*b843c749SSergey Zigachev * ISR safe on windows. Currently fast update will only be used to flip surface 130*b843c749SSergey Zigachev * address. 131*b843c749SSergey Zigachev * 132*b843c749SSergey Zigachev * UPDATE_TYPE_MED is used for slower updates which require significant hw 133*b843c749SSergey Zigachev * re-programming however do not affect bandwidth consumption or clock 134*b843c749SSergey Zigachev * requirements. At present, this is the level at which front end updates 135*b843c749SSergey Zigachev * that do not require us to run bw_calcs happen. These are in/out transfer func 136*b843c749SSergey Zigachev * updates, viewport offset changes, recout size changes and pixel depth changes. 137*b843c749SSergey Zigachev * This update can be done at ISR, but we want to minimize how often this happens. 138*b843c749SSergey Zigachev * 139*b843c749SSergey Zigachev * UPDATE_TYPE_FULL is slow. Really slow. This requires us to recalculate our 140*b843c749SSergey Zigachev * bandwidth and clocks, possibly rearrange some pipes and reprogram anything front 141*b843c749SSergey Zigachev * end related. Any time viewport dimensions, recout dimensions, scaling ratios or 142*b843c749SSergey Zigachev * gamma need to be adjusted or pipe needs to be turned on (or disconnected) we do 143*b843c749SSergey Zigachev * a full update. This cannot be done at ISR level and should be a rare event. 144*b843c749SSergey Zigachev * Unless someone is stress testing mpo enter/exit, playing with colour or adjusting 145*b843c749SSergey Zigachev * underscan we don't expect to see this call at all. 146*b843c749SSergey Zigachev */ 147*b843c749SSergey Zigachev 148*b843c749SSergey Zigachev enum surface_update_type { 149*b843c749SSergey Zigachev UPDATE_TYPE_FAST, /* super fast, safe to execute in isr */ 150*b843c749SSergey Zigachev UPDATE_TYPE_MED, /* ISR safe, most of programming needed, no bw/clk change*/ 151*b843c749SSergey Zigachev UPDATE_TYPE_FULL, /* may need to shuffle resources */ 152*b843c749SSergey Zigachev }; 153*b843c749SSergey Zigachev 154*b843c749SSergey Zigachev /* Forward declaration*/ 155*b843c749SSergey Zigachev struct dc; 156*b843c749SSergey Zigachev struct dc_plane_state; 157*b843c749SSergey Zigachev struct dc_state; 158*b843c749SSergey Zigachev 159*b843c749SSergey Zigachev 160*b843c749SSergey Zigachev struct dc_cap_funcs { 161*b843c749SSergey Zigachev bool (*get_dcc_compression_cap)(const struct dc *dc, 162*b843c749SSergey Zigachev const struct dc_dcc_surface_param *input, 163*b843c749SSergey Zigachev struct dc_surface_dcc_cap *output); 164*b843c749SSergey Zigachev }; 165*b843c749SSergey Zigachev 166*b843c749SSergey Zigachev struct link_training_settings; 167*b843c749SSergey Zigachev 168*b843c749SSergey Zigachev 169*b843c749SSergey Zigachev /* Structure to hold configuration flags set by dm at dc creation. */ 170*b843c749SSergey Zigachev struct dc_config { 171*b843c749SSergey Zigachev bool gpu_vm_support; 172*b843c749SSergey Zigachev bool disable_disp_pll_sharing; 173*b843c749SSergey Zigachev }; 174*b843c749SSergey Zigachev 175*b843c749SSergey Zigachev enum visual_confirm { 176*b843c749SSergey Zigachev VISUAL_CONFIRM_DISABLE = 0, 177*b843c749SSergey Zigachev VISUAL_CONFIRM_SURFACE = 1, 178*b843c749SSergey Zigachev VISUAL_CONFIRM_HDR = 2, 179*b843c749SSergey Zigachev }; 180*b843c749SSergey Zigachev 181*b843c749SSergey Zigachev enum dcc_option { 182*b843c749SSergey Zigachev DCC_ENABLE = 0, 183*b843c749SSergey Zigachev DCC_DISABLE = 1, 184*b843c749SSergey Zigachev DCC_HALF_REQ_DISALBE = 2, 185*b843c749SSergey Zigachev }; 186*b843c749SSergey Zigachev 187*b843c749SSergey Zigachev enum pipe_split_policy { 188*b843c749SSergey Zigachev MPC_SPLIT_DYNAMIC = 0, 189*b843c749SSergey Zigachev MPC_SPLIT_AVOID = 1, 190*b843c749SSergey Zigachev MPC_SPLIT_AVOID_MULT_DISP = 2, 191*b843c749SSergey Zigachev }; 192*b843c749SSergey Zigachev 193*b843c749SSergey Zigachev enum wm_report_mode { 194*b843c749SSergey Zigachev WM_REPORT_DEFAULT = 0, 195*b843c749SSergey Zigachev WM_REPORT_OVERRIDE = 1, 196*b843c749SSergey Zigachev }; 197*b843c749SSergey Zigachev 198*b843c749SSergey Zigachev /* 199*b843c749SSergey Zigachev * For any clocks that may differ per pipe 200*b843c749SSergey Zigachev * only the max is stored in this structure 201*b843c749SSergey Zigachev */ 202*b843c749SSergey Zigachev struct dc_clocks { 203*b843c749SSergey Zigachev int dispclk_khz; 204*b843c749SSergey Zigachev int max_supported_dppclk_khz; 205*b843c749SSergey Zigachev int dppclk_khz; 206*b843c749SSergey Zigachev int dcfclk_khz; 207*b843c749SSergey Zigachev int socclk_khz; 208*b843c749SSergey Zigachev int dcfclk_deep_sleep_khz; 209*b843c749SSergey Zigachev int fclk_khz; 210*b843c749SSergey Zigachev int phyclk_khz; 211*b843c749SSergey Zigachev }; 212*b843c749SSergey Zigachev 213*b843c749SSergey Zigachev struct dc_debug_options { 214*b843c749SSergey Zigachev enum visual_confirm visual_confirm; 215*b843c749SSergey Zigachev bool sanity_checks; 216*b843c749SSergey Zigachev bool max_disp_clk; 217*b843c749SSergey Zigachev bool surface_trace; 218*b843c749SSergey Zigachev bool timing_trace; 219*b843c749SSergey Zigachev bool clock_trace; 220*b843c749SSergey Zigachev bool validation_trace; 221*b843c749SSergey Zigachev bool bandwidth_calcs_trace; 222*b843c749SSergey Zigachev int max_downscale_src_width; 223*b843c749SSergey Zigachev 224*b843c749SSergey Zigachev /* stutter efficiency related */ 225*b843c749SSergey Zigachev bool disable_stutter; 226*b843c749SSergey Zigachev bool use_max_lb; 227*b843c749SSergey Zigachev enum dcc_option disable_dcc; 228*b843c749SSergey Zigachev enum pipe_split_policy pipe_split_policy; 229*b843c749SSergey Zigachev bool force_single_disp_pipe_split; 230*b843c749SSergey Zigachev bool voltage_align_fclk; 231*b843c749SSergey Zigachev 232*b843c749SSergey Zigachev bool disable_dfs_bypass; 233*b843c749SSergey Zigachev bool disable_dpp_power_gate; 234*b843c749SSergey Zigachev bool disable_hubp_power_gate; 235*b843c749SSergey Zigachev bool disable_pplib_wm_range; 236*b843c749SSergey Zigachev enum wm_report_mode pplib_wm_report_mode; 237*b843c749SSergey Zigachev unsigned int min_disp_clk_khz; 238*b843c749SSergey Zigachev int sr_exit_time_dpm0_ns; 239*b843c749SSergey Zigachev int sr_enter_plus_exit_time_dpm0_ns; 240*b843c749SSergey Zigachev int sr_exit_time_ns; 241*b843c749SSergey Zigachev int sr_enter_plus_exit_time_ns; 242*b843c749SSergey Zigachev int urgent_latency_ns; 243*b843c749SSergey Zigachev int percent_of_ideal_drambw; 244*b843c749SSergey Zigachev int dram_clock_change_latency_ns; 245*b843c749SSergey Zigachev bool optimized_watermark; 246*b843c749SSergey Zigachev int always_scale; 247*b843c749SSergey Zigachev bool disable_pplib_clock_request; 248*b843c749SSergey Zigachev bool disable_clock_gate; 249*b843c749SSergey Zigachev bool disable_dmcu; 250*b843c749SSergey Zigachev bool disable_psr; 251*b843c749SSergey Zigachev bool force_abm_enable; 252*b843c749SSergey Zigachev bool disable_hbup_pg; 253*b843c749SSergey Zigachev bool disable_dpp_pg; 254*b843c749SSergey Zigachev bool disable_stereo_support; 255*b843c749SSergey Zigachev bool vsr_support; 256*b843c749SSergey Zigachev bool performance_trace; 257*b843c749SSergey Zigachev bool az_endpoint_mute_only; 258*b843c749SSergey Zigachev bool always_use_regamma; 259*b843c749SSergey Zigachev bool p010_mpo_support; 260*b843c749SSergey Zigachev bool recovery_enabled; 261*b843c749SSergey Zigachev bool avoid_vbios_exec_table; 262*b843c749SSergey Zigachev bool scl_reset_length10; 263*b843c749SSergey Zigachev bool hdmi20_disable; 264*b843c749SSergey Zigachev bool skip_detection_link_training; 265*b843c749SSergey Zigachev }; 266*b843c749SSergey Zigachev 267*b843c749SSergey Zigachev struct dc_debug_data { 268*b843c749SSergey Zigachev uint32_t ltFailCount; 269*b843c749SSergey Zigachev uint32_t i2cErrorCount; 270*b843c749SSergey Zigachev uint32_t auxErrorCount; 271*b843c749SSergey Zigachev }; 272*b843c749SSergey Zigachev 273*b843c749SSergey Zigachev 274*b843c749SSergey Zigachev struct dc_state; 275*b843c749SSergey Zigachev struct resource_pool; 276*b843c749SSergey Zigachev struct dce_hwseq; 277*b843c749SSergey Zigachev struct dc { 278*b843c749SSergey Zigachev struct dc_versions versions; 279*b843c749SSergey Zigachev struct dc_caps caps; 280*b843c749SSergey Zigachev struct dc_cap_funcs cap_funcs; 281*b843c749SSergey Zigachev struct dc_config config; 282*b843c749SSergey Zigachev struct dc_debug_options debug; 283*b843c749SSergey Zigachev struct dc_context *ctx; 284*b843c749SSergey Zigachev 285*b843c749SSergey Zigachev uint8_t link_count; 286*b843c749SSergey Zigachev struct dc_link *links[MAX_PIPES * 2]; 287*b843c749SSergey Zigachev 288*b843c749SSergey Zigachev struct dc_state *current_state; 289*b843c749SSergey Zigachev struct resource_pool *res_pool; 290*b843c749SSergey Zigachev 291*b843c749SSergey Zigachev /* Display Engine Clock levels */ 292*b843c749SSergey Zigachev struct dm_pp_clock_levels sclk_lvls; 293*b843c749SSergey Zigachev 294*b843c749SSergey Zigachev /* Inputs into BW and WM calculations. */ 295*b843c749SSergey Zigachev struct bw_calcs_dceip *bw_dceip; 296*b843c749SSergey Zigachev struct bw_calcs_vbios *bw_vbios; 297*b843c749SSergey Zigachev #ifdef CONFIG_DRM_AMD_DC_DCN1_0 298*b843c749SSergey Zigachev struct dcn_soc_bounding_box *dcn_soc; 299*b843c749SSergey Zigachev struct dcn_ip_params *dcn_ip; 300*b843c749SSergey Zigachev struct display_mode_lib dml; 301*b843c749SSergey Zigachev #endif 302*b843c749SSergey Zigachev 303*b843c749SSergey Zigachev /* HW functions */ 304*b843c749SSergey Zigachev struct hw_sequencer_funcs hwss; 305*b843c749SSergey Zigachev struct dce_hwseq *hwseq; 306*b843c749SSergey Zigachev 307*b843c749SSergey Zigachev /* temp store of dm_pp_display_configuration 308*b843c749SSergey Zigachev * to compare to see if display config changed 309*b843c749SSergey Zigachev */ 310*b843c749SSergey Zigachev struct dm_pp_display_configuration prev_display_config; 311*b843c749SSergey Zigachev 312*b843c749SSergey Zigachev bool optimized_required; 313*b843c749SSergey Zigachev 314*b843c749SSergey Zigachev bool apply_edp_fast_boot_optimization; 315*b843c749SSergey Zigachev 316*b843c749SSergey Zigachev /* FBC compressor */ 317*b843c749SSergey Zigachev struct compressor *fbc_compressor; 318*b843c749SSergey Zigachev 319*b843c749SSergey Zigachev struct dc_debug_data debug_data; 320*b843c749SSergey Zigachev }; 321*b843c749SSergey Zigachev 322*b843c749SSergey Zigachev enum frame_buffer_mode { 323*b843c749SSergey Zigachev FRAME_BUFFER_MODE_LOCAL_ONLY = 0, 324*b843c749SSergey Zigachev FRAME_BUFFER_MODE_ZFB_ONLY, 325*b843c749SSergey Zigachev FRAME_BUFFER_MODE_MIXED_ZFB_AND_LOCAL, 326*b843c749SSergey Zigachev } ; 327*b843c749SSergey Zigachev 328*b843c749SSergey Zigachev struct dchub_init_data { 329*b843c749SSergey Zigachev int64_t zfb_phys_addr_base; 330*b843c749SSergey Zigachev int64_t zfb_mc_base_addr; 331*b843c749SSergey Zigachev uint64_t zfb_size_in_byte; 332*b843c749SSergey Zigachev enum frame_buffer_mode fb_mode; 333*b843c749SSergey Zigachev bool dchub_initialzied; 334*b843c749SSergey Zigachev bool dchub_info_valid; 335*b843c749SSergey Zigachev }; 336*b843c749SSergey Zigachev 337*b843c749SSergey Zigachev struct dc_init_data { 338*b843c749SSergey Zigachev struct hw_asic_id asic_id; 339*b843c749SSergey Zigachev void *driver; /* ctx */ 340*b843c749SSergey Zigachev struct cgs_device *cgs_device; 341*b843c749SSergey Zigachev 342*b843c749SSergey Zigachev int num_virtual_links; 343*b843c749SSergey Zigachev /* 344*b843c749SSergey Zigachev * If 'vbios_override' not NULL, it will be called instead 345*b843c749SSergey Zigachev * of the real VBIOS. Intended use is Diagnostics on FPGA. 346*b843c749SSergey Zigachev */ 347*b843c749SSergey Zigachev struct dc_bios *vbios_override; 348*b843c749SSergey Zigachev enum dce_environment dce_environment; 349*b843c749SSergey Zigachev 350*b843c749SSergey Zigachev struct dc_config flags; 351*b843c749SSergey Zigachev uint32_t log_mask; 352*b843c749SSergey Zigachev }; 353*b843c749SSergey Zigachev 354*b843c749SSergey Zigachev struct dc *dc_create(const struct dc_init_data *init_params); 355*b843c749SSergey Zigachev 356*b843c749SSergey Zigachev void dc_destroy(struct dc **dc); 357*b843c749SSergey Zigachev 358*b843c749SSergey Zigachev /******************************************************************************* 359*b843c749SSergey Zigachev * Surface Interfaces 360*b843c749SSergey Zigachev ******************************************************************************/ 361*b843c749SSergey Zigachev 362*b843c749SSergey Zigachev enum { 363*b843c749SSergey Zigachev TRANSFER_FUNC_POINTS = 1025 364*b843c749SSergey Zigachev }; 365*b843c749SSergey Zigachev 366*b843c749SSergey Zigachev struct dc_hdr_static_metadata { 367*b843c749SSergey Zigachev /* display chromaticities and white point in units of 0.00001 */ 368*b843c749SSergey Zigachev unsigned int chromaticity_green_x; 369*b843c749SSergey Zigachev unsigned int chromaticity_green_y; 370*b843c749SSergey Zigachev unsigned int chromaticity_blue_x; 371*b843c749SSergey Zigachev unsigned int chromaticity_blue_y; 372*b843c749SSergey Zigachev unsigned int chromaticity_red_x; 373*b843c749SSergey Zigachev unsigned int chromaticity_red_y; 374*b843c749SSergey Zigachev unsigned int chromaticity_white_point_x; 375*b843c749SSergey Zigachev unsigned int chromaticity_white_point_y; 376*b843c749SSergey Zigachev 377*b843c749SSergey Zigachev uint32_t min_luminance; 378*b843c749SSergey Zigachev uint32_t max_luminance; 379*b843c749SSergey Zigachev uint32_t maximum_content_light_level; 380*b843c749SSergey Zigachev uint32_t maximum_frame_average_light_level; 381*b843c749SSergey Zigachev }; 382*b843c749SSergey Zigachev 383*b843c749SSergey Zigachev enum dc_transfer_func_type { 384*b843c749SSergey Zigachev TF_TYPE_PREDEFINED, 385*b843c749SSergey Zigachev TF_TYPE_DISTRIBUTED_POINTS, 386*b843c749SSergey Zigachev TF_TYPE_BYPASS, 387*b843c749SSergey Zigachev TF_TYPE_HWPWL 388*b843c749SSergey Zigachev }; 389*b843c749SSergey Zigachev 390*b843c749SSergey Zigachev struct dc_transfer_func_distributed_points { 391*b843c749SSergey Zigachev struct fixed31_32 red[TRANSFER_FUNC_POINTS]; 392*b843c749SSergey Zigachev struct fixed31_32 green[TRANSFER_FUNC_POINTS]; 393*b843c749SSergey Zigachev struct fixed31_32 blue[TRANSFER_FUNC_POINTS]; 394*b843c749SSergey Zigachev 395*b843c749SSergey Zigachev uint16_t end_exponent; 396*b843c749SSergey Zigachev uint16_t x_point_at_y1_red; 397*b843c749SSergey Zigachev uint16_t x_point_at_y1_green; 398*b843c749SSergey Zigachev uint16_t x_point_at_y1_blue; 399*b843c749SSergey Zigachev }; 400*b843c749SSergey Zigachev 401*b843c749SSergey Zigachev enum dc_transfer_func_predefined { 402*b843c749SSergey Zigachev TRANSFER_FUNCTION_SRGB, 403*b843c749SSergey Zigachev TRANSFER_FUNCTION_BT709, 404*b843c749SSergey Zigachev TRANSFER_FUNCTION_PQ, 405*b843c749SSergey Zigachev TRANSFER_FUNCTION_LINEAR, 406*b843c749SSergey Zigachev TRANSFER_FUNCTION_UNITY, 407*b843c749SSergey Zigachev TRANSFER_FUNCTION_HLG, 408*b843c749SSergey Zigachev TRANSFER_FUNCTION_HLG12, 409*b843c749SSergey Zigachev TRANSFER_FUNCTION_GAMMA22 410*b843c749SSergey Zigachev }; 411*b843c749SSergey Zigachev 412*b843c749SSergey Zigachev struct dc_transfer_func { 413*b843c749SSergey Zigachev struct kref refcount; 414*b843c749SSergey Zigachev enum dc_transfer_func_type type; 415*b843c749SSergey Zigachev enum dc_transfer_func_predefined tf; 416*b843c749SSergey Zigachev /* FP16 1.0 reference level in nits, default is 80 nits, only for PQ*/ 417*b843c749SSergey Zigachev uint32_t sdr_ref_white_level; 418*b843c749SSergey Zigachev struct dc_context *ctx; 419*b843c749SSergey Zigachev union { 420*b843c749SSergey Zigachev struct pwl_params pwl; 421*b843c749SSergey Zigachev struct dc_transfer_func_distributed_points tf_pts; 422*b843c749SSergey Zigachev }; 423*b843c749SSergey Zigachev }; 424*b843c749SSergey Zigachev 425*b843c749SSergey Zigachev /* 426*b843c749SSergey Zigachev * This structure is filled in by dc_surface_get_status and contains 427*b843c749SSergey Zigachev * the last requested address and the currently active address so the called 428*b843c749SSergey Zigachev * can determine if there are any outstanding flips 429*b843c749SSergey Zigachev */ 430*b843c749SSergey Zigachev struct dc_plane_status { 431*b843c749SSergey Zigachev struct dc_plane_address requested_address; 432*b843c749SSergey Zigachev struct dc_plane_address current_address; 433*b843c749SSergey Zigachev bool is_flip_pending; 434*b843c749SSergey Zigachev bool is_right_eye; 435*b843c749SSergey Zigachev }; 436*b843c749SSergey Zigachev 437*b843c749SSergey Zigachev union surface_update_flags { 438*b843c749SSergey Zigachev 439*b843c749SSergey Zigachev struct { 440*b843c749SSergey Zigachev /* Medium updates */ 441*b843c749SSergey Zigachev uint32_t dcc_change:1; 442*b843c749SSergey Zigachev uint32_t color_space_change:1; 443*b843c749SSergey Zigachev uint32_t horizontal_mirror_change:1; 444*b843c749SSergey Zigachev uint32_t per_pixel_alpha_change:1; 445*b843c749SSergey Zigachev uint32_t rotation_change:1; 446*b843c749SSergey Zigachev uint32_t swizzle_change:1; 447*b843c749SSergey Zigachev uint32_t scaling_change:1; 448*b843c749SSergey Zigachev uint32_t position_change:1; 449*b843c749SSergey Zigachev uint32_t in_transfer_func_change:1; 450*b843c749SSergey Zigachev uint32_t input_csc_change:1; 451*b843c749SSergey Zigachev uint32_t coeff_reduction_change:1; 452*b843c749SSergey Zigachev uint32_t output_tf_change:1; 453*b843c749SSergey Zigachev uint32_t pixel_format_change:1; 454*b843c749SSergey Zigachev 455*b843c749SSergey Zigachev /* Full updates */ 456*b843c749SSergey Zigachev uint32_t new_plane:1; 457*b843c749SSergey Zigachev uint32_t bpp_change:1; 458*b843c749SSergey Zigachev uint32_t gamma_change:1; 459*b843c749SSergey Zigachev uint32_t bandwidth_change:1; 460*b843c749SSergey Zigachev uint32_t clock_change:1; 461*b843c749SSergey Zigachev uint32_t stereo_format_change:1; 462*b843c749SSergey Zigachev uint32_t full_update:1; 463*b843c749SSergey Zigachev } bits; 464*b843c749SSergey Zigachev 465*b843c749SSergey Zigachev uint32_t raw; 466*b843c749SSergey Zigachev }; 467*b843c749SSergey Zigachev 468*b843c749SSergey Zigachev struct dc_plane_state { 469*b843c749SSergey Zigachev struct dc_plane_address address; 470*b843c749SSergey Zigachev struct dc_plane_flip_time time; 471*b843c749SSergey Zigachev struct scaling_taps scaling_quality; 472*b843c749SSergey Zigachev struct rect src_rect; 473*b843c749SSergey Zigachev struct rect dst_rect; 474*b843c749SSergey Zigachev struct rect clip_rect; 475*b843c749SSergey Zigachev 476*b843c749SSergey Zigachev union plane_size plane_size; 477*b843c749SSergey Zigachev union dc_tiling_info tiling_info; 478*b843c749SSergey Zigachev 479*b843c749SSergey Zigachev struct dc_plane_dcc_param dcc; 480*b843c749SSergey Zigachev 481*b843c749SSergey Zigachev struct dc_gamma *gamma_correction; 482*b843c749SSergey Zigachev struct dc_transfer_func *in_transfer_func; 483*b843c749SSergey Zigachev struct dc_bias_and_scale *bias_and_scale; 484*b843c749SSergey Zigachev struct dc_csc_transform input_csc_color_matrix; 485*b843c749SSergey Zigachev struct fixed31_32 coeff_reduction_factor; 486*b843c749SSergey Zigachev uint32_t sdr_white_level; 487*b843c749SSergey Zigachev 488*b843c749SSergey Zigachev // TODO: No longer used, remove 489*b843c749SSergey Zigachev struct dc_hdr_static_metadata hdr_static_ctx; 490*b843c749SSergey Zigachev 491*b843c749SSergey Zigachev enum dc_color_space color_space; 492*b843c749SSergey Zigachev 493*b843c749SSergey Zigachev enum surface_pixel_format format; 494*b843c749SSergey Zigachev enum dc_rotation_angle rotation; 495*b843c749SSergey Zigachev enum plane_stereo_format stereo_format; 496*b843c749SSergey Zigachev 497*b843c749SSergey Zigachev bool is_tiling_rotated; 498*b843c749SSergey Zigachev bool per_pixel_alpha; 499*b843c749SSergey Zigachev bool visible; 500*b843c749SSergey Zigachev bool flip_immediate; 501*b843c749SSergey Zigachev bool horizontal_mirror; 502*b843c749SSergey Zigachev 503*b843c749SSergey Zigachev union surface_update_flags update_flags; 504*b843c749SSergey Zigachev /* private to DC core */ 505*b843c749SSergey Zigachev struct dc_plane_status status; 506*b843c749SSergey Zigachev struct dc_context *ctx; 507*b843c749SSergey Zigachev 508*b843c749SSergey Zigachev /* HACK: Workaround for forcing full reprogramming under some conditions */ 509*b843c749SSergey Zigachev bool force_full_update; 510*b843c749SSergey Zigachev 511*b843c749SSergey Zigachev /* private to dc_surface.c */ 512*b843c749SSergey Zigachev enum dc_irq_source irq_source; 513*b843c749SSergey Zigachev struct kref refcount; 514*b843c749SSergey Zigachev }; 515*b843c749SSergey Zigachev 516*b843c749SSergey Zigachev struct dc_plane_info { 517*b843c749SSergey Zigachev union plane_size plane_size; 518*b843c749SSergey Zigachev union dc_tiling_info tiling_info; 519*b843c749SSergey Zigachev struct dc_plane_dcc_param dcc; 520*b843c749SSergey Zigachev enum surface_pixel_format format; 521*b843c749SSergey Zigachev enum dc_rotation_angle rotation; 522*b843c749SSergey Zigachev enum plane_stereo_format stereo_format; 523*b843c749SSergey Zigachev enum dc_color_space color_space; 524*b843c749SSergey Zigachev unsigned int sdr_white_level; 525*b843c749SSergey Zigachev bool horizontal_mirror; 526*b843c749SSergey Zigachev bool visible; 527*b843c749SSergey Zigachev bool per_pixel_alpha; 528*b843c749SSergey Zigachev bool input_csc_enabled; 529*b843c749SSergey Zigachev }; 530*b843c749SSergey Zigachev 531*b843c749SSergey Zigachev struct dc_scaling_info { 532*b843c749SSergey Zigachev struct rect src_rect; 533*b843c749SSergey Zigachev struct rect dst_rect; 534*b843c749SSergey Zigachev struct rect clip_rect; 535*b843c749SSergey Zigachev struct scaling_taps scaling_quality; 536*b843c749SSergey Zigachev }; 537*b843c749SSergey Zigachev 538*b843c749SSergey Zigachev struct dc_surface_update { 539*b843c749SSergey Zigachev struct dc_plane_state *surface; 540*b843c749SSergey Zigachev 541*b843c749SSergey Zigachev /* isr safe update parameters. null means no updates */ 542*b843c749SSergey Zigachev const struct dc_flip_addrs *flip_addr; 543*b843c749SSergey Zigachev const struct dc_plane_info *plane_info; 544*b843c749SSergey Zigachev const struct dc_scaling_info *scaling_info; 545*b843c749SSergey Zigachev 546*b843c749SSergey Zigachev /* following updates require alloc/sleep/spin that is not isr safe, 547*b843c749SSergey Zigachev * null means no updates 548*b843c749SSergey Zigachev */ 549*b843c749SSergey Zigachev const struct dc_gamma *gamma; 550*b843c749SSergey Zigachev const struct dc_transfer_func *in_transfer_func; 551*b843c749SSergey Zigachev 552*b843c749SSergey Zigachev const struct dc_csc_transform *input_csc_color_matrix; 553*b843c749SSergey Zigachev const struct fixed31_32 *coeff_reduction_factor; 554*b843c749SSergey Zigachev }; 555*b843c749SSergey Zigachev 556*b843c749SSergey Zigachev /* 557*b843c749SSergey Zigachev * Create a new surface with default parameters; 558*b843c749SSergey Zigachev */ 559*b843c749SSergey Zigachev struct dc_plane_state *dc_create_plane_state(struct dc *dc); 560*b843c749SSergey Zigachev const struct dc_plane_status *dc_plane_get_status( 561*b843c749SSergey Zigachev const struct dc_plane_state *plane_state); 562*b843c749SSergey Zigachev 563*b843c749SSergey Zigachev void dc_plane_state_retain(struct dc_plane_state *plane_state); 564*b843c749SSergey Zigachev void dc_plane_state_release(struct dc_plane_state *plane_state); 565*b843c749SSergey Zigachev 566*b843c749SSergey Zigachev void dc_gamma_retain(struct dc_gamma *dc_gamma); 567*b843c749SSergey Zigachev void dc_gamma_release(struct dc_gamma **dc_gamma); 568*b843c749SSergey Zigachev struct dc_gamma *dc_create_gamma(void); 569*b843c749SSergey Zigachev 570*b843c749SSergey Zigachev void dc_transfer_func_retain(struct dc_transfer_func *dc_tf); 571*b843c749SSergey Zigachev void dc_transfer_func_release(struct dc_transfer_func *dc_tf); 572*b843c749SSergey Zigachev struct dc_transfer_func *dc_create_transfer_func(void); 573*b843c749SSergey Zigachev 574*b843c749SSergey Zigachev /* 575*b843c749SSergey Zigachev * This structure holds a surface address. There could be multiple addresses 576*b843c749SSergey Zigachev * in cases such as Stereo 3D, Planar YUV, etc. Other per-flip attributes such 577*b843c749SSergey Zigachev * as frame durations and DCC format can also be set. 578*b843c749SSergey Zigachev */ 579*b843c749SSergey Zigachev struct dc_flip_addrs { 580*b843c749SSergey Zigachev struct dc_plane_address address; 581*b843c749SSergey Zigachev unsigned int flip_timestamp_in_us; 582*b843c749SSergey Zigachev bool flip_immediate; 583*b843c749SSergey Zigachev /* TODO: add flip duration for FreeSync */ 584*b843c749SSergey Zigachev }; 585*b843c749SSergey Zigachev 586*b843c749SSergey Zigachev bool dc_post_update_surfaces_to_stream( 587*b843c749SSergey Zigachev struct dc *dc); 588*b843c749SSergey Zigachev 589*b843c749SSergey Zigachev #include "dc_stream.h" 590*b843c749SSergey Zigachev 591*b843c749SSergey Zigachev /* 592*b843c749SSergey Zigachev * Structure to store surface/stream associations for validation 593*b843c749SSergey Zigachev */ 594*b843c749SSergey Zigachev struct dc_validation_set { 595*b843c749SSergey Zigachev struct dc_stream_state *stream; 596*b843c749SSergey Zigachev struct dc_plane_state *plane_states[MAX_SURFACES]; 597*b843c749SSergey Zigachev uint8_t plane_count; 598*b843c749SSergey Zigachev }; 599*b843c749SSergey Zigachev 600*b843c749SSergey Zigachev enum dc_status dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state); 601*b843c749SSergey Zigachev 602*b843c749SSergey Zigachev enum dc_status dc_validate_global_state( 603*b843c749SSergey Zigachev struct dc *dc, 604*b843c749SSergey Zigachev struct dc_state *new_ctx); 605*b843c749SSergey Zigachev 606*b843c749SSergey Zigachev 607*b843c749SSergey Zigachev void dc_resource_state_construct( 608*b843c749SSergey Zigachev const struct dc *dc, 609*b843c749SSergey Zigachev struct dc_state *dst_ctx); 610*b843c749SSergey Zigachev 611*b843c749SSergey Zigachev void dc_resource_state_copy_construct( 612*b843c749SSergey Zigachev const struct dc_state *src_ctx, 613*b843c749SSergey Zigachev struct dc_state *dst_ctx); 614*b843c749SSergey Zigachev 615*b843c749SSergey Zigachev void dc_resource_state_copy_construct_current( 616*b843c749SSergey Zigachev const struct dc *dc, 617*b843c749SSergey Zigachev struct dc_state *dst_ctx); 618*b843c749SSergey Zigachev 619*b843c749SSergey Zigachev void dc_resource_state_destruct(struct dc_state *context); 620*b843c749SSergey Zigachev 621*b843c749SSergey Zigachev /* 622*b843c749SSergey Zigachev * TODO update to make it about validation sets 623*b843c749SSergey Zigachev * Set up streams and links associated to drive sinks 624*b843c749SSergey Zigachev * The streams parameter is an absolute set of all active streams. 625*b843c749SSergey Zigachev * 626*b843c749SSergey Zigachev * After this call: 627*b843c749SSergey Zigachev * Phy, Encoder, Timing Generator are programmed and enabled. 628*b843c749SSergey Zigachev * New streams are enabled with blank stream; no memory read. 629*b843c749SSergey Zigachev */ 630*b843c749SSergey Zigachev bool dc_commit_state(struct dc *dc, struct dc_state *context); 631*b843c749SSergey Zigachev 632*b843c749SSergey Zigachev 633*b843c749SSergey Zigachev struct dc_state *dc_create_state(void); 634*b843c749SSergey Zigachev void dc_retain_state(struct dc_state *context); 635*b843c749SSergey Zigachev void dc_release_state(struct dc_state *context); 636*b843c749SSergey Zigachev 637*b843c749SSergey Zigachev /******************************************************************************* 638*b843c749SSergey Zigachev * Link Interfaces 639*b843c749SSergey Zigachev ******************************************************************************/ 640*b843c749SSergey Zigachev 641*b843c749SSergey Zigachev struct dpcd_caps { 642*b843c749SSergey Zigachev union dpcd_rev dpcd_rev; 643*b843c749SSergey Zigachev union max_lane_count max_ln_count; 644*b843c749SSergey Zigachev union max_down_spread max_down_spread; 645*b843c749SSergey Zigachev 646*b843c749SSergey Zigachev /* dongle type (DP converter, CV smart dongle) */ 647*b843c749SSergey Zigachev enum display_dongle_type dongle_type; 648*b843c749SSergey Zigachev /* Dongle's downstream count. */ 649*b843c749SSergey Zigachev union sink_count sink_count; 650*b843c749SSergey Zigachev /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER, 651*b843c749SSergey Zigachev indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/ 652*b843c749SSergey Zigachev struct dc_dongle_caps dongle_caps; 653*b843c749SSergey Zigachev 654*b843c749SSergey Zigachev uint32_t sink_dev_id; 655*b843c749SSergey Zigachev int8_t sink_dev_id_str[6]; 656*b843c749SSergey Zigachev int8_t sink_hw_revision; 657*b843c749SSergey Zigachev int8_t sink_fw_revision[2]; 658*b843c749SSergey Zigachev 659*b843c749SSergey Zigachev uint32_t branch_dev_id; 660*b843c749SSergey Zigachev int8_t branch_dev_name[6]; 661*b843c749SSergey Zigachev int8_t branch_hw_revision; 662*b843c749SSergey Zigachev int8_t branch_fw_revision[2]; 663*b843c749SSergey Zigachev 664*b843c749SSergey Zigachev bool allow_invalid_MSA_timing_param; 665*b843c749SSergey Zigachev bool panel_mode_edp; 666*b843c749SSergey Zigachev bool dpcd_display_control_capable; 667*b843c749SSergey Zigachev }; 668*b843c749SSergey Zigachev 669*b843c749SSergey Zigachev #include "dc_link.h" 670*b843c749SSergey Zigachev 671*b843c749SSergey Zigachev /******************************************************************************* 672*b843c749SSergey Zigachev * Sink Interfaces - A sink corresponds to a display output device 673*b843c749SSergey Zigachev ******************************************************************************/ 674*b843c749SSergey Zigachev 675*b843c749SSergey Zigachev struct dc_container_id { 676*b843c749SSergey Zigachev // 128bit GUID in binary form 677*b843c749SSergey Zigachev unsigned char guid[16]; 678*b843c749SSergey Zigachev // 8 byte port ID -> ELD.PortID 679*b843c749SSergey Zigachev unsigned int portId[2]; 680*b843c749SSergey Zigachev // 128bit GUID in binary formufacturer name -> ELD.ManufacturerName 681*b843c749SSergey Zigachev unsigned short manufacturerName; 682*b843c749SSergey Zigachev // 2 byte product code -> ELD.ProductCode 683*b843c749SSergey Zigachev unsigned short productCode; 684*b843c749SSergey Zigachev }; 685*b843c749SSergey Zigachev 686*b843c749SSergey Zigachev 687*b843c749SSergey Zigachev 688*b843c749SSergey Zigachev /* 689*b843c749SSergey Zigachev * The sink structure contains EDID and other display device properties 690*b843c749SSergey Zigachev */ 691*b843c749SSergey Zigachev struct dc_sink { 692*b843c749SSergey Zigachev enum signal_type sink_signal; 693*b843c749SSergey Zigachev struct dc_edid dc_edid; /* raw edid */ 694*b843c749SSergey Zigachev struct dc_edid_caps edid_caps; /* parse display caps */ 695*b843c749SSergey Zigachev struct dc_container_id *dc_container_id; 696*b843c749SSergey Zigachev uint32_t dongle_max_pix_clk; 697*b843c749SSergey Zigachev void *priv; 698*b843c749SSergey Zigachev struct stereo_3d_features features_3d[TIMING_3D_FORMAT_MAX]; 699*b843c749SSergey Zigachev bool converter_disable_audio; 700*b843c749SSergey Zigachev 701*b843c749SSergey Zigachev /* private to DC core */ 702*b843c749SSergey Zigachev struct dc_link *link; 703*b843c749SSergey Zigachev struct dc_context *ctx; 704*b843c749SSergey Zigachev 705*b843c749SSergey Zigachev uint32_t sink_id; 706*b843c749SSergey Zigachev 707*b843c749SSergey Zigachev /* private to dc_sink.c */ 708*b843c749SSergey Zigachev // refcount must be the last member in dc_sink, since we want the 709*b843c749SSergey Zigachev // sink structure to be logically cloneable up to (but not including) 710*b843c749SSergey Zigachev // refcount 711*b843c749SSergey Zigachev struct kref refcount; 712*b843c749SSergey Zigachev }; 713*b843c749SSergey Zigachev 714*b843c749SSergey Zigachev void dc_sink_retain(struct dc_sink *sink); 715*b843c749SSergey Zigachev void dc_sink_release(struct dc_sink *sink); 716*b843c749SSergey Zigachev 717*b843c749SSergey Zigachev struct dc_sink_init_data { 718*b843c749SSergey Zigachev enum signal_type sink_signal; 719*b843c749SSergey Zigachev struct dc_link *link; 720*b843c749SSergey Zigachev uint32_t dongle_max_pix_clk; 721*b843c749SSergey Zigachev bool converter_disable_audio; 722*b843c749SSergey Zigachev }; 723*b843c749SSergey Zigachev 724*b843c749SSergey Zigachev struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params); 725*b843c749SSergey Zigachev 726*b843c749SSergey Zigachev /* Newer interfaces */ 727*b843c749SSergey Zigachev struct dc_cursor { 728*b843c749SSergey Zigachev struct dc_plane_address address; 729*b843c749SSergey Zigachev struct dc_cursor_attributes attributes; 730*b843c749SSergey Zigachev }; 731*b843c749SSergey Zigachev 732*b843c749SSergey Zigachev 733*b843c749SSergey Zigachev /******************************************************************************* 734*b843c749SSergey Zigachev * Interrupt interfaces 735*b843c749SSergey Zigachev ******************************************************************************/ 736*b843c749SSergey Zigachev enum dc_irq_source dc_interrupt_to_irq_source( 737*b843c749SSergey Zigachev struct dc *dc, 738*b843c749SSergey Zigachev uint32_t src_id, 739*b843c749SSergey Zigachev uint32_t ext_id); 740*b843c749SSergey Zigachev bool dc_interrupt_set(struct dc *dc, enum dc_irq_source src, bool enable); 741*b843c749SSergey Zigachev void dc_interrupt_ack(struct dc *dc, enum dc_irq_source src); 742*b843c749SSergey Zigachev enum dc_irq_source dc_get_hpd_irq_source_at_index( 743*b843c749SSergey Zigachev struct dc *dc, uint32_t link_index); 744*b843c749SSergey Zigachev 745*b843c749SSergey Zigachev /******************************************************************************* 746*b843c749SSergey Zigachev * Power Interfaces 747*b843c749SSergey Zigachev ******************************************************************************/ 748*b843c749SSergey Zigachev 749*b843c749SSergey Zigachev void dc_set_power_state( 750*b843c749SSergey Zigachev struct dc *dc, 751*b843c749SSergey Zigachev enum dc_acpi_cm_power_state power_state); 752*b843c749SSergey Zigachev void dc_resume(struct dc *dc); 753*b843c749SSergey Zigachev 754*b843c749SSergey Zigachev #endif /* DC_INTERFACE_H_ */ 755