Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1429151ybf; Thu, 27 Feb 2020 10:49:26 -0800 (PST) X-Google-Smtp-Source: APXvYqygftQXygqwZ5n3EFPm3SLbDLC2e8T151ta0pWufmSypaGldPPw795ttfdh4mxzFRDzLGo9 X-Received: by 2002:aca:4b0f:: with SMTP id y15mr280913oia.153.1582829365913; Thu, 27 Feb 2020 10:49:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582829365; cv=pass; d=google.com; s=arc-20160816; b=iAWXS7qahyrWZZ46C0UQm2OpKFBRaP/vdnLoiAaQ1ofL/PCa5NHjSHxV7FquPE+60D OdQ/TD+naL5GVqSv8gnKwDrK1+nJQQkNruvy1BxFd7v/7Fb6jmIzfie2AUIBfMZpkUe3 GTpYET9wfSognieZSL9d8TqtGKIDApzMkUid9MpfCe/o89mVsT6n+bg3qkxTyPYyk0QO nIJRyD60E05iJYZRgU4LpIPUnVGtLkDUBYSb0iR6LBFErloy38wtPUybuDX8E8EQYHVn DVgCVp2YOkXHiZmTVTHMBShvgJG0jzoHngXxFd3VFX0LwB4C7aTJ/t6BqEQyMDvz/nqM fbHQ== 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=AqAmKewSwjbt4PpcORodUeg5KR8XOhPiQyAVZR+Z3RY=; b=Cmu/WUAjv/g52Sph2n0AVMLQtAdo5KDeQ9e37luQ8x/cFhevaBOz05udNzYdilIeRW RAdbgEdkr3N7v7MWwEpAuNE5xL75HMTGmXA45wKzp5C4Fk253KrDqZORR4LPswmFpRLQ J4L8mfmbn2LXWK2v/BCIl0ubydvukkGg6LojeXdhfV7lpCFr5k47YY4x4UkVrYkkTd2q 2plPoNE0m86UDsF7PdCMW5OTYkmSleuwPHQi37E2FtgwO/gCIkbAkREHm8alprBR97ZY aUBclnbJPj827729VzAMy3zjLW6caxaZ6NMflbQZhASxsME1jPnq+BDI3//RVcnLMO4K WrGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=4ESLdAcS; 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 e7si29663otp.260.2020.02.27.10.49.11; Thu, 27 Feb 2020 10:49:25 -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=4ESLdAcS; 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 S1729798AbgB0Sso (ORCPT + 99 others); Thu, 27 Feb 2020 13:48:44 -0500 Received: from mail-eopbgr750055.outbound.protection.outlook.com ([40.107.75.55]:1598 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726805AbgB0Sso (ORCPT ); Thu, 27 Feb 2020 13:48:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XRbedbXKK7VV/dOhuywAHuO7PMDsYjf5rmAxkggoOp7yp7WcVp1qhVXPbzF0w+knqTq6KNAl5u1pxHOIqHePEqGiVT/eE/DJ79qPbn6EvFHpFZECqkb2L9VYlY82s7ezILKwF+O/13sOQi1kHUdAMqY+62JWLyBv84Lu37jRgRTauKcoDmr07ahyFoElzTRsrUaaV3zuEQereDYl66soKO4kCGjqgEBmr02l9F5KcFgs/7nSNPvAE3qGQagED1rIN8CKgUnRYs3uRM3ryO1UUzne8/fx2Fx4bcXHS0YjQnq/ZEjnC3+vtruJoIQV0I0FU3vWPI31AdbHAOBEO2E4bw== 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=AqAmKewSwjbt4PpcORodUeg5KR8XOhPiQyAVZR+Z3RY=; b=NQ1JMFtLqd+B1VjSj26ppWdYUMmQxAZ0OJBniD+UfLBhAiqsofdhyJGEPURgfArWmAFw97l7Z8P+eKx9IPL92Pyq1qzYeTs6Uf6WetfjzK/VMzRQexpiQT8T7OjBZhZMVHAyuB2rI5Ur6X9FiJZGi4cBEgeEC7QGtYFLvSUo1P2VtpP6kwSTwTO+mZUKYYni+tKxVYfEdFvAZLoImLRqQORYo9UG5TjTP5K1vn+o/GRgoYYjcUetlvs7BbLpuIkhursD7PQ7dCqZG5Ckn3nhFYRhlAK/u1Wju8f5exjDqVyzUsXpEg3/IYamvVUdSJnl+o+Dsa3YUvkBSUXBov/nlQ== 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=AqAmKewSwjbt4PpcORodUeg5KR8XOhPiQyAVZR+Z3RY=; b=4ESLdAcSfoPYT7IOYzyQrmVzCSBcUZQ/9KZaYbKoHoPcRb7lIZ81hL8ASx73BLyrjtO5r5HQJCOdssFxaxcOnZH23n1lUGxEJYb0V3ze1vbHvlmBPYnIaMChvGo6F9zf1sJs5szWvYiTLAfCB/X58hhFKZYBuesBN+SYbb9H7+w= Received: from DM5PR1201MB2554.namprd12.prod.outlook.com (2603:10b6:3:ec::14) by DM5PR1201MB0268.namprd12.prod.outlook.com (2603:10b6:4:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Thu, 27 Feb 2020 18:48:41 +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:48:41 +0000 From: "Liu, Zhan" To: "Liu, Zhan" , Melissa Wen , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Deucher, Alexander" , "Koenig, Christian" , "Zhou, David(ChunMing)" , David Airlie , Daniel Vetter , Rodrigo Siqueira CC: "amd-gfx@lists.freedesktop.org" , "dri-devel@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: AQHV7PFJrzsxO38xA0qqdJAhaAZqgqgvYCNQgAACWBA= Date: Thu, 27 Feb 2020 18:48:40 +0000 Message-ID: References: <9961afca2cf831ac688025a63b7cd35dd0908fac.1582752490.git.melissa.srw@gmail.com> In-Reply-To: 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: 7ba8a28e-6fad-4170-c0bf-08d7bbb5a9e9 x-ms-traffictypediagnostic: DM5PR1201MB0268:|DM5PR1201MB0268: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 03264AEA72 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(396003)(376002)(39860400002)(366004)(346002)(189003)(199004)(186003)(6506007)(26005)(478600001)(54906003)(71200400001)(53546011)(316002)(2906002)(7696005)(86362001)(110136005)(33656002)(5660300002)(8936002)(81156014)(55016002)(66446008)(76116006)(9686003)(64756008)(4326008)(2940100002)(8676002)(81166006)(66476007)(66556008)(66946007)(52536014)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB0268;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: iINNV0Q+VopZhRro/fEQqb47khKedVA8pG841HndeRa9AD7XA+u1jgLDkTG9e6z3DAVxvI86BMAeQz6RMKYrLdP2GkON87OZ62qOCQ6pjsxQIRG1oENa408tbHYIdx6zfDW60NE7hOmJtwqs5LhD8koZ8FZqtbvwZws2XPPCWNqncu/Q5qo4tYOD0FXLUCxFz1ileyhNVklTr0TGKcqzm3tAkBfiH49OMZvAByYXSZHhI3g3+CJWAtB/9//NkY8qjuBEQf/xwG4H9x8kIJupEjHngIar+/9Dp0cwHb3ocjEcjFmNAItEhWJqwFUOHRPk3hAvqeYiGMyio3XGNajIwQsCZalkgdIqYwQ6I3lfHQ530A5KSpnFgp2QBqdMweHWcB65ScwPWU2I8QqQBQlD5lz0tOR8Ylnjq1q9LhRVerr6N9a1zUCODlFY8FJ4RzgDSiKJ5vIA/m/8kCUY7UpALe/Sxa1sKkVjIk9E/9R+7+vmf9jwgT9i+WNf99uFzG/T x-ms-exchange-antispam-messagedata: 5adomc7QC6AQtvxXs9vuH+rf/MSPpCb4Faa7kCkvE7cx/6FwZYSxwOmOuen0AN3F+xNjHI5Vluf8+blsUB9N0q8xTSQTUvZpM+r0olJBYIMrcLkqsWjd44gk3IuB654J9qcuV6Q6e4CJQZ0cZR5I0w== 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: 7ba8a28e-6fad-4170-c0bf-08d7bbb5a9e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2020 18:48:40.8878 (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: B0fO4DYjp3h9J/j75ZIXZQICPmgl+xWQn3DfiNRPDTK2kTMOg1J8LBQ+ZSU8GS+f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0268 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 Liu, > Zhan > Sent: 2020/February/27, Thursday 1:40 PM > To: Melissa Wen ; Wentland, Harry > ; Li, Sun peng (Leo) ; > Deucher, Alexander ; Koenig, Christian > ; Zhou, David(ChunMing) > ; David Airlie ; Daniel Vetter > ; Rodrigo Siqueira > Cc: amd-gfx@lists.freedesktop.org; dri-devel@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 >=20 >=20 > > -----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 > > > > 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 >=20 > Thank you Melissa for your contribution! Will apply it. >=20 > This patch is: > Reviewed-by: Zhan Liu Sorry I didn't see Rodrigo already replied your email. Please send us a V2,= then we will review your V2 patch. And again, thank you so much for your contribution! Zhan >=20 > > --- > > 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 =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; > > > > - 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 =3D=3D DETECT_REASON_BOOT) > > boot =3D 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 =3D dc_connection_single; > > sink_caps->signal =3D > > SIGNAL_TYPE_DISPLAY_PORT; @@ -651,7 +647,7 @@ static bool > detect_dp( > > } > > > > 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; > > } > > > > - 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); > > } > > > > return true; > > -- > > 2.25.0 > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org