dc.h 18 KB

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