Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: merge dc_link.h into dc.h and dc_types.h

[why]
Remove the need to include dc_link.h separately. dc.h should contain
everything needed on DM side.

[How]
Merge dc_link.h into dc.h and dc_types.h so DM only needs to include
dc.h to use all link public functions.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Wenjing Liu and committed by
Alex Deucher
7ae1dbe6 1099238b

+978 -288
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 2273 2273 struct dc_link *edp_links[MAX_NUM_EDP]; 2274 2274 int edp_num; 2275 2275 2276 - get_edp_links(adev->dm.dc, edp_links, &edp_num); 2276 + dc_get_edp_links(adev->dm.dc, edp_links, &edp_num); 2277 2277 for (i = 0; i < edp_num; i++) { 2278 2278 if (!dmub_init_abm_config(adev->dm.dc->res_pool, params, i)) 2279 2279 return -EINVAL;
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
··· 724 724 for (i = 0; i < (unsigned int)(link_training_settings.link_settings.lane_count); i++) 725 725 link_training_settings.hw_lane_settings[i] = link->cur_lane_setting[i]; 726 726 727 - dc_link_set_test_pattern( 727 + dc_link_dp_set_test_pattern( 728 728 link, 729 729 test_pattern, 730 730 DP_TEST_PATTERN_COLOR_SPACE_RGB,
+2 -2
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
··· 104 104 int edp_num; 105 105 unsigned int panel_inst; 106 106 107 - get_edp_links(dc, edp_links, &edp_num); 107 + dc_get_edp_links(dc, edp_links, &edp_num); 108 108 if (dc->hwss.exit_optimized_pwr_state) 109 109 dc->hwss.exit_optimized_pwr_state(dc, dc->current_state); 110 110 ··· 129 129 int edp_num; 130 130 unsigned int panel_inst; 131 131 132 - get_edp_links(dc, edp_links, &edp_num); 132 + dc_get_edp_links(dc, edp_links, &edp_num); 133 133 if (edp_num) { 134 134 for (panel_inst = 0; panel_inst < edp_num; panel_inst++) { 135 135 edp_link = edp_links[panel_inst];
+2 -154
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 53 53 #include "link_encoder.h" 54 54 #include "link_enc_cfg.h" 55 55 56 - #include "dc_link.h" 57 56 #include "link.h" 58 57 #include "dm_helpers.h" 59 58 #include "mem_input.h" ··· 1297 1298 int i; 1298 1299 int edp_num; 1299 1300 1300 - get_edp_links(dc, edp_links, &edp_num); 1301 + dc_get_edp_links(dc, edp_links, &edp_num); 1301 1302 if (!edp_num) 1302 1303 return; 1303 1304 ··· 4316 4317 return false; 4317 4318 } 4318 4319 4319 - bool dc_is_oem_i2c_device_present( 4320 - struct dc *dc, 4321 - size_t slave_address) 4322 - { 4323 - if (dc->res_pool->oem_device) 4324 - return dce_i2c_oem_device_present( 4325 - dc->res_pool, 4326 - dc->res_pool->oem_device, 4327 - slave_address); 4328 - 4329 - return false; 4330 - } 4331 - 4332 - bool dc_submit_i2c( 4333 - struct dc *dc, 4334 - uint32_t link_index, 4335 - struct i2c_command *cmd) 4336 - { 4337 - 4338 - struct dc_link *link = dc->links[link_index]; 4339 - struct ddc_service *ddc = link->ddc; 4340 - return dce_i2c_submit_command( 4341 - dc->res_pool, 4342 - ddc->ddc_pin, 4343 - cmd); 4344 - } 4345 - 4346 - bool dc_submit_i2c_oem( 4347 - struct dc *dc, 4348 - struct i2c_command *cmd) 4349 - { 4350 - struct ddc_service *ddc = dc->res_pool->oem_device; 4351 - if (ddc) 4352 - return dce_i2c_submit_command( 4353 - dc->res_pool, 4354 - ddc->ddc_pin, 4355 - cmd); 4356 - 4357 - return false; 4358 - } 4359 - 4360 - static bool link_add_remote_sink_helper(struct dc_link *dc_link, struct dc_sink *sink) 4361 - { 4362 - if (dc_link->sink_count >= MAX_SINKS_PER_LINK) { 4363 - BREAK_TO_DEBUGGER(); 4364 - return false; 4365 - } 4366 - 4367 - dc_sink_retain(sink); 4368 - 4369 - dc_link->remote_sinks[dc_link->sink_count] = sink; 4370 - dc_link->sink_count++; 4371 - 4372 - return true; 4373 - } 4374 - 4375 - /* 4376 - * dc_link_add_remote_sink() - Create a sink and attach it to an existing link 4377 - * 4378 - * EDID length is in bytes 4379 - */ 4380 - struct dc_sink *dc_link_add_remote_sink( 4381 - struct dc_link *link, 4382 - const uint8_t *edid, 4383 - int len, 4384 - struct dc_sink_init_data *init_data) 4385 - { 4386 - struct dc_sink *dc_sink; 4387 - enum dc_edid_status edid_status; 4388 - 4389 - if (len > DC_MAX_EDID_BUFFER_SIZE) { 4390 - dm_error("Max EDID buffer size breached!\n"); 4391 - return NULL; 4392 - } 4393 - 4394 - if (!init_data) { 4395 - BREAK_TO_DEBUGGER(); 4396 - return NULL; 4397 - } 4398 - 4399 - if (!init_data->link) { 4400 - BREAK_TO_DEBUGGER(); 4401 - return NULL; 4402 - } 4403 - 4404 - dc_sink = dc_sink_create(init_data); 4405 - 4406 - if (!dc_sink) 4407 - return NULL; 4408 - 4409 - memmove(dc_sink->dc_edid.raw_edid, edid, len); 4410 - dc_sink->dc_edid.length = len; 4411 - 4412 - if (!link_add_remote_sink_helper( 4413 - link, 4414 - dc_sink)) 4415 - goto fail_add_sink; 4416 - 4417 - edid_status = dm_helpers_parse_edid_caps( 4418 - link, 4419 - &dc_sink->dc_edid, 4420 - &dc_sink->edid_caps); 4421 - 4422 - /* 4423 - * Treat device as no EDID device if EDID 4424 - * parsing fails 4425 - */ 4426 - if (edid_status != EDID_OK && edid_status != EDID_PARTIAL_VALID) { 4427 - dc_sink->dc_edid.length = 0; 4428 - dm_error("Bad EDID, status%d!\n", edid_status); 4429 - } 4430 - 4431 - return dc_sink; 4432 - 4433 - fail_add_sink: 4434 - dc_sink_release(dc_sink); 4435 - return NULL; 4436 - } 4437 - 4438 - /* 4439 - * dc_link_remove_remote_sink() - Remove a remote sink from a dc_link 4440 - * 4441 - * Note that this just removes the struct dc_sink - it doesn't 4442 - * program hardware or alter other members of dc_link 4443 - */ 4444 - void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink) 4445 - { 4446 - int i; 4447 - 4448 - if (!link->sink_count) { 4449 - BREAK_TO_DEBUGGER(); 4450 - return; 4451 - } 4452 - 4453 - for (i = 0; i < link->sink_count; i++) { 4454 - if (link->remote_sinks[i] == sink) { 4455 - dc_sink_release(sink); 4456 - link->remote_sinks[i] = NULL; 4457 - 4458 - /* shrink array to remove empty place */ 4459 - while (i < link->sink_count - 1) { 4460 - link->remote_sinks[i] = link->remote_sinks[i+1]; 4461 - i++; 4462 - } 4463 - link->remote_sinks[i] = NULL; 4464 - link->sink_count--; 4465 - return; 4466 - } 4467 - } 4468 - } 4469 - 4470 4320 void get_clock_requirements_for_state(struct dc_state *state, struct AsicStateEx *info) 4471 4321 { 4472 4322 info->displayClock = (unsigned int)state->bw_ctx.bw.dcn.clk.dispclk_khz; ··· 4838 4990 return; 4839 4991 } 4840 4992 4841 - get_edp_links(dc, edp_links, &edp_num); 4993 + dc_get_edp_links(dc, edp_links, &edp_num); 4842 4994 4843 4995 /* Determine panel inst */ 4844 4996 for (i = 0; i < edp_num; i++) {
+551 -2
drivers/gpu/drm/amd/display/dc/dc.h
··· 1380 1380 uint32_t dc_get_opp_for_plane(struct dc *dc, struct dc_plane_state *plane); 1381 1381 1382 1382 /* Link Interfaces */ 1383 - /* TODO: remove this after resolving external dependencies */ 1384 - #include "dc_link.h" 1383 + /* 1384 + * A link contains one or more sinks and their connected status. 1385 + * The currently active signal type (HDMI, DP-SST, DP-MST) is also reported. 1386 + */ 1387 + struct dc_link { 1388 + struct dc_sink *remote_sinks[MAX_SINKS_PER_LINK]; 1389 + unsigned int sink_count; 1390 + struct dc_sink *local_sink; 1391 + unsigned int link_index; 1392 + enum dc_connection_type type; 1393 + enum signal_type connector_signal; 1394 + enum dc_irq_source irq_source_hpd; 1395 + enum dc_irq_source irq_source_hpd_rx;/* aka DP Short Pulse */ 1396 + 1397 + bool is_hpd_filter_disabled; 1398 + bool dp_ss_off; 1399 + 1400 + /** 1401 + * @link_state_valid: 1402 + * 1403 + * If there is no link and local sink, this variable should be set to 1404 + * false. Otherwise, it should be set to true; usually, the function 1405 + * core_link_enable_stream sets this field to true. 1406 + */ 1407 + bool link_state_valid; 1408 + bool aux_access_disabled; 1409 + bool sync_lt_in_progress; 1410 + bool skip_stream_reenable; 1411 + bool is_internal_display; 1412 + /** @todo Rename. Flag an endpoint as having a programmable mapping to a DIG encoder. */ 1413 + bool is_dig_mapping_flexible; 1414 + bool hpd_status; /* HPD status of link without physical HPD pin. */ 1415 + bool is_hpd_pending; /* Indicates a new received hpd */ 1416 + bool is_automated; /* Indicates automated testing */ 1417 + 1418 + bool edp_sink_present; 1419 + 1420 + struct dp_trace dp_trace; 1421 + 1422 + /* caps is the same as reported_link_cap. link_traing use 1423 + * reported_link_cap. Will clean up. TODO 1424 + */ 1425 + struct dc_link_settings reported_link_cap; 1426 + struct dc_link_settings verified_link_cap; 1427 + struct dc_link_settings cur_link_settings; 1428 + struct dc_lane_settings cur_lane_setting[LANE_COUNT_DP_MAX]; 1429 + struct dc_link_settings preferred_link_setting; 1430 + /* preferred_training_settings are override values that 1431 + * come from DM. DM is responsible for the memory 1432 + * management of the override pointers. 1433 + */ 1434 + struct dc_link_training_overrides preferred_training_settings; 1435 + struct dp_audio_test_data audio_test_data; 1436 + 1437 + uint8_t ddc_hw_inst; 1438 + 1439 + uint8_t hpd_src; 1440 + 1441 + uint8_t link_enc_hw_inst; 1442 + /* DIG link encoder ID. Used as index in link encoder resource pool. 1443 + * For links with fixed mapping to DIG, this is not changed after dc_link 1444 + * object creation. 1445 + */ 1446 + enum engine_id eng_id; 1447 + 1448 + bool test_pattern_enabled; 1449 + union compliance_test_state compliance_test_state; 1450 + 1451 + void *priv; 1452 + 1453 + struct ddc_service *ddc; 1454 + 1455 + bool aux_mode; 1456 + 1457 + /* Private to DC core */ 1458 + 1459 + const struct dc *dc; 1460 + 1461 + struct dc_context *ctx; 1462 + 1463 + struct panel_cntl *panel_cntl; 1464 + struct link_encoder *link_enc; 1465 + struct graphics_object_id link_id; 1466 + /* Endpoint type distinguishes display endpoints which do not have entries 1467 + * in the BIOS connector table from those that do. Helps when tracking link 1468 + * encoder to display endpoint assignments. 1469 + */ 1470 + enum display_endpoint_type ep_type; 1471 + union ddi_channel_mapping ddi_channel_mapping; 1472 + struct connector_device_tag_info device_tag; 1473 + struct dpcd_caps dpcd_caps; 1474 + uint32_t dongle_max_pix_clk; 1475 + unsigned short chip_caps; 1476 + unsigned int dpcd_sink_count; 1477 + #if defined(CONFIG_DRM_AMD_DC_HDCP) 1478 + struct hdcp_caps hdcp_caps; 1479 + #endif 1480 + enum edp_revision edp_revision; 1481 + union dpcd_sink_ext_caps dpcd_sink_ext_caps; 1482 + 1483 + struct psr_settings psr_settings; 1484 + 1485 + /* Drive settings read from integrated info table */ 1486 + struct dc_lane_settings bios_forced_drive_settings; 1487 + 1488 + /* Vendor specific LTTPR workaround variables */ 1489 + uint8_t vendor_specific_lttpr_link_rate_wa; 1490 + bool apply_vendor_specific_lttpr_link_rate_wa; 1491 + 1492 + /* MST record stream using this link */ 1493 + struct link_flags { 1494 + bool dp_keep_receiver_powered; 1495 + bool dp_skip_DID2; 1496 + bool dp_skip_reset_segment; 1497 + bool dp_skip_fs_144hz; 1498 + bool dp_mot_reset_segment; 1499 + /* Some USB4 docks do not handle turning off MST DSC once it has been enabled. */ 1500 + bool dpia_mst_dsc_always_on; 1501 + /* Forced DPIA into TBT3 compatibility mode. */ 1502 + bool dpia_forced_tbt3_mode; 1503 + bool dongle_mode_timing_override; 1504 + } wa_flags; 1505 + struct link_mst_stream_allocation_table mst_stream_alloc_table; 1506 + 1507 + struct dc_link_status link_status; 1508 + struct dprx_states dprx_states; 1509 + 1510 + struct gpio *hpd_gpio; 1511 + enum dc_link_fec_state fec_state; 1512 + bool link_powered_externally; // Used to bypass hardware sequencing delays when panel is powered down forcibly 1513 + 1514 + struct dc_panel_config panel_config; 1515 + struct phy_state phy_state; 1516 + // BW ALLOCATON USB4 ONLY 1517 + struct dc_dpia_bw_alloc dpia_bw_alloc_config; 1518 + }; 1519 + 1520 + /* Return an enumerated dc_link. 1521 + * dc_link order is constant and determined at 1522 + * boot time. They cannot be created or destroyed. 1523 + * Use dc_get_caps() to get number of links. 1524 + */ 1525 + struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index); 1526 + 1527 + /* Return instance id of the edp link. Inst 0 is primary edp link. */ 1528 + bool dc_get_edp_link_panel_inst(const struct dc *dc, 1529 + const struct dc_link *link, 1530 + unsigned int *inst_out); 1531 + 1532 + /* Return an array of link pointers to edp links. */ 1533 + void dc_get_edp_links(const struct dc *dc, 1534 + struct dc_link **edp_links, 1535 + int *edp_num); 1385 1536 1386 1537 /* The function initiates detection handshake over the given link. It first 1387 1538 * determines if there are display connections over the link. If so it initiates ··· 1556 1405 */ 1557 1406 bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason); 1558 1407 1408 + struct dc_sink_init_data; 1409 + 1410 + /* When link connection type is dc_connection_mst_branch, remote sink can be 1411 + * added to the link. The interface creates a remote sink and associates it with 1412 + * current link. The sink will be retained by link until remove remote sink is 1413 + * called. 1414 + * 1415 + * @dc_link - link the remote sink will be added to. 1416 + * @edid - byte array of EDID raw data. 1417 + * @len - size of the edid in byte 1418 + * @init_data - 1419 + */ 1420 + struct dc_sink *dc_link_add_remote_sink( 1421 + struct dc_link *dc_link, 1422 + const uint8_t *edid, 1423 + int len, 1424 + struct dc_sink_init_data *init_data); 1425 + 1426 + /* Remove remote sink from a link with dc_connection_mst_branch connection type. 1427 + * @link - link the sink should be removed from 1428 + * @sink - sink to be removed. 1429 + */ 1430 + void dc_link_remove_remote_sink( 1431 + struct dc_link *link, 1432 + struct dc_sink *sink); 1433 + 1434 + /* Enable HPD interrupt handler for a given link */ 1435 + void dc_link_enable_hpd(const struct dc_link *link); 1436 + 1437 + /* Disable HPD interrupt handler for a given link */ 1438 + void dc_link_disable_hpd(const struct dc_link *link); 1439 + 1559 1440 /* determine if there is a sink connected to the link 1560 1441 * 1561 1442 * @type - dc_connection_single if connected, dc_connection_none otherwise. ··· 1601 1418 bool dc_link_detect_connection_type(struct dc_link *link, 1602 1419 enum dc_connection_type *type); 1603 1420 1421 + /* query current hpd pin value 1422 + * return - true HPD is asserted (HPD high), false otherwise (HPD low) 1423 + * 1424 + */ 1425 + bool dc_link_get_hpd_state(struct dc_link *dc_link); 1426 + 1604 1427 /* Getter for cached link status from given link */ 1605 1428 const struct dc_link_status *dc_link_get_status(const struct dc_link *link); 1606 1429 1430 + /* enable/disable hardware HPD filter. 1431 + * 1432 + * @link - The link the HPD pin is associated with. 1433 + * @enable = true - enable hardware HPD filter. HPD event will only queued to irq 1434 + * handler once after no HPD change has been detected within dc default HPD 1435 + * filtering interval since last HPD event. i.e if display keeps toggling hpd 1436 + * pulses within default HPD interval, no HPD event will be received until HPD 1437 + * toggles have stopped. Then HPD event will be queued to irq handler once after 1438 + * dc default HPD filtering interval since last HPD event. 1439 + * 1440 + * @enable = false - disable hardware HPD filter. HPD event will be queued 1441 + * immediately to irq handler after no HPD change has been detected within 1442 + * IRQ_HPD (aka HPD short pulse) interval (i.e 2ms). 1443 + */ 1444 + void dc_link_enable_hpd_filter(struct dc_link *link, bool enable); 1445 + 1446 + /* submit i2c read/write payloads through ddc channel 1447 + * @link_index - index to a link with ddc in i2c mode 1448 + * @cmd - i2c command structure 1449 + * return - true if success, false otherwise. 1450 + */ 1451 + bool dc_submit_i2c( 1452 + struct dc *dc, 1453 + uint32_t link_index, 1454 + struct i2c_command *cmd); 1455 + 1456 + /* submit i2c read/write payloads through oem channel 1457 + * @link_index - index to a link with ddc in i2c mode 1458 + * @cmd - i2c command structure 1459 + * return - true if success, false otherwise. 1460 + */ 1461 + bool dc_submit_i2c_oem( 1462 + struct dc *dc, 1463 + struct i2c_command *cmd); 1464 + 1465 + enum aux_return_code_type; 1466 + /* Attempt to transfer the given aux payload. This function does not perform 1467 + * retries or handle error states. The reply is returned in the payload->reply 1468 + * and the result through operation_result. Returns the number of bytes 1469 + * transferred,or -1 on a failure. 1470 + */ 1471 + int dc_link_aux_transfer_raw(struct ddc_service *ddc, 1472 + struct aux_payload *payload, 1473 + enum aux_return_code_type *operation_result); 1474 + 1475 + bool dc_is_oem_i2c_device_present( 1476 + struct dc *dc, 1477 + size_t slave_address 1478 + ); 1479 + 1607 1480 #ifdef CONFIG_DRM_AMD_DC_HDCP 1481 + 1608 1482 /* return true if the connected receiver supports the hdcp version */ 1609 1483 bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal); 1610 1484 bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal); 1611 1485 #endif 1486 + 1487 + /* Notify DC about DP RX Interrupt (aka DP IRQ_HPD). 1488 + * 1489 + * TODO - When defer_handling is true the function will have a different purpose. 1490 + * It no longer does complete hpd rx irq handling. We should create a separate 1491 + * interface specifically for this case. 1492 + * 1493 + * Return: 1494 + * true - Downstream port status changed. DM should call DC to do the 1495 + * detection. 1496 + * false - no change in Downstream port status. No further action required 1497 + * from DM. 1498 + */ 1499 + bool dc_link_handle_hpd_rx_irq(struct dc_link *dc_link, 1500 + union hpd_irq_data *hpd_irq_dpcd_data, bool *out_link_loss, 1501 + bool defer_handling, bool *has_left_work); 1502 + /* handle DP specs define test automation sequence*/ 1503 + void dc_link_dp_handle_automated_test(struct dc_link *link); 1504 + 1505 + /* handle DP Link loss sequence and try to recover RX link loss with best 1506 + * effort 1507 + */ 1508 + void dc_link_dp_handle_link_loss(struct dc_link *link); 1509 + 1510 + /* Determine if hpd rx irq should be handled or ignored 1511 + * return true - hpd rx irq should be handled. 1512 + * return false - it is safe to ignore hpd rx irq event 1513 + */ 1514 + bool dc_link_dp_allow_hpd_rx_irq(const struct dc_link *link); 1515 + 1516 + /* Determine if link loss is indicated with a given hpd_irq_dpcd_data. 1517 + * @link - link the hpd irq data associated with 1518 + * @hpd_irq_dpcd_data - input hpd irq data 1519 + * return - true if hpd irq data indicates a link lost 1520 + */ 1521 + bool dc_link_check_link_loss_status(struct dc_link *link, 1522 + union hpd_irq_data *hpd_irq_dpcd_data); 1523 + 1524 + /* Read hpd rx irq data from a given link 1525 + * @link - link where the hpd irq data should be read from 1526 + * @irq_data - output hpd irq data 1527 + * return - DC_OK if hpd irq data is read successfully, otherwise hpd irq data 1528 + * read has failed. 1529 + */ 1530 + enum dc_status dc_link_dp_read_hpd_rx_irq_data( 1531 + struct dc_link *link, 1532 + union hpd_irq_data *irq_data); 1612 1533 1613 1534 /* The function clears recorded DP RX states in the link. DM should call this 1614 1535 * function when it is resuming from S3 power state to previously connected links. ··· 1781 1494 * interface i.e stream_update->dsc_config 1782 1495 */ 1783 1496 bool dc_link_update_dsc_config(struct pipe_ctx *pipe_ctx); 1497 + 1498 + /* translate a raw link rate data to bandwidth in kbps */ 1499 + uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(uint8_t bw); 1500 + 1501 + /* determine the optimal bandwidth given link and required bw. 1502 + * @link - current detected link 1503 + * @req_bw - requested bandwidth in kbps 1504 + * @link_settings - returned most optimal link settings that can fit the 1505 + * requested bandwidth 1506 + * return - false if link can't support requested bandwidth, true if link 1507 + * settings is found. 1508 + */ 1509 + bool dc_link_decide_edp_link_settings(struct dc_link *link, 1510 + struct dc_link_settings *link_settings, 1511 + uint32_t req_bw); 1512 + 1513 + /* return the max dp link settings can be driven by the link without considering 1514 + * connected RX device and its capability 1515 + */ 1516 + bool dc_link_dp_get_max_link_enc_cap(const struct dc_link *link, 1517 + struct dc_link_settings *max_link_enc_cap); 1518 + 1519 + /* determine when the link is driving MST mode, what DP link channel coding 1520 + * format will be used. The decision will remain unchanged until next HPD event. 1521 + * 1522 + * @link - a link with DP RX connection 1523 + * return - if stream is committed to this link with MST signal type, type of 1524 + * channel coding format dc will choose. 1525 + */ 1526 + enum dp_link_encoding dc_link_dp_mst_decide_link_encoding_format( 1527 + const struct dc_link *link); 1528 + 1529 + /* get max dp link settings the link can enable with all things considered. (i.e 1530 + * TX/RX/Cable capabilities and dp override policies. 1531 + * 1532 + * @link - a link with DP RX connection 1533 + * return - max dp link settings the link can enable. 1534 + * 1535 + */ 1536 + const struct dc_link_settings *dc_link_get_link_cap(const struct dc_link *link); 1537 + 1538 + /* Check if a RX (ex. DP sink, MST hub, passive or active dongle) is connected 1539 + * to a link with dp connector signal type. 1540 + * @link - a link with dp connector signal type 1541 + * return - true if connected, false otherwise 1542 + */ 1543 + bool dc_link_is_dp_sink_present(struct dc_link *link); 1544 + 1545 + /* Force DP lane settings update to main-link video signal and notify the change 1546 + * to DP RX via DPCD. This is a debug interface used for video signal integrity 1547 + * tuning purpose. The interface assumes link has already been enabled with DP 1548 + * signal. 1549 + * 1550 + * @lt_settings - a container structure with desired hw_lane_settings 1551 + */ 1552 + void dc_link_set_drive_settings(struct dc *dc, 1553 + struct link_training_settings *lt_settings, 1554 + const struct dc_link *link); 1555 + 1556 + /* Enable a test pattern in Link or PHY layer in an active link for compliance 1557 + * test or debugging purpose. The test pattern will remain until next un-plug. 1558 + * 1559 + * @link - active link with DP signal output enabled. 1560 + * @test_pattern - desired test pattern to output. 1561 + * NOTE: set to DP_TEST_PATTERN_VIDEO_MODE to disable previous test pattern. 1562 + * @test_pattern_color_space - for video test pattern choose a desired color 1563 + * space. 1564 + * @p_link_settings - For PHY pattern choose a desired link settings 1565 + * @p_custom_pattern - some test pattern will require a custom input to 1566 + * customize some pattern details. Otherwise keep it to NULL. 1567 + * @cust_pattern_size - size of the custom pattern input. 1568 + * 1569 + */ 1570 + bool dc_link_dp_set_test_pattern( 1571 + struct dc_link *link, 1572 + enum dp_test_pattern test_pattern, 1573 + enum dp_test_pattern_color_space test_pattern_color_space, 1574 + const struct link_training_settings *p_link_settings, 1575 + const unsigned char *p_custom_pattern, 1576 + unsigned int cust_pattern_size); 1577 + 1578 + /* Force DP link settings to always use a specific value until reboot to a 1579 + * specific link. If link has already been enabled, the interface will also 1580 + * switch to desired link settings immediately. This is a debug interface to 1581 + * generic dp issue trouble shooting. 1582 + */ 1583 + void dc_link_set_preferred_link_settings(struct dc *dc, 1584 + struct dc_link_settings *link_setting, 1585 + struct dc_link *link); 1586 + 1587 + /* Force DP link to customize a specific link training behavior by overriding to 1588 + * standard DP specs defined protocol. This is a debug interface to trouble shoot 1589 + * display specific link training issues or apply some display specific 1590 + * workaround in link training. 1591 + * 1592 + * @link_settings - if not NULL, force preferred link settings to the link. 1593 + * @lt_override - a set of override pointers. If any pointer is none NULL, dc 1594 + * will apply this particular override in future link training. If NULL is 1595 + * passed in, dc resets previous overrides. 1596 + * NOTE: DM must keep the memory from override pointers until DM resets preferred 1597 + * training settings. 1598 + */ 1599 + void dc_link_set_preferred_training_settings(struct dc *dc, 1600 + struct dc_link_settings *link_setting, 1601 + struct dc_link_training_overrides *lt_overrides, 1602 + struct dc_link *link, 1603 + bool skip_immediate_retrain); 1604 + 1605 + /* return - true if FEC is supported with connected DP RX, false otherwise */ 1606 + bool dc_link_is_fec_supported(const struct dc_link *link); 1607 + 1608 + /* query FEC enablement policy to determine if FEC will be enabled by dc during 1609 + * link enablement. 1610 + * return - true if FEC should be enabled, false otherwise. 1611 + */ 1612 + bool dc_link_should_enable_fec(const struct dc_link *link); 1613 + 1614 + /* determine lttpr mode the current link should be enabled with a specific link 1615 + * settings. 1616 + */ 1617 + enum lttpr_mode dc_link_decide_lttpr_mode(struct dc_link *link, 1618 + struct dc_link_settings *link_setting); 1619 + 1620 + /* Force DP RX to update its power state. 1621 + * NOTE: this interface doesn't update dp main-link. Calling this function will 1622 + * cause DP TX main-link and DP RX power states out of sync. DM has to restore 1623 + * RX power state back upon finish DM specific execution requiring DP RX in a 1624 + * specific power state. 1625 + * @on - true to set DP RX in D0 power state, false to set DP RX in D3 power 1626 + * state. 1627 + */ 1628 + void dc_link_dp_receiver_power_ctrl(struct dc_link *link, bool on); 1629 + 1630 + /* Force link to read base dp receiver caps from dpcd 000h - 00Fh and overwrite 1631 + * current value read from extended receiver cap from 02200h - 0220Fh. 1632 + * Some DP RX has problems of providing accurate DP receiver caps from extended 1633 + * field, this interface is a workaround to revert link back to use base caps. 1634 + */ 1635 + void dc_link_overwrite_extended_receiver_cap( 1636 + struct dc_link *link); 1637 + 1638 + void dc_link_edp_panel_backlight_power_on(struct dc_link *link, 1639 + bool wait_for_hpd); 1640 + 1641 + /* Set backlight level of an embedded panel (eDP, LVDS). 1642 + * backlight_pwm_u16_16 is unsigned 32 bit with 16 bit integer 1643 + * and 16 bit fractional, where 1.0 is max backlight value. 1644 + */ 1645 + bool dc_link_set_backlight_level(const struct dc_link *dc_link, 1646 + uint32_t backlight_pwm_u16_16, 1647 + uint32_t frame_ramp); 1648 + 1649 + /* Set/get nits-based backlight level of an embedded panel (eDP, LVDS). */ 1650 + bool dc_link_set_backlight_level_nits(struct dc_link *link, 1651 + bool isHDR, 1652 + uint32_t backlight_millinits, 1653 + uint32_t transition_time_in_ms); 1654 + 1655 + bool dc_link_get_backlight_level_nits(struct dc_link *link, 1656 + uint32_t *backlight_millinits, 1657 + uint32_t *backlight_millinits_peak); 1658 + 1659 + int dc_link_get_backlight_level(const struct dc_link *dc_link); 1660 + 1661 + int dc_link_get_target_backlight_pwm(const struct dc_link *link); 1662 + 1663 + bool dc_link_set_psr_allow_active(struct dc_link *dc_link, const bool *enable, 1664 + bool wait, bool force_static, const unsigned int *power_opts); 1665 + 1666 + bool dc_link_get_psr_state(const struct dc_link *dc_link, enum dc_psr_state *state); 1667 + 1668 + bool dc_link_setup_psr(struct dc_link *dc_link, 1669 + const struct dc_stream_state *stream, struct psr_config *psr_config, 1670 + struct psr_context *psr_context); 1671 + 1672 + /* On eDP links this function call will stall until T12 has elapsed. 1673 + * If the panel is not in power off state, this function will return 1674 + * immediately. 1675 + */ 1676 + bool dc_link_wait_for_t12(struct dc_link *link); 1677 + 1678 + /* Determine if dp trace has been initialized to reflect upto date result * 1679 + * return - true if trace is initialized and has valid data. False dp trace 1680 + * doesn't have valid result. 1681 + */ 1682 + bool dc_dp_trace_is_initialized(struct dc_link *link); 1683 + 1684 + /* Query a dp trace flag to indicate if the current dp trace data has been 1685 + * logged before 1686 + */ 1687 + bool dc_dp_trace_is_logged(struct dc_link *link, 1688 + bool in_detection); 1689 + 1690 + /* Set dp trace flag to indicate whether DM has already logged the current dp 1691 + * trace data. DM can set is_logged to true upon logging and check 1692 + * dc_dp_trace_is_logged before logging to avoid logging the same result twice. 1693 + */ 1694 + void dc_dp_trace_set_is_logged_flag(struct dc_link *link, 1695 + bool in_detection, 1696 + bool is_logged); 1697 + 1698 + /* Obtain driver time stamp for last dp link training end. The time stamp is 1699 + * formatted based on dm_get_timestamp DM function. 1700 + * @in_detection - true to get link training end time stamp of last link 1701 + * training in detection sequence. false to get link training end time stamp 1702 + * of last link training in commit (dpms) sequence 1703 + */ 1704 + unsigned long long dc_dp_trace_get_lt_end_timestamp(struct dc_link *link, 1705 + bool in_detection); 1706 + 1707 + /* Get how many link training attempts dc has done with latest sequence. 1708 + * @in_detection - true to get link training count of last link 1709 + * training in detection sequence. false to get link training count of last link 1710 + * training in commit (dpms) sequence 1711 + */ 1712 + struct dp_trace_lt_counts *dc_dp_trace_get_lt_counts(struct dc_link *link, 1713 + bool in_detection); 1714 + 1715 + /* Get how many link loss has happened since last link training attempts */ 1716 + unsigned int dc_dp_trace_get_link_loss_count(struct dc_link *link); 1717 + 1718 + /* 1719 + * USB4 DPIA BW ALLOCATION PUBLIC FUNCTIONS 1720 + */ 1721 + /* 1722 + * Send a request from DP-Tx requesting to allocate BW remotely after 1723 + * allocating it locally. This will get processed by CM and a CB function 1724 + * will be called. 1725 + * 1726 + * @link: pointer to the dc_link struct instance 1727 + * @req_bw: The requested bw in Kbyte to allocated 1728 + * 1729 + * return: none 1730 + */ 1731 + void dc_link_set_usb4_req_bw_req(struct dc_link *link, int req_bw); 1732 + 1733 + /* 1734 + * Handle function for when the status of the Request above is complete. 1735 + * We will find out the result of allocating on CM and update structs. 1736 + * 1737 + * @link: pointer to the dc_link struct instance 1738 + * @bw: Allocated or Estimated BW depending on the result 1739 + * @result: Response type 1740 + * 1741 + * return: none 1742 + */ 1743 + void dc_link_handle_usb4_bw_alloc_response(struct dc_link *link, 1744 + uint8_t bw, uint8_t result); 1745 + 1746 + /* 1747 + * Handle the USB4 BW Allocation related functionality here: 1748 + * Plug => Try to allocate max bw from timing parameters supported by the sink 1749 + * Unplug => de-allocate bw 1750 + * 1751 + * @link: pointer to the dc_link struct instance 1752 + * @peak_bw: Peak bw used by the link/sink 1753 + * 1754 + * return: allocated bw else return 0 1755 + */ 1756 + int dc_link_dp_dpia_handle_usb4_bandwidth_allocation_for_link( 1757 + struct dc_link *link, int peak_bw); 1758 + 1784 1759 /* Sink Interfaces - A sink corresponds to a display output device */ 1785 1760 1786 1761 struct dc_container_id {
+107
drivers/gpu/drm/amd/display/dc/dc_dp_types.h
··· 1261 1261 } bits; 1262 1262 uint8_t raw; 1263 1263 }; 1264 + 1265 + enum dc_link_fec_state { 1266 + dc_link_fec_not_ready, 1267 + dc_link_fec_ready, 1268 + dc_link_fec_enabled 1269 + }; 1270 + 1271 + union dpcd_psr_configuration { 1272 + struct { 1273 + unsigned char ENABLE : 1; 1274 + unsigned char TRANSMITTER_ACTIVE_IN_PSR : 1; 1275 + unsigned char CRC_VERIFICATION : 1; 1276 + unsigned char FRAME_CAPTURE_INDICATION : 1; 1277 + /* For eDP 1.4, PSR v2*/ 1278 + unsigned char LINE_CAPTURE_INDICATION : 1; 1279 + /* For eDP 1.4, PSR v2*/ 1280 + unsigned char IRQ_HPD_WITH_CRC_ERROR : 1; 1281 + unsigned char ENABLE_PSR2 : 1; 1282 + unsigned char EARLY_TRANSPORT_ENABLE : 1; 1283 + } bits; 1284 + unsigned char raw; 1285 + }; 1286 + 1287 + union dpcd_alpm_configuration { 1288 + struct { 1289 + unsigned char ENABLE : 1; 1290 + unsigned char IRQ_HPD_ENABLE : 1; 1291 + unsigned char RESERVED : 6; 1292 + } bits; 1293 + unsigned char raw; 1294 + }; 1295 + 1296 + union dpcd_sink_active_vtotal_control_mode { 1297 + struct { 1298 + unsigned char ENABLE : 1; 1299 + unsigned char RESERVED : 7; 1300 + } bits; 1301 + unsigned char raw; 1302 + }; 1303 + 1304 + union psr_error_status { 1305 + struct { 1306 + unsigned char LINK_CRC_ERROR :1; 1307 + unsigned char RFB_STORAGE_ERROR :1; 1308 + unsigned char VSC_SDP_ERROR :1; 1309 + unsigned char RESERVED :5; 1310 + } bits; 1311 + unsigned char raw; 1312 + }; 1313 + 1314 + union psr_sink_psr_status { 1315 + struct { 1316 + unsigned char SINK_SELF_REFRESH_STATUS :3; 1317 + unsigned char RESERVED :5; 1318 + } bits; 1319 + unsigned char raw; 1320 + }; 1321 + 1322 + struct edp_trace_power_timestamps { 1323 + uint64_t poweroff; 1324 + uint64_t poweron; 1325 + }; 1326 + 1327 + struct dp_trace_lt_counts { 1328 + unsigned int total; 1329 + unsigned int fail; 1330 + }; 1331 + 1332 + enum link_training_result { 1333 + LINK_TRAINING_SUCCESS, 1334 + LINK_TRAINING_CR_FAIL_LANE0, 1335 + LINK_TRAINING_CR_FAIL_LANE1, 1336 + LINK_TRAINING_CR_FAIL_LANE23, 1337 + /* CR DONE bit is cleared during EQ step */ 1338 + LINK_TRAINING_EQ_FAIL_CR, 1339 + /* CR DONE bit is cleared but LANE0_CR_DONE is set during EQ step */ 1340 + LINK_TRAINING_EQ_FAIL_CR_PARTIAL, 1341 + /* other failure during EQ step */ 1342 + LINK_TRAINING_EQ_FAIL_EQ, 1343 + LINK_TRAINING_LQA_FAIL, 1344 + /* one of the CR,EQ or symbol lock is dropped */ 1345 + LINK_TRAINING_LINK_LOSS, 1346 + /* Abort link training (because sink unplugged) */ 1347 + LINK_TRAINING_ABORT, 1348 + DP_128b_132b_LT_FAILED, 1349 + DP_128b_132b_MAX_LOOP_COUNT_REACHED, 1350 + DP_128b_132b_CHANNEL_EQ_DONE_TIMEOUT, 1351 + DP_128b_132b_CDS_DONE_TIMEOUT, 1352 + }; 1353 + 1354 + struct dp_trace_lt { 1355 + struct dp_trace_lt_counts counts; 1356 + struct dp_trace_timestamps { 1357 + unsigned long long start; 1358 + unsigned long long end; 1359 + } timestamps; 1360 + enum link_training_result result; 1361 + bool is_logged; 1362 + }; 1363 + 1364 + struct dp_trace { 1365 + struct dp_trace_lt detect_lt_trace; 1366 + struct dp_trace_lt commit_lt_trace; 1367 + unsigned int link_loss_count; 1368 + bool is_initialized; 1369 + struct edp_trace_power_timestamps edp_trace_power_timestamps; 1370 + }; 1264 1371 #endif /* DC_DP_TYPES_H */
+14
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
··· 1085 1085 uint16_t color_b_cb; 1086 1086 }; 1087 1087 1088 + enum symclk_state { 1089 + SYMCLK_OFF_TX_OFF, 1090 + SYMCLK_ON_TX_ON, 1091 + SYMCLK_ON_TX_OFF, 1092 + }; 1093 + 1094 + struct phy_state { 1095 + struct { 1096 + uint8_t otg : 1; 1097 + uint8_t reserved : 7; 1098 + } symclk_ref_cnts; 1099 + enum symclk_state symclk_state; 1100 + }; 1101 + 1088 1102 #endif /* DC_HW_TYPES_H */ 1089 1103
+104
drivers/gpu/drm/amd/display/dc/dc_types.h
··· 38 38 #include "dc_hw_types.h" 39 39 #include "dal_types.h" 40 40 #include "grph_object_defs.h" 41 + #include "grph_object_ctrl_defs.h" 41 42 42 43 #ifdef CONFIG_DRM_AMD_DC_HDCP 43 44 #include "dm_cp_psp.h" ··· 983 982 union hdcp_bcaps bcaps; 984 983 }; 985 984 #endif 985 + 986 + /* DP MST stream allocation (payload bandwidth number) */ 987 + struct link_mst_stream_allocation { 988 + /* DIG front */ 989 + const struct stream_encoder *stream_enc; 990 + /* HPO DP Stream Encoder */ 991 + const struct hpo_dp_stream_encoder *hpo_dp_stream_enc; 992 + /* associate DRM payload table with DC stream encoder */ 993 + uint8_t vcp_id; 994 + /* number of slots required for the DP stream in transport packet */ 995 + uint8_t slot_count; 996 + }; 997 + 998 + #define MAX_CONTROLLER_NUM 6 999 + 1000 + /* DP MST stream allocation table */ 1001 + struct link_mst_stream_allocation_table { 1002 + /* number of DP video streams */ 1003 + int stream_count; 1004 + /* array of stream allocations */ 1005 + struct link_mst_stream_allocation stream_allocations[MAX_CONTROLLER_NUM]; 1006 + }; 1007 + 1008 + /* PSR feature flags */ 1009 + struct psr_settings { 1010 + bool psr_feature_enabled; // PSR is supported by sink 1011 + bool psr_allow_active; // PSR is currently active 1012 + enum dc_psr_version psr_version; // Internal PSR version, determined based on DPCD 1013 + bool psr_vtotal_control_support; // Vtotal control is supported by sink 1014 + unsigned long long psr_dirty_rects_change_timestamp_ns; // for delay of enabling PSR-SU 1015 + 1016 + /* These parameters are calculated in Driver, 1017 + * based on display timing and Sink capabilities. 1018 + * If VBLANK region is too small and Sink takes a long time 1019 + * to set up RFB, it may take an extra frame to enter PSR state. 1020 + */ 1021 + bool psr_frame_capture_indication_req; 1022 + unsigned int psr_sdp_transmit_line_num_deadline; 1023 + uint8_t force_ffu_mode; 1024 + unsigned int psr_power_opt; 1025 + }; 1026 + 1027 + /* To split out "global" and "per-panel" config settings. 1028 + * Add a struct dc_panel_config under dc_link 1029 + */ 1030 + struct dc_panel_config { 1031 + /* extra panel power sequence parameters */ 1032 + struct pps { 1033 + unsigned int extra_t3_ms; 1034 + unsigned int extra_t7_ms; 1035 + unsigned int extra_delay_backlight_off; 1036 + unsigned int extra_post_t7_ms; 1037 + unsigned int extra_pre_t11_ms; 1038 + unsigned int extra_t12_ms; 1039 + unsigned int extra_post_OUI_ms; 1040 + } pps; 1041 + /* nit brightness */ 1042 + struct nits_brightness { 1043 + unsigned int peak; /* nits */ 1044 + unsigned int max_avg; /* nits */ 1045 + unsigned int min; /* 1/10000 nits */ 1046 + unsigned int max_nonboost_brightness_millinits; 1047 + unsigned int min_brightness_millinits; 1048 + } nits_brightness; 1049 + /* PSR */ 1050 + struct psr { 1051 + bool disable_psr; 1052 + bool disallow_psrsu; 1053 + bool rc_disable; 1054 + bool rc_allow_static_screen; 1055 + bool rc_allow_fullscreen_VPB; 1056 + } psr; 1057 + /* ABM */ 1058 + struct varib { 1059 + unsigned int varibright_feature_enable; 1060 + unsigned int def_varibright_level; 1061 + unsigned int abm_config_setting; 1062 + } varib; 1063 + /* edp DSC */ 1064 + struct dsc { 1065 + bool disable_dsc_edp; 1066 + unsigned int force_dsc_edp_policy; 1067 + } dsc; 1068 + /* eDP ILR */ 1069 + struct ilr { 1070 + bool optimize_edp_link_rate; /* eDP ILR */ 1071 + } ilr; 1072 + }; 1073 + 1074 + /* 1075 + * USB4 DPIA BW ALLOCATION STRUCTS 1076 + */ 1077 + struct dc_dpia_bw_alloc { 1078 + int sink_verified_bw; // The Verified BW that sink can allocated and use that has been verified already 1079 + int sink_allocated_bw; // The Actual Allocated BW that sink currently allocated 1080 + int sink_max_bw; // The Max BW that sink can require/support 1081 + int estimated_bw; // The estimated available BW for this DPIA 1082 + int bw_granularity; // BW Granularity 1083 + bool bw_alloc_enabled; // The BW Alloc Mode Support is turned ON for all 3: DP-Tx & Dpia & CM 1084 + bool response_ready; // Response ready from the CM side 1085 + }; 1086 + 1087 + #define MAX_SINKS_PER_LINK 4 986 1088 #endif /* DC_TYPES_H_ */
+1 -1
drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
··· 148 148 int edp_num; 149 149 uint8_t panel_mask = 0; 150 150 151 - get_edp_links(dc->dc, edp_links, &edp_num); 151 + dc_get_edp_links(dc->dc, edp_links, &edp_num); 152 152 153 153 for (i = 0; i < edp_num; i++) { 154 154 if (edp_links[i]->link_status.link_active)
+3 -2
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.h
··· 26 26 #ifndef _DMUB_PSR_H_ 27 27 #define _DMUB_PSR_H_ 28 28 29 - #include "os_types.h" 30 - #include "dc_link.h" 29 + #include "dc_types.h" 30 + struct dc_link; 31 + struct dmub_psr_funcs; 31 32 32 33 struct dmub_psr { 33 34 struct dc_context *ctx;
+1 -1
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
··· 1739 1739 1740 1740 1741 1741 get_edp_links_with_sink(dc, edp_links_with_sink, &edp_with_sink_num); 1742 - get_edp_links(dc, edp_links, &edp_num); 1742 + dc_get_edp_links(dc, edp_links, &edp_num); 1743 1743 1744 1744 if (hws->funcs.init_pipes) 1745 1745 hws->funcs.init_pipes(dc, context);
+1 -1
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
··· 1638 1638 int edp_num; 1639 1639 int i = 0; 1640 1640 1641 - get_edp_links(dc, edp_links, &edp_num); 1641 + dc_get_edp_links(dc, edp_links, &edp_num); 1642 1642 if (edp_num) 1643 1643 edp_link = edp_links[0]; 1644 1644
+1
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c
··· 28 28 #include "dcn30_dio_stream_encoder.h" 29 29 #include "reg_helper.h" 30 30 #include "hw_shared.h" 31 + #include "dc.h" 31 32 #include "core_types.h" 32 33 #include <linux/delay.h> 33 34
+1 -1
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
··· 559 559 struct dc_link *edp_links[MAX_NUM_EDP]; 560 560 struct dc_link *edp_link = NULL; 561 561 562 - get_edp_links(dc, edp_links, &edp_num); 562 + dc_get_edp_links(dc, edp_links, &edp_num); 563 563 if (edp_num) 564 564 edp_link = edp_links[0]; 565 565 if (edp_link && edp_link->link_enc->funcs->is_dig_enabled &&
+1 -1
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c
··· 26 26 #include "dc_bios_types.h" 27 27 #include "dcn31_hpo_dp_stream_encoder.h" 28 28 #include "reg_helper.h" 29 - #include "dc_link.h" 29 + #include "dc.h" 30 30 31 31 #define DC_LOGGER \ 32 32 enc3->base.ctx->logger
+1 -1
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
··· 837 837 struct dc_link *edp_links[MAX_NUM_EDP]; 838 838 struct dc_link *edp_link; 839 839 840 - get_edp_links(dc, edp_links, &edp_num); 840 + dc_get_edp_links(dc, edp_links, &edp_num); 841 841 if (edp_num) { 842 842 for (i = 0; i < edp_num; i++) { 843 843 edp_link = edp_links[i];
-1
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
··· 25 25 26 26 #ifdef CONFIG_DRM_AMD_DC_DCN 27 27 #include "dc.h" 28 - #include "dc_link.h" 29 28 #include "../display_mode_lib.h" 30 29 #include "display_mode_vba_30.h" 31 30 #include "../dml_inline_defs.h"
-1
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
··· 24 24 */ 25 25 26 26 #include "dc.h" 27 - #include "dc_link.h" 28 27 #include "../display_mode_lib.h" 29 28 #include "../dcn30/display_mode_vba_30.h" 30 29 #include "display_mode_vba_31.h"
-1
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c
··· 27 27 #define UNIT_TEST 0 28 28 #if !UNIT_TEST 29 29 #include "dc.h" 30 - #include "dc_link.h" 31 30 #endif 32 31 #include "../display_mode_lib.h" 33 32 #include "display_mode_vba_314.h"
-1
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
··· 24 24 */ 25 25 26 26 #include "dc.h" 27 - #include "dc_link.h" 28 27 #include "../display_mode_lib.h" 29 28 #include "display_mode_vba_32.h" 30 29 #include "../dml_inline_defs.h"
-14
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h
··· 275 275 LUT_RAM_B 276 276 }; 277 277 278 - enum symclk_state { 279 - SYMCLK_OFF_TX_OFF, 280 - SYMCLK_ON_TX_ON, 281 - SYMCLK_ON_TX_OFF, 282 - }; 283 - 284 - struct phy_state { 285 - struct { 286 - uint8_t otg : 1; 287 - uint8_t reserved : 7; 288 - } symclk_ref_cnts; 289 - enum symclk_state symclk_state; 290 - }; 291 - 292 278 /** 293 279 * speakersToChannels 294 280 *
-1
drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
··· 30 30 31 31 #include "audio_types.h" 32 32 #include "hw_shared.h" 33 - #include "dc_link.h" 34 33 35 34 struct dc_bios; 36 35 struct dc_context;
-1
drivers/gpu/drm/amd/display/dc/inc/link.h
··· 38 38 * into this file and prefix it with "link_". 39 39 */ 40 40 #include "core_types.h" 41 - #include "dc_link.h" 42 41 43 42 struct link_init_data { 44 43 const struct dc *dc;