Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp336782ybf; Wed, 26 Feb 2020 14:09:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzzMEj7Fk0u3+mrjqG9ejV8XbIY4qr3kpR81tlx2gacZN0RkMATv7jqqgC91/lFHCzlDrzE X-Received: by 2002:a05:6808:658:: with SMTP id z24mr955450oih.91.1582754986019; Wed, 26 Feb 2020 14:09:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582754986; cv=none; d=google.com; s=arc-20160816; b=aK5ngX1Sd1KgM6ka49QeT6EheUjmic24CuV9fCEP3vOlqILCEs7RrMv4Zi3PJDlDeW oAEAFW9hnmw6goIS1tZXjSvFwNQ85NPzf9Rz4RXydjmVhLHaun5sTjZ+JaAEPEwo9uRe 8HZy/RCLS/APW9aWXf4GjPgCtd/7vBvVyS35iQymFziink2OxuKNnhENqGxoRFX8sFX2 eRFf3UV0cr/7TJHXLvAwmQcdHTaUFJmapP25bgCrS5vc55BQXhQd6357e5apOP/Skgal dKOkkYwhrUxT/SR4Y5rJGQaHq4q8l9AUjDiUxroUA4h/2JUXbnpjQpJfBeqTiMB1N3qz nF3A== 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=jp59utgfg7BcBD4RiJuNr7SC9meFZCk4nKcHVjkdN50=; b=UBXA/xxfBPMFCE9WSvhw0fQGAwzhtjhbWdSHto736qYnQYhi8L7A3rD3yrCVk+e7bP 7xt+4Qa+OBRv7gYYC7d8czSRT9oZR7JQp2srVxZvKyQFM5a+NY64X762PYJSdM7ubOwl x1NS7xoaNcrZib0sncjy7gFjLsmBbLcYLxGtt1thsEGituOL2IuZXQzxiTD61eln1lbf 9KuzeXNab00nAIanYkQqakfUgHreptfJKOEdge1BLsOUhMSfTAXmpFFPQbEp/4XbnrZ+ q+D1sJGmcWPehxfNuoQHv03UPpLRQOdjv0uv4vn/qcklGUi7JVOv1iSPOxgAbeypoE9k Zv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qz9P+oGn; 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 m9si294849otq.304.2020.02.26.14.09.33; Wed, 26 Feb 2020 14:09:45 -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=Qz9P+oGn; 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 S1727889AbgBZWIc (ORCPT + 99 others); Wed, 26 Feb 2020 17:08:32 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:41324 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbgBZWIb (ORCPT ); Wed, 26 Feb 2020 17:08:31 -0500 Received: by mail-ed1-f66.google.com with SMTP id c26so682451eds.8 for ; Wed, 26 Feb 2020 14:08:30 -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=jp59utgfg7BcBD4RiJuNr7SC9meFZCk4nKcHVjkdN50=; b=Qz9P+oGnzpRBIGm+tjDYqC7KUbkMLXzwKCqJyVX6pWiKSNOtpN4SEQi4/jqWDfUrkD 6gBbvmkX5kEHf4Dj1xuaNM0jHKaLdHYAYGygGRIpDNDzFQgi7+dhWPJ5t6l9rq+YAl2m XLwFkKZeAEuDbWlqESft9qhr3/p6MaG1X6OdmxGyeNsLxq/oUJuNfpO1HKSPqJqPLE5L qBUpjtgFU3f31/dvTtaC41DwPGURuN3jwmtnWFPo6zrUPmB1G0eakN/UKjJkU1fwhqTM jKBBf2JVTR9PA0bWpAlVvwzINzPTxzYPDKR8K/XwoJTfY14Nf0GKdWv+4jWmyyKafSKs ly0g== 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=jp59utgfg7BcBD4RiJuNr7SC9meFZCk4nKcHVjkdN50=; b=P0RpSMNMKGpCafkU2Vg8Ax2RGpnMoRWXQSUjh/4JOdLhIu5yRIEyb5q+McHVp3wD9G 5OUxJVPLuEXcAkbHja2cgwrCS/MIFpFUF3eltYLjOLETk8+T9T4Z3wAatiiHnleKP7bP jthMBWqpoHGAe+pO+88Q7MIA7hMhqOWNSTbk7qttWXczb4SlZvYmrCDgR7WdtYLhWruV 3GHGge4+Yi5WdVBn94fOgtip/NShDDSVk9JVSTVncF0lgOCJGQKKcsjT+MxybzTr62L2 lNuJfmS803wstSPFuE9dzoGhDbj3iymzCGGtEBg8CKyxhF+vyNjG3NfcL5lfdofS69kf iNwg== X-Gm-Message-State: APjAAAUB70gkitfzLmh2vSxhyNoX0pJDOsae3c2XA497WwqqjX0IjCqq t3L0iuIWEh6jndOCZ1wJ+SQ= X-Received: by 2002:a17:906:55c1:: with SMTP id z1mr790598ejp.288.1582754909801; Wed, 26 Feb 2020 14:08:29 -0800 (PST) Received: from smtp.gmail.com ([2001:818:e238:a000:51c6:2c09:a768:9c37]) by smtp.gmail.com with ESMTPSA id q7sm232033edr.34.2020.02.26.14.08.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 14:08:29 -0800 (PST) Date: Wed, 26 Feb 2020 19:08:22 -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 2/2] drm/amd/display: dc_link: code clean up on detect_dp function Message-ID: <9961afca2cf831ac688025a63b7cd35dd0908fac.1582752490.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 0f28b5694144..adb717f02c9c 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); @@ -606,9 +606,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 @@ -637,13 +636,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; @@ -651,7 +647,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) { @@ -662,14 +658,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