dc.h 19 KB

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