dc.h 19 KB

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