From: "Arnd Bergmann" <arnd@arndb.de>
To: "Michel Dänzer" <michel.daenzer@mailbox.org>,
"Arnd Bergmann" <arnd@kernel.org>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>
Cc: "Alan Liu" <HaoPing.Liu@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Wenjing Liu" <wenjing.liu@amd.com>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"George Shen" <george.shen@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Dave Airlie" <airlied@gmail.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap return code
Date: Fri, 16 Dec 2022 13:38:45 +0100 [thread overview]
Message-ID: <f7900514-15d1-4da8-a330-ddd2d68a426e@app.fastmail.com> (raw)
In-Reply-To: <dc11c746-7d06-4b9f-ddc4-9b8e72297e3f@mailbox.org>
On Thu, Dec 15, 2022, at 18:56, Michel Dänzer 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 = link->dc->caps.vbios_lttpr_aware;
>>
>> if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
>> - return false;
>> + return DC_OK;
>
> return status;
>
> seems more appropriate. (Otherwise the status = DC_ERROR_UNEXPECTED
> 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 = DC_ERROR_UNEXPECTED;
- bool is_lttpr_present = false;
+ enum dc_status status;
+ bool is_lttpr_present;
/* Logic to determine LTTPR support*/
bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
- return false;
+ return DC_ERROR_UNEXPECTED;
/* 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
prev parent reply other threads:[~2022-12-16 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 16:37 [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap return code Arnd Bergmann
2022-12-15 17:56 ` Michel Dänzer
2022-12-16 12:38 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7900514-15d1-4da8-a330-ddd2d68a426e@app.fastmail.com \
--to=arnd@arndb.de \
--cc=HaoPing.Liu@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@kernel.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=george.shen@amd.com \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michel.daenzer@mailbox.org \
--cc=sunpeng.li@amd.com \
--cc=wenjing.liu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox