Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1423447ybf; Thu, 27 Feb 2020 10:41:51 -0800 (PST) X-Google-Smtp-Source: APXvYqx0w+Rbr1dvHK0EfD+7TtqxhM87HQVxSIVX0ej9k24+bdYJGc+plDBK6KfXE0gSMYO1rtA3 X-Received: by 2002:aca:cdd0:: with SMTP id d199mr305541oig.49.1582828911569; Thu, 27 Feb 2020 10:41:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582828911; cv=pass; d=google.com; s=arc-20160816; b=bQlCyxzGARlkDFwyT1gCajgsI7iDrck0RQmBANyDnqHONK0Tr5bx+ETcXIWiAJokVF 89dIJTuDpPJnwXEVVd7BrGp655YEEiBaKk+RjS6wbX2HSsIZMffU7zHLJnm8MR33T93m Uy0Xry3IJshyOUFHerQbW/iJbFyqSS+tKdFLKCPg6tvsBMMqF0UedoGhkgii0iTFbHBs 8ABqlrBo1EQDnNTaHx0eA5LCrKbN/zO09W8sl3wHLMEwqnd+B6QLQD1p8vREWwEy7KD+ flT+CqIRGv2uYWvF4HgAl24yXk5Lw8cnBJy8kfRvqJFgPFwxEn4exlkQSCc8v64pWBiL F01Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=yWY4Qn/AncWMBA5E6UFXYOALsk9E+ny1HtSj0yxsxYo=; b=m2cAPHC3OlVBTxyNbmU6+bwRi8065UtQxuUQdHNQyQwNAQbOstSz4QuRfa8UWFrFfP tBauppLxHOviSvyf8Qm1sW1klWK8+VqoUMtbZrL7Livu2n6FhODAigjdlPrkiSJ+SC8z dzxb1NUHsDoC6/YN4u8JoZvyp6s/hEMcmoXtUBk8KVFQpmCK4AlTKKRSsE12leTr9CeP 5uDSZMipdmMwgg6giSSoFKpML/cpL2iWvCwM6+xiynMHsWw/9xcxnx30HlBC8yJKMPju APAQE+ZnYQSIzuXY3CcbP7YpEJHpwlY1z0pN3M8okzqAz8YDrO0F6tQ5LDHVfUiTbpb1 RUSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b="vuPuo/ff"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si37658otp.79.2020.02.27.10.41.38; Thu, 27 Feb 2020 10:41:50 -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=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b="vuPuo/ff"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729657AbgB0Sj5 (ORCPT + 99 others); Thu, 27 Feb 2020 13:39:57 -0500 Received: from mail-eopbgr750049.outbound.protection.outlook.com ([40.107.75.49]:23660 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729172AbgB0Sj5 (ORCPT ); Thu, 27 Feb 2020 13:39:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RxaLZAsdRw8u3TpEAdhNrRgDFyfTVW+cu1nuo/IQew7t9rRAGqFngKKlkBwTiGaDS95IGbOcD4969/+lKbfUJ+pJ8AL2HxQrL9/JWmeQz7G1PsgbSFgVGdAdoLlpWF2wWk3IodYFQBEnal6q/4EGcQX+ROn9gaRd78jZiwDjt1STHNL+nspQSlprQvtPxgKUF2a29O/nxlc8Bgko7rDrdhp7xB79wp6gNdY7ZsmOmTksPnjJJDbE62lKEWOw6qFnCdGTaFVqPTdSKcPCi6m6hKqh0lRT7vaJaFgtZpk3FxFBm8c4OLerTCZY7xC443Twvbfo6GxJHkaLzr/VLgvZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yWY4Qn/AncWMBA5E6UFXYOALsk9E+ny1HtSj0yxsxYo=; b=CObGpb4FfMct0lWrY8sDe7fv9PAit1ecqvUPQHrTZUQmqdBrCuB+m0ONurat/4HqUhSQeNH/CnAgvYUWyuqcRl//f2DJWAvgTEeGvCyO61rZoBIhzBQJBogUfjUBLU0zFcO/MsofvE0zH8499ylRv/BnwUICvTjO4DTmfxhwvAbytay24eDytViCUZpMDIuxVMn426NuTlCHVvkn7GeSbK6cimZ/U4uj84w5SVHBHsL+VgkcKly6MNVJpuYlhuroQ9V1u9XTRquMTGXqZk4HXCV1FYPYOSP9X0TrE29CshA12H90FxJfvc/MlYDL5aUqavRy/Qbd42HoWKFp+LVQTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yWY4Qn/AncWMBA5E6UFXYOALsk9E+ny1HtSj0yxsxYo=; b=vuPuo/ffMmpyTF6P470o3Rz+yR9lfnDDkL9Xi1Qz6DGad+qKAMHl8JIQ72w6asRLXwLJoiLnCr/pRYKRWmEByShyhUEmUs10i0s2p659np1kgLCK+cfYiqYahRXqHLnSZXBIle04ir+qrja6PWg//MPK0dWynTevCI83u+V9I4E= Received: from DM5PR1201MB2554.namprd12.prod.outlook.com (2603:10b6:3:ec::14) by DM5PR1201MB0090.namprd12.prod.outlook.com (2603:10b6:4:53::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Thu, 27 Feb 2020 18:39:52 +0000 Received: from DM5PR1201MB2554.namprd12.prod.outlook.com ([fe80::c4c:bafd:5833:2b51]) by DM5PR1201MB2554.namprd12.prod.outlook.com ([fe80::c4c:bafd:5833:2b51%5]) with mapi id 15.20.2750.024; Thu, 27 Feb 2020 18:39:52 +0000 From: "Liu, Zhan" To: Melissa Wen , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Deucher, Alexander" , "Koenig, Christian" , "Zhou, David(ChunMing)" , David Airlie , Daniel Vetter , Rodrigo Siqueira CC: "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 2/2] drm/amd/display: dc_link: code clean up on detect_dp function Thread-Topic: [PATCH 2/2] drm/amd/display: dc_link: code clean up on detect_dp function Thread-Index: AQHV7PFJrzsxO38xA0qqdJAhaAZqgqgvYCNQ Date: Thu, 27 Feb 2020 18:39:51 +0000 Message-ID: References: <9961afca2cf831ac688025a63b7cd35dd0908fac.1582752490.git.melissa.srw@gmail.com> In-Reply-To: <9961afca2cf831ac688025a63b7cd35dd0908fac.1582752490.git.melissa.srw@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Zhan.Liu@amd.com; x-originating-ip: [165.204.55.250] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1bb0ce8f-e298-4c0f-1df5-08d7bbb46e9f x-ms-traffictypediagnostic: DM5PR1201MB0090:|DM5PR1201MB0090: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 03264AEA72 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(39860400002)(376002)(136003)(189003)(199004)(33656002)(8676002)(7696005)(6506007)(53546011)(8936002)(26005)(71200400001)(186003)(81166006)(81156014)(86362001)(5660300002)(66476007)(66946007)(64756008)(478600001)(55016002)(54906003)(66446008)(9686003)(2906002)(76116006)(52536014)(316002)(4326008)(66556008)(110136005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB0090;H:DM5PR1201MB2554.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KueMbd/X8Fe42GD1GbuaHc2roumK0mGhXeroDmhabiA8Yf3frUn36qHCxUtW8BAFfnBm8LU834JFYlf+SQ60p/r2xvu/1C3adNc9m8BV/mmvkHvo+rRJQuCppBP29RnWkZyDRT/8m9v59OqPeCh5SLl678NN+UwTkfPrxEHn3bDLipxfERVu0xLSrPrHar0wEi6wzr2PenmOem/dAYAxjhtE4AvuYPtPHiFdLd0knLdf7J5J3dgi5HfCzGI6XzSUfwWkZMSVOmIHS5PK4G6XrAhgxeP6r8ZeTus4o+ZWJJ3WrzEWWoyMx+5YNZUdjCBdLAJVz7K/0OBrNUNjCIjD9fn2XfxqBKTecdGAInh8pR5tYR2YocQ8eQGS/ptUB0qKhHa4UaMfhFcnUIh9qKWiAzH8yoZ0Agp8KJJXfgg3WeluDuj36y8NuGgCNYzHNY21n9LOD6zqu+BkZc6QhKcv40oC/GcAxiGRztotcV/VjzF/SKpxV0dsgR4yquRw92qC x-ms-exchange-antispam-messagedata: t0KnXG6PtfvPkTJrAaBEd82HRqI5qUoIOqXRSpYy7T1sGH7+KFNnJGtOWefipgpswaeLm8mdWd3q16koBsVxffgtnTt03uHkx6WzTfI75I4HVxX5YrQE2yW35Nt1Jha4tg7nAzRXKt1QvXU2DpWjbg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bb0ce8f-e298-4c0f-1df5-08d7bbb46e9f X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2020 18:39:51.8954 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vbvX29cIn9n3J+/a/Xx2pFFtw1vzd/D2U/sBx7dThZ6YaiuE+ZyN4UKrFBCqiu+h X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0090 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: amd-gfx On Behalf Of > Melissa Wen > Sent: 2020/February/26, Wednesday 5:08 PM > To: Wentland, Harry ; Li, Sun peng (Leo) > ; Deucher, Alexander > ; Koenig, Christian > ; Zhou, David(ChunMing) > ; David Airlie ; Daniel Vetter > ; Rodrigo Siqueira > Cc: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; linux= - > kernel@vger.kernel.org > Subject: [PATCH 2/2] drm/amd/display: dc_link: code clean up on detect_dp > function >=20 > Removes codestyle issues on detect_dp function as suggested by > checkpatch.pl. >=20 > 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 >=20 > Signed-off-by: Melissa Wen Thank you Melissa for your contribution! Will apply it. This patch is: Reviewed-by: Zhan Liu > --- > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 35 +++++++++---------- > 1 file changed, 16 insertions(+), 19 deletions(-) >=20 > 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; } >=20 > -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 =3D false; > + > sink_caps->signal =3D link_detect_sink(link, reason); > sink_caps->transaction_type =3D > get_ddc_transaction_type(sink_caps->signal); > @@ -606,9 +606,8 @@ static bool detect_dp( > sink_caps->signal =3D > SIGNAL_TYPE_DISPLAY_PORT_MST; > link->type =3D dc_connection_mst_branch; >=20 > - dal_ddc_service_set_transaction_type( > - link->ddc, > - sink_caps- > >transaction_type); > + dal_ddc_service_set_transaction_type(link->ddc, > + sink_caps- > >transaction_type); >=20 > /* > * This call will initiate MST topology discovery. > Which @@ -637,13 +636,10 @@ static bool detect_dp( > if (reason =3D=3D DETECT_REASON_BOOT) > boot =3D true; >=20 > - dm_helpers_dp_update_branch_info( > - link->ctx, > - link); > + dm_helpers_dp_update_branch_info(link->ctx, link); >=20 > - 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 =3D dc_connection_single; > sink_caps->signal =3D > SIGNAL_TYPE_DISPLAY_PORT; @@ -651,7 +647,7 @@ static bool detect_dp( > } >=20 > if (link->type !=3D dc_connection_mst_branch && > - is_dp_active_dongle(link)) { > + is_dp_active_dongle(link)) { > /* DP active dongles */ > link->type =3D dc_connection_active_dongle; > if (!link->dpcd_caps.sink_count.bits.SINK_COUNT) > { @@ -662,14 +658,15 @@ static bool detect_dp( > return true; > } >=20 > - if (link->dpcd_caps.dongle_type !=3D > DISPLAY_DONGLE_DP_HDMI_CONVERTER) > + if (link->dpcd_caps.dongle_type !=3D > + DISPLAY_DONGLE_DP_HDMI_CONVERTER) > *converter_disable_audio =3D true; > } > } else { > /* DP passive dongles */ > sink_caps->signal =3D dp_passive_dongle_detection(link->ddc, > - sink_caps, > - audio_support); > + sink_caps, > + > audio_support); > } >=20 > return true; > -- > 2.25.0 >=20 > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org