Commit 5b2b2416 authored by Melissa Wen's avatar Melissa Wen Committed by Alex Deucher

drm/amd/display: dc_link: code clean up on detect_dp function

Removes codestyle issues on detect_dp function as suggested by
checkpatch.pl.

CHECK: Lines should not end with a '('
WARNING: Missing a blank line after declarations
WARNING: line over 80 characters
CHECK: Alignment should match open parenthesis
Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: default avatarZhan Liu <zhan.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9100c359
...@@ -585,14 +585,14 @@ static void read_current_link_settings_on_detect(struct dc_link *link) ...@@ -585,14 +585,14 @@ static void read_current_link_settings_on_detect(struct dc_link *link)
LINK_SPREAD_05_DOWNSPREAD_30KHZ : LINK_SPREAD_DISABLED; LINK_SPREAD_05_DOWNSPREAD_30KHZ : LINK_SPREAD_DISABLED;
} }
static bool detect_dp( static bool detect_dp(struct dc_link *link,
struct dc_link *link, struct display_sink_capability *sink_caps,
struct display_sink_capability *sink_caps, bool *converter_disable_audio,
bool *converter_disable_audio, struct audio_support *audio_support,
struct audio_support *audio_support, enum dc_detect_reason reason)
enum dc_detect_reason reason)
{ {
bool boot = false; bool boot = false;
sink_caps->signal = link_detect_sink(link, reason); sink_caps->signal = link_detect_sink(link, reason);
sink_caps->transaction_type = sink_caps->transaction_type =
get_ddc_transaction_type(sink_caps->signal); get_ddc_transaction_type(sink_caps->signal);
...@@ -609,9 +609,8 @@ static bool detect_dp( ...@@ -609,9 +609,8 @@ static bool detect_dp(
sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT_MST; sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT_MST;
link->type = dc_connection_mst_branch; link->type = dc_connection_mst_branch;
dal_ddc_service_set_transaction_type( dal_ddc_service_set_transaction_type(link->ddc,
link->ddc, sink_caps->transaction_type);
sink_caps->transaction_type);
/* /*
* This call will initiate MST topology discovery. Which * This call will initiate MST topology discovery. Which
...@@ -640,13 +639,10 @@ static bool detect_dp( ...@@ -640,13 +639,10 @@ static bool detect_dp(
if (reason == DETECT_REASON_BOOT) if (reason == DETECT_REASON_BOOT)
boot = true; boot = true;
dm_helpers_dp_update_branch_info( dm_helpers_dp_update_branch_info(link->ctx, link);
link->ctx,
link);
if (!dm_helpers_dp_mst_start_top_mgr( if (!dm_helpers_dp_mst_start_top_mgr(link->ctx,
link->ctx, link, boot)) {
link, boot)) {
/* MST not supported */ /* MST not supported */
link->type = dc_connection_single; link->type = dc_connection_single;
sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT; sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT;
...@@ -654,7 +650,7 @@ static bool detect_dp( ...@@ -654,7 +650,7 @@ static bool detect_dp(
} }
if (link->type != dc_connection_mst_branch && if (link->type != dc_connection_mst_branch &&
is_dp_active_dongle(link)) { is_dp_active_dongle(link)) {
/* DP active dongles */ /* DP active dongles */
link->type = dc_connection_active_dongle; link->type = dc_connection_active_dongle;
if (!link->dpcd_caps.sink_count.bits.SINK_COUNT) { if (!link->dpcd_caps.sink_count.bits.SINK_COUNT) {
...@@ -665,14 +661,15 @@ static bool detect_dp( ...@@ -665,14 +661,15 @@ static bool detect_dp(
return true; return true;
} }
if (link->dpcd_caps.dongle_type != DISPLAY_DONGLE_DP_HDMI_CONVERTER) if (link->dpcd_caps.dongle_type !=
DISPLAY_DONGLE_DP_HDMI_CONVERTER)
*converter_disable_audio = true; *converter_disable_audio = true;
} }
} else { } else {
/* DP passive dongles */ /* DP passive dongles */
sink_caps->signal = dp_passive_dongle_detection(link->ddc, sink_caps->signal = dp_passive_dongle_detection(link->ddc,
sink_caps, sink_caps,
audio_support); audio_support);
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment