Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp846088ybf; Fri, 28 Feb 2020 08:43:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy3EbkcIMeJje6P6GToBpo9sR/w5xySvJeULXK+B4lY9zsyah4Kh7it94aIyGJwZY0g7Wnk X-Received: by 2002:aca:4e10:: with SMTP id c16mr3685802oib.6.1582908236609; Fri, 28 Feb 2020 08:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582908236; cv=none; d=google.com; s=arc-20160816; b=h/cQxJGl9NuQV3SZdprima31wy2iQhSmYhft9HdFOdjvxarzsqwRTIsMQUAhnT3k5F 648JHrDiIr3aohu9YmcVQCZIjAvZFMAtgCDtNuhfkzz5DOSEdL4Jb0v1mN8RZAJYcQWu RBOrGr/ZAW68gvePwP3zzi+Rw0OPDGfDoL0SL8mLEburUvn63EzPcaqqKHzd8QVPWAgT SMeFItSUSVOd32ZIAmOaAYJSoZM/bmj5NeTncf0awhSXakNKcGV5bo4f8AS4qHJ4TAIj +q/VAWyouqgRslhf9KI8fVR21yDm9Wsy9D5DaNpDGGHkov+LONTzZrJgSQ4xP7PKp7YL SvUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=10ldW0StfDF5LQn5px5zjojzk7W9mvvMvbddw+jgFsA=; b=Sm9SwagPYRsoboANqxanvSIdi2qivb5BV5QNDgcQtYgwjGYZbBK447uiS0Y6bDK3hq q7/ipXaXOj+pTJNAPPjCzD2zK0BLHXcPiOnZD3lLpLGs4WLDFUije5JWHHWZep0k6eWf 3evGKJ9fM/fZRCZFZ2ZZzFWX4/Ztp0uXJtkYPc4lPq29nTB9or/E8/+ptRL6ty2lcTNW 7zxwIHutbBAWXz+5ZT7DN8WWRjxdCgTVWFFRIGXNNTBWDqZZvjtVHFd/XbzpIdg4oNPa SzNiUB3tJWfbWW4BKtFNTADNcMkSyTk9xLb4aM4dQ6JmuLWaTeMp06h/lyxSZXqekUhU lkZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XkgKXpMV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si260987otr.108.2020.02.28.08.43.44; Fri, 28 Feb 2020 08:43:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XkgKXpMV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726167AbgB1Qn2 (ORCPT + 99 others); Fri, 28 Feb 2020 11:43:28 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:41923 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbgB1Qn2 (ORCPT ); Fri, 28 Feb 2020 11:43:28 -0500 Received: by mail-ed1-f65.google.com with SMTP id c26so4054515eds.8 for ; Fri, 28 Feb 2020 08:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=10ldW0StfDF5LQn5px5zjojzk7W9mvvMvbddw+jgFsA=; b=XkgKXpMVRw195GbFLaoE1Lus3mosOPFgls1V02Wvy1Vj5vnwWa/HRfYURh8n8PZpaJ GkkkX3RdNYcvyJtM4AnWGWxiNk9HM4LBrUL9G2/xBYaUn4nNhl0jhV83HNR6fI2ajKQK /ETtlOkksDL/o5pz0bHC7Wi+BlJ3qRQlsiTOta/ifPscYgV+XNiDtrl/yZPGF4t75ctM hTdDnCOg8YNAMiVoC8iwHNfW0zk4ML4bSbxMwJV4BwBXuY7sdgvNCYaZG6l6vkc81t78 6/ZYVosISVmDrBi4WrIDONYZVhLbUBgjnMstgqn+Q1pUDlwXXRVCti9+m6gKW29nAtsd wgNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=10ldW0StfDF5LQn5px5zjojzk7W9mvvMvbddw+jgFsA=; b=PKMV24c6TMyRtqsaFhePHyIVEZFe8D1BKQXcg94tm5ddwVLlIziuJgt+oxRP2P0pnt UkUtdc2phh63sfIPlKXjByNQNgLvhUl5h7wwA19yt7waBCQ38ee6TvIMfWZZAm8P3qUd 5fbD0LhfYavB0nn5TmkXVM8iJAVUAbLRQzBT41LyLwj6ug5m1x5GDLxLmZV/ybc+XPMZ Hg+ZOZH/XfVFjPu9IyPhEXH7G+9ZHlmNQPkPIG2PRfhrH6OHCFJqWdFcCagwCiLNFJor apY9r9r11K2ul+5KSt2F2P7k6WjmPYPt9Zg9xqkwPOupLcjbJhdEb/sIUE5u70A8e+7F D93A== X-Gm-Message-State: APjAAAURxHHOmMxbymMhomTidVzW+CuRgYsO9raB1b7KRq6+Jo9a4BUV xv96zf/hLockCd4RlBpQgls= X-Received: by 2002:a50:eb04:: with SMTP id y4mr4879876edp.170.1582908207050; Fri, 28 Feb 2020 08:43:27 -0800 (PST) Received: from smtp.gmail.com (1.77.115.89.rev.vodafone.pt. [89.115.77.1]) by smtp.gmail.com with ESMTPSA id g6sm318212edm.29.2020.02.28.08.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 08:43:26 -0800 (PST) Date: Fri, 28 Feb 2020 13:43:19 -0300 From: Melissa Wen To: Harry Wentland , Leo Li , Alex Deucher , Christian Konig , David Zhou , David Airlie , Daniel Vetter , Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] drm/amd/display: dc_link: code clean up on detect_dp function Message-ID: <60bc9ed29e4136eedd3b92c9fd536310b6b9c00d.1582907436.git.melissa.srw@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Melissa Wen --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index eb9894e416ed..549bea1d725c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -585,14 +585,14 @@ static void read_current_link_settings_on_detect(struct dc_link *link) LINK_SPREAD_05_DOWNSPREAD_30KHZ : LINK_SPREAD_DISABLED; } -static bool detect_dp( - struct dc_link *link, - struct display_sink_capability *sink_caps, - bool *converter_disable_audio, - struct audio_support *audio_support, - enum dc_detect_reason reason) +static bool detect_dp(struct dc_link *link, + struct display_sink_capability *sink_caps, + bool *converter_disable_audio, + struct audio_support *audio_support, + enum dc_detect_reason reason) { bool boot = false; + sink_caps->signal = link_detect_sink(link, reason); sink_caps->transaction_type = get_ddc_transaction_type(sink_caps->signal); @@ -609,9 +609,8 @@ static bool detect_dp( sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT_MST; link->type = dc_connection_mst_branch; - dal_ddc_service_set_transaction_type( - link->ddc, - sink_caps->transaction_type); + dal_ddc_service_set_transaction_type(link->ddc, + sink_caps->transaction_type); /* * This call will initiate MST topology discovery. Which @@ -640,13 +639,10 @@ static bool detect_dp( if (reason == DETECT_REASON_BOOT) boot = true; - dm_helpers_dp_update_branch_info( - link->ctx, - link); + dm_helpers_dp_update_branch_info(link->ctx, link); - if (!dm_helpers_dp_mst_start_top_mgr( - link->ctx, - link, boot)) { + if (!dm_helpers_dp_mst_start_top_mgr(link->ctx, + link, boot)) { /* MST not supported */ link->type = dc_connection_single; sink_caps->signal = SIGNAL_TYPE_DISPLAY_PORT; @@ -654,7 +650,7 @@ static bool detect_dp( } if (link->type != dc_connection_mst_branch && - is_dp_active_dongle(link)) { + is_dp_active_dongle(link)) { /* DP active dongles */ link->type = dc_connection_active_dongle; if (!link->dpcd_caps.sink_count.bits.SINK_COUNT) { @@ -665,14 +661,15 @@ static bool detect_dp( 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; } } else { /* DP passive dongles */ sink_caps->signal = dp_passive_dongle_detection(link->ddc, - sink_caps, - audio_support); + sink_caps, + audio_support); } return true; -- 2.25.0