Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2658295rwb; Fri, 16 Dec 2022 05:05:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf7fadb7J3cYeqaGw8AwXp3Yhlrrdeel4DM8FNxCFtI94/+wKJvi8eAobGWrClrb3GhM6gcU X-Received: by 2002:a05:6a21:9103:b0:a3:9aa3:c060 with SMTP id tn3-20020a056a21910300b000a39aa3c060mr46692389pzb.53.1671195958173; Fri, 16 Dec 2022 05:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671195958; cv=none; d=google.com; s=arc-20160816; b=AGpnAq02t0nLPY8fQ1qXY+iV9tLtQU19nMMxJllHzakFMCVl+p8NUjLd7l+0x/IB+6 R7vtjuiS3/L4GqdPXO0mElWdlDqTpvrrRPjpQQ1Yhmr5IL1i7/WEZbfNKmVz4knOyDJn TO0fHo0iYevuIYQWzWZBx1Lhmu8EFuWiqMmt7hYzD2EBmerK/9ul+FhJ3wenU3CKvTSh neMCE9efXRlDSdRfczBRA3ujeUZaVN/KB6qaN6/Af/iQDJsn8XicY/wScN++OrGMyIdk IPV1ZYUbZVjW9AuD2Yfi+HICsccO9aKmnEoBaAgDCCjmIMAuFDNhKKEi9XmOX9/9Fjcj ulTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=v13bQYs2n+9QBeyAU8UmiJ8+cb8v3Ev1Pl4Y5TMgwH8=; b=bVNeDTW6GpN+GV7aVVXkV8rDW75A7xnl7gzcERliKZbaqxz23sRY3VanfCIsa8JGpc LLEV6P6K+w+0ONacoJ086ywjS+wl8xRpBhIbVoPW4aqWuow1J6w7+CiScpry/rzMgCFX dmXokLBZaNQjuaEKTWVuyjHQ7qJpKsDdRsc+Ugv5h8asTcpEHRbIOkYiR1bpK/aDMGfA LQDWPEtbdjAkOb2egRo8LcH8HC+OnlCtqeDf4C+Vu6IENXkHwV7NXH4+9MZ7/srdFLFJ ewMVyg5aBTHD+q90A1HnKagkCOOo7WprYhJNLo4W/XZC5XOj8NrWWyyhsj0JEspDIXoQ Kz3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=jJWqk0tx; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mHgb8DPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a633604000000b0043aebb63fc9si2546886pga.732.2022.12.16.05.05.48; Fri, 16 Dec 2022 05:05:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=jJWqk0tx; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mHgb8DPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbiLPMjL (ORCPT + 68 others); Fri, 16 Dec 2022 07:39:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbiLPMjI (ORCPT ); Fri, 16 Dec 2022 07:39:08 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED19C13CEC for ; Fri, 16 Dec 2022 04:39:07 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 6A85E5C0105; Fri, 16 Dec 2022 07:39:06 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 16 Dec 2022 07:39:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1671194346; x= 1671280746; bh=v13bQYs2n+9QBeyAU8UmiJ8+cb8v3Ev1Pl4Y5TMgwH8=; b=j JWqk0txtOZiWrct3dFGDcC8TKG/oDmLBuOKg6EIjKEsjbVbg+G2PtnYjB6HdPr8a MxyBCzENdMTWO6xZHX/kgTovst5huAAzoVbSzfHyXPe2VsTrOkGBU9yniekm+a60 w0dLJM28NpxvV8EtX1aJ32hX4sDiT0SUrDa8avXUN4d9GkfS+NAeyn9uGad5yGjy JgrhTbBJdV2TJBdNrS1hvUryYN5AT9SORGTMHcZRSgPyRG9PcRz2tMsXSdOK96ZQ B7Ty0cstN06W+wUh+o+0/6Vn3u37Z6q0woQwJ0K0LRIFITsiozwjo66h6TgCZPd8 r1BbDwmRoZhEyQJE86V9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1671194346; x= 1671280746; bh=v13bQYs2n+9QBeyAU8UmiJ8+cb8v3Ev1Pl4Y5TMgwH8=; b=m Hgb8DPVRCUzX12DLRvXbjCCMspLJ7JLst+KQ1gV0ELEV+J4Hoqv88Wt0gQtnH9UN WzrvBYBVW8LzTNunP1+IFiVlJxMDKhkWAQRSrzOBXvYwh0lotKvBMzVI5fAmzmyX H+UklUgSVhiiQHHSdb9OfAl8XLO4nJpXlD4uhYR4bjv3tJejJpiCaozsTJT4nKaz HT8zNabF6Y8Z6Cb6oXJz+/0/uweYGpy4YHt2XdP65CkA8Kdae9PUXZDbCJzYH8fo tY4SPqMEmraS3AtXCJkmh6UxNbWURJaBCcLeTxJmacNSIOXs07jVzkUrZTaP/q8T W8ccgyDBkpXrSIkRPOzLg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 24D2BB60086; Fri, 16 Dec 2022 07:39:06 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20221215163743.452648-1-arnd@kernel.org> Date: Fri, 16 Dec 2022 13:38:45 +0100 From: "Arnd Bergmann" To: =?UTF-8?Q?Michel_D=C3=A4nzer?= , "Arnd Bergmann" , "Harry Wentland" , "Leo Li" , "Rodrigo Siqueira" Cc: "Alan Liu" , "Pan, Xinhui" , "Wenjing Liu" , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, "Daniel Vetter" , "George Shen" , "Alex Deucher" , "Dave Airlie" , =?UTF-8?Q?Christian_K=C3=B6nig?= Subject: Re: [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap return code Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2022, at 18:56, Michel D=C3=A4nzer wrote: > On 12/15/22 17:37, Arnd Bergmann wrote: /amd/display/dc/core/dc_link_dp.c >> index af9411ee3c74..95dbfa4e996a 100644 >> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c >> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c >> @@ -5095,7 +5095,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_= link *link) >> bool vbios_lttpr_interop =3D link->dc->caps.vbios_lttpr_aware; >> =20 >> if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_su= pport) >> - return false; >> + return DC_OK; > > return status; > > seems more appropriate. (Otherwise the status =3D DC_ERROR_UNEXPECTED=20 > initialization has no effect) Ok, makes sense. I'd also remove the unused initialization in that case though: enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link) { uint8_t lttpr_dpcd_data[8]; - enum dc_status status =3D DC_ERROR_UNEXPECTED; - bool is_lttpr_present =3D false; + enum dc_status status; + bool is_lttpr_present; =20 /* Logic to determine LTTPR support*/ bool vbios_lttpr_interop =3D link->dc->caps.vbios_lttpr_aware; =20 if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout= _support) - return false; + return DC_ERROR_UNEXPECTED; =20 /* By reading LTTPR capability, RX assumes that we will enable * LTTPR extended aux timeout if LTTPR is present. I'll send that as a v2 once that passes my build test and nobody has further suggestions. Arnd