dc.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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.20"
  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. /* FBC compressor */
  218. #if defined(CONFIG_DRM_AMD_DC_FBC)
  219. struct compressor *fbc_compressor;
  220. #endif
  221. };
  222. enum frame_buffer_mode {
  223. FRAME_BUFFER_MODE_LOCAL_ONLY = 0,
  224. FRAME_BUFFER_MODE_ZFB_ONLY,
  225. FRAME_BUFFER_MODE_MIXED_ZFB_AND_LOCAL,
  226. } ;
  227. struct dchub_init_data {
  228. int64_t zfb_phys_addr_base;
  229. int64_t zfb_mc_base_addr;
  230. uint64_t zfb_size_in_byte;
  231. enum frame_buffer_mode fb_mode;
  232. bool dchub_initialzied;
  233. bool dchub_info_valid;
  234. };
  235. struct dc_init_data {
  236. struct hw_asic_id asic_id;
  237. void *driver; /* ctx */
  238. struct cgs_device *cgs_device;
  239. int num_virtual_links;
  240. /*
  241. * If 'vbios_override' not NULL, it will be called instead
  242. * of the real VBIOS. Intended use is Diagnostics on FPGA.
  243. */
  244. struct dc_bios *vbios_override;
  245. enum dce_environment dce_environment;
  246. struct dc_config flags;
  247. uint32_t log_mask;
  248. #if defined(CONFIG_DRM_AMD_DC_FBC)
  249. uint64_t fbc_gpu_addr;
  250. #endif
  251. };
  252. struct dc *dc_create(const struct dc_init_data *init_params);
  253. void dc_destroy(struct dc **dc);
  254. /*******************************************************************************
  255. * Surface Interfaces
  256. ******************************************************************************/
  257. enum {
  258. TRANSFER_FUNC_POINTS = 1025
  259. };
  260. // Moved here from color module for linux
  261. enum color_transfer_func {
  262. transfer_func_unknown,
  263. transfer_func_srgb,
  264. transfer_func_bt709,
  265. transfer_func_pq2084,
  266. transfer_func_pq2084_interim,
  267. transfer_func_linear_0_1,
  268. transfer_func_linear_0_125,
  269. transfer_func_dolbyvision,
  270. transfer_func_gamma_22,
  271. transfer_func_gamma_26
  272. };
  273. struct dc_hdr_static_metadata {
  274. /* display chromaticities and white point in units of 0.00001 */
  275. unsigned int chromaticity_green_x;
  276. unsigned int chromaticity_green_y;
  277. unsigned int chromaticity_blue_x;
  278. unsigned int chromaticity_blue_y;
  279. unsigned int chromaticity_red_x;
  280. unsigned int chromaticity_red_y;
  281. unsigned int chromaticity_white_point_x;
  282. unsigned int chromaticity_white_point_y;
  283. uint32_t min_luminance;
  284. uint32_t max_luminance;
  285. uint32_t maximum_content_light_level;
  286. uint32_t maximum_frame_average_light_level;
  287. bool hdr_supported;
  288. bool is_hdr;
  289. };
  290. enum dc_transfer_func_type {
  291. TF_TYPE_PREDEFINED,
  292. TF_TYPE_DISTRIBUTED_POINTS,
  293. TF_TYPE_BYPASS
  294. };
  295. struct dc_transfer_func_distributed_points {
  296. struct fixed31_32 red[TRANSFER_FUNC_POINTS];
  297. struct fixed31_32 green[TRANSFER_FUNC_POINTS];
  298. struct fixed31_32 blue[TRANSFER_FUNC_POINTS];
  299. uint16_t end_exponent;
  300. uint16_t x_point_at_y1_red;
  301. uint16_t x_point_at_y1_green;
  302. uint16_t x_point_at_y1_blue;
  303. };
  304. enum dc_transfer_func_predefined {
  305. TRANSFER_FUNCTION_SRGB,
  306. TRANSFER_FUNCTION_BT709,
  307. TRANSFER_FUNCTION_PQ,
  308. TRANSFER_FUNCTION_LINEAR,
  309. };
  310. struct dc_transfer_func {
  311. struct kref refcount;
  312. struct dc_transfer_func_distributed_points tf_pts;
  313. enum dc_transfer_func_type type;
  314. enum dc_transfer_func_predefined tf;
  315. struct dc_context *ctx;
  316. };
  317. /*
  318. * This structure is filled in by dc_surface_get_status and contains
  319. * the last requested address and the currently active address so the called
  320. * can determine if there are any outstanding flips
  321. */
  322. struct dc_plane_status {
  323. struct dc_plane_address requested_address;
  324. struct dc_plane_address current_address;
  325. bool is_flip_pending;
  326. bool is_right_eye;
  327. };
  328. union surface_update_flags {
  329. struct {
  330. /* Medium updates */
  331. uint32_t color_space_change:1;
  332. uint32_t input_tf_change:1;
  333. uint32_t horizontal_mirror_change:1;
  334. uint32_t per_pixel_alpha_change:1;
  335. uint32_t rotation_change:1;
  336. uint32_t swizzle_change:1;
  337. uint32_t scaling_change:1;
  338. uint32_t position_change:1;
  339. uint32_t in_transfer_func:1;
  340. uint32_t input_csc_change:1;
  341. /* Full updates */
  342. uint32_t new_plane:1;
  343. uint32_t bpp_change:1;
  344. uint32_t bandwidth_change:1;
  345. uint32_t clock_change:1;
  346. uint32_t stereo_format_change:1;
  347. uint32_t full_update:1;
  348. } bits;
  349. uint32_t raw;
  350. };
  351. struct dc_plane_state {
  352. struct dc_plane_address address;
  353. struct scaling_taps scaling_quality;
  354. struct rect src_rect;
  355. struct rect dst_rect;
  356. struct rect clip_rect;
  357. union plane_size plane_size;
  358. union dc_tiling_info tiling_info;
  359. struct dc_plane_dcc_param dcc;
  360. struct dc_gamma *gamma_correction;
  361. struct dc_transfer_func *in_transfer_func;
  362. struct dc_bias_and_scale *bias_and_scale;
  363. struct csc_transform input_csc_color_matrix;
  364. struct fixed31_32 coeff_reduction_factor;
  365. // TODO: No longer used, remove
  366. struct dc_hdr_static_metadata hdr_static_ctx;
  367. enum dc_color_space color_space;
  368. enum color_transfer_func input_tf;
  369. enum surface_pixel_format format;
  370. enum dc_rotation_angle rotation;
  371. enum plane_stereo_format stereo_format;
  372. bool per_pixel_alpha;
  373. bool visible;
  374. bool flip_immediate;
  375. bool horizontal_mirror;
  376. union surface_update_flags update_flags;
  377. /* private to DC core */
  378. struct dc_plane_status status;
  379. struct dc_context *ctx;
  380. /* private to dc_surface.c */
  381. enum dc_irq_source irq_source;
  382. struct kref refcount;
  383. };
  384. struct dc_plane_info {
  385. union plane_size plane_size;
  386. union dc_tiling_info tiling_info;
  387. struct dc_plane_dcc_param dcc;
  388. enum surface_pixel_format format;
  389. enum dc_rotation_angle rotation;
  390. enum plane_stereo_format stereo_format;
  391. enum dc_color_space color_space;
  392. enum color_transfer_func input_tf;
  393. bool horizontal_mirror;
  394. bool visible;
  395. bool per_pixel_alpha;
  396. bool input_csc_enabled;
  397. };
  398. struct dc_scaling_info {
  399. struct rect src_rect;
  400. struct rect dst_rect;
  401. struct rect clip_rect;
  402. struct scaling_taps scaling_quality;
  403. };
  404. struct dc_surface_update {
  405. struct dc_plane_state *surface;
  406. /* isr safe update parameters. null means no updates */
  407. struct dc_flip_addrs *flip_addr;
  408. struct dc_plane_info *plane_info;
  409. struct dc_scaling_info *scaling_info;
  410. /* following updates require alloc/sleep/spin that is not isr safe,
  411. * null means no updates
  412. */
  413. /* gamma TO BE REMOVED */
  414. struct dc_gamma *gamma;
  415. enum color_transfer_func color_input_tf;
  416. enum color_transfer_func color_output_tf;
  417. struct dc_transfer_func *in_transfer_func;
  418. struct csc_transform *input_csc_color_matrix;
  419. struct fixed31_32 *coeff_reduction_factor;
  420. };
  421. /*
  422. * Create a new surface with default parameters;
  423. */
  424. struct dc_plane_state *dc_create_plane_state(struct dc *dc);
  425. const struct dc_plane_status *dc_plane_get_status(
  426. const struct dc_plane_state *plane_state);
  427. void dc_plane_state_retain(struct dc_plane_state *plane_state);
  428. void dc_plane_state_release(struct dc_plane_state *plane_state);
  429. void dc_gamma_retain(struct dc_gamma *dc_gamma);
  430. void dc_gamma_release(struct dc_gamma **dc_gamma);
  431. struct dc_gamma *dc_create_gamma(void);
  432. void dc_transfer_func_retain(struct dc_transfer_func *dc_tf);
  433. void dc_transfer_func_release(struct dc_transfer_func *dc_tf);
  434. struct dc_transfer_func *dc_create_transfer_func(void);
  435. /*
  436. * This structure holds a surface address. There could be multiple addresses
  437. * in cases such as Stereo 3D, Planar YUV, etc. Other per-flip attributes such
  438. * as frame durations and DCC format can also be set.
  439. */
  440. struct dc_flip_addrs {
  441. struct dc_plane_address address;
  442. bool flip_immediate;
  443. /* TODO: add flip duration for FreeSync */
  444. };
  445. bool dc_post_update_surfaces_to_stream(
  446. struct dc *dc);
  447. #include "dc_stream.h"
  448. /*
  449. * Structure to store surface/stream associations for validation
  450. */
  451. struct dc_validation_set {
  452. struct dc_stream_state *stream;
  453. struct dc_plane_state *plane_states[MAX_SURFACES];
  454. uint8_t plane_count;
  455. };
  456. enum dc_status dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);
  457. enum dc_status dc_validate_global_state(
  458. struct dc *dc,
  459. struct dc_state *new_ctx);
  460. void dc_resource_state_construct(
  461. const struct dc *dc,
  462. struct dc_state *dst_ctx);
  463. void dc_resource_state_copy_construct(
  464. const struct dc_state *src_ctx,
  465. struct dc_state *dst_ctx);
  466. void dc_resource_state_copy_construct_current(
  467. const struct dc *dc,
  468. struct dc_state *dst_ctx);
  469. void dc_resource_state_destruct(struct dc_state *context);
  470. /*
  471. * TODO update to make it about validation sets
  472. * Set up streams and links associated to drive sinks
  473. * The streams parameter is an absolute set of all active streams.
  474. *
  475. * After this call:
  476. * Phy, Encoder, Timing Generator are programmed and enabled.
  477. * New streams are enabled with blank stream; no memory read.
  478. */
  479. bool dc_commit_state(struct dc *dc, struct dc_state *context);
  480. struct dc_state *dc_create_state(void);
  481. void dc_retain_state(struct dc_state *context);
  482. void dc_release_state(struct dc_state *context);
  483. /*******************************************************************************
  484. * Link Interfaces
  485. ******************************************************************************/
  486. struct dpcd_caps {
  487. union dpcd_rev dpcd_rev;
  488. union max_lane_count max_ln_count;
  489. union max_down_spread max_down_spread;
  490. /* dongle type (DP converter, CV smart dongle) */
  491. enum display_dongle_type dongle_type;
  492. /* Dongle's downstream count. */
  493. union sink_count sink_count;
  494. /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER,
  495. indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/
  496. struct dc_dongle_caps dongle_caps;
  497. uint32_t sink_dev_id;
  498. uint32_t branch_dev_id;
  499. int8_t branch_dev_name[6];
  500. int8_t branch_hw_revision;
  501. bool allow_invalid_MSA_timing_param;
  502. bool panel_mode_edp;
  503. bool dpcd_display_control_capable;
  504. };
  505. #include "dc_link.h"
  506. /*******************************************************************************
  507. * Sink Interfaces - A sink corresponds to a display output device
  508. ******************************************************************************/
  509. struct dc_container_id {
  510. // 128bit GUID in binary form
  511. unsigned char guid[16];
  512. // 8 byte port ID -> ELD.PortID
  513. unsigned int portId[2];
  514. // 128bit GUID in binary formufacturer name -> ELD.ManufacturerName
  515. unsigned short manufacturerName;
  516. // 2 byte product code -> ELD.ProductCode
  517. unsigned short productCode;
  518. };
  519. /*
  520. * The sink structure contains EDID and other display device properties
  521. */
  522. struct dc_sink {
  523. enum signal_type sink_signal;
  524. struct dc_edid dc_edid; /* raw edid */
  525. struct dc_edid_caps edid_caps; /* parse display caps */
  526. struct dc_container_id *dc_container_id;
  527. uint32_t dongle_max_pix_clk;
  528. void *priv;
  529. struct stereo_3d_features features_3d[TIMING_3D_FORMAT_MAX];
  530. bool converter_disable_audio;
  531. /* private to DC core */
  532. struct dc_link *link;
  533. struct dc_context *ctx;
  534. /* private to dc_sink.c */
  535. struct kref refcount;
  536. };
  537. void dc_sink_retain(struct dc_sink *sink);
  538. void dc_sink_release(struct dc_sink *sink);
  539. struct dc_sink_init_data {
  540. enum signal_type sink_signal;
  541. struct dc_link *link;
  542. uint32_t dongle_max_pix_clk;
  543. bool converter_disable_audio;
  544. };
  545. struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params);
  546. /* Newer interfaces */
  547. struct dc_cursor {
  548. struct dc_plane_address address;
  549. struct dc_cursor_attributes attributes;
  550. };
  551. /*******************************************************************************
  552. * Interrupt interfaces
  553. ******************************************************************************/
  554. enum dc_irq_source dc_interrupt_to_irq_source(
  555. struct dc *dc,
  556. uint32_t src_id,
  557. uint32_t ext_id);
  558. void dc_interrupt_set(struct dc *dc, enum dc_irq_source src, bool enable);
  559. void dc_interrupt_ack(struct dc *dc, enum dc_irq_source src);
  560. enum dc_irq_source dc_get_hpd_irq_source_at_index(
  561. struct dc *dc, uint32_t link_index);
  562. /*******************************************************************************
  563. * Power Interfaces
  564. ******************************************************************************/
  565. void dc_set_power_state(
  566. struct dc *dc,
  567. enum dc_acpi_cm_power_state power_state);
  568. void dc_resume(struct dc *dc);
  569. #endif /* DC_INTERFACE_H_ */