From: Rodrigo Siqueira Jordao <Rodrigo.Siqueira@amd.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Chao-kai Wang <Stylon.Wang@amd.com>,
Alan Liu <HaoPing.Liu@amd.com>,
Sunpeng.Li@amd.com, Bhawanpreet.Lakha@amd.com,
qingqing.zhuo@amd.com, roman.li@amd.com,
amd-gfx@lists.freedesktop.org, solomon.chiu@amd.com,
jerry.zuo@amd.com, Aurabindo.Pillai@amd.com,
Nicholas Choi <Nicholas.Choi@amd.com>,
hamza.mahfooz@amd.com, wayne.lin@amd.com,
Alex Deucher <alexander.deucher@amd.com>,
Nathan Chancellor <natechancellor@gmail.com>,
Harry.Wentland@amd.com,
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: Re: [PATCH 16/31] drm/amd/display: refactor function transmitter_to_phy_id
Date: Mon, 20 Jun 2022 11:32:41 -0400 [thread overview]
Message-ID: <b194ebb6-8437-a5f2-fe97-e9cef74f7188@amd.com> (raw)
In-Reply-To: <YqzbVxByDw1xSdXb@dev-arch.thelio-3990X>
On 2022-06-17 15:51, Nathan Chancellor wrote:
> Hi Rodrigo,
>
> On Fri, Jun 17, 2022 at 03:34:57PM -0400, Rodrigo Siqueira wrote:
>> From: Nicholas Choi <Nicholas.Choi@amd.com>
>>
>> [Why & How]
>> Since we only need transmitter value in function transmitter_to_phy_id().
>> Replace argument struct dc_link with enum transmitter.
>>
>> Reviewed-by: Chao-kai Wang <Stylon.Wang@amd.com>
>> Acked-by: Alan Liu <HaoPing.Liu@amd.com>
>> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>
> How did I end up in the signoff chain for a patch I have never seen up
> until this point? That should definitely be cleaned up.
>
> Additionally, this commit message doesn't really seem to line up with
> the change. It says that "struct dc_link" is being replaced with "enum
> transmitter", when it is really the reverse, and that only the
> transmitter value is needed, which is already the case, right? I guess
> this is so that you can use DC_ERROR(), which requires a dc_ctx
> variable? It is not immediately obvious from the commit message so that
> should be clarified as well.
Hi Nathan,
Thanks for reporting this error; it looks like our scripts have some
issues. I'll take a look at that.
About this patch, I'll drop it.
Thanks
Siqueira
> Cheers,
> Nathan
>
>> ---
>> drivers/gpu/drm/amd/display/dc/core/dc_link.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 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 43b55bc6e2db..58882d42eff5 100644
>> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
>> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
>> @@ -3185,8 +3185,11 @@ bool dc_link_get_psr_state(const struct dc_link *link, enum dc_psr_state *state)
>> }
>>
>> static inline enum physical_phy_id
>> -transmitter_to_phy_id(enum transmitter transmitter_value)
>> +transmitter_to_phy_id(struct dc_link *link)
>> {
>> + struct dc_context *dc_ctx = link->ctx;
>> + enum transmitter transmitter_value = link->link_enc->transmitter;
>> +
>> switch (transmitter_value) {
>> case TRANSMITTER_UNIPHY_A:
>> return PHYLD_0;
>> @@ -3213,8 +3216,7 @@ transmitter_to_phy_id(enum transmitter transmitter_value)
>> case TRANSMITTER_UNKNOWN:
>> return PHYLD_UNKNOWN;
>> default:
>> - WARN_ONCE(1, "Unknown transmitter value %d\n",
>> - transmitter_value);
>> + DC_ERROR("Unknown transmitter value %d\n", transmitter_value);
>> return PHYLD_UNKNOWN;
>> }
>> }
>> @@ -3331,7 +3333,7 @@ bool dc_link_setup_psr(struct dc_link *link,
>> psr_context->phyType = PHY_TYPE_UNIPHY;
>> /*PhyId is associated with the transmitter id*/
>> psr_context->smuPhyId =
>> - transmitter_to_phy_id(link->link_enc->transmitter);
>> + transmitter_to_phy_id(link);
>>
>> psr_context->crtcTimingVerticalTotal = stream->timing.v_total;
>> psr_context->vsync_rate_hz = div64_u64(div64_u64((stream->
>> --
>> 2.25.1
>>
>>
next prev parent reply other threads:[~2022-06-20 15:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 19:34 [PATCH 00/31] DC Patches June 17, 2022 Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 01/31] drm/amd/display: Remove compiler warning Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 02/31] drm/amd/display: Revert "drm/amd/display: Add flag to detect dpms force off during HPD" Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 03/31] drm/amd/display: Revert "drm/amd/display: turn DPMS off on connector unplug" Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 04/31] drm/amd/display: Release remote dc_sink under mst scenario Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 05/31] drm/amd/display: Take emulated dc_sink into account for HDCP Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 06/31] drm/amd/display: Drop unnecessary detect link code Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 07/31] drm/amd/display: add mst port output bw check Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 08/31] drm/amd/display: Fix eDP not light up on resume Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 09/31] drm/amd/display: Turn off internal backlight when plugging external monitor Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 10/31] drm/amd/display: Add SMU logging code Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 11/31] drm/amd/display: Fix DC warning at driver load Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 12/31] drm/amd/display: Change HDMI judgement condition Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 13/31] drm/amd/display: Enrich the log in MST payload update Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 14/31] drm/amd/display: Fix in overriding DP drive settings Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 15/31] drm/amd/display: rename lane_settings to hw_lane_settings Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 16/31] drm/amd/display: refactor function transmitter_to_phy_id Rodrigo Siqueira
2022-06-17 19:51 ` Nathan Chancellor
2022-06-20 15:32 ` Rodrigo Siqueira Jordao [this message]
2022-06-17 19:34 ` [PATCH 17/31] drm/amd/display: Change initializer to single brace Rodrigo Siqueira
2022-06-17 19:34 ` [PATCH 18/31] drm/amd/display: Fix typo in override_lane_settings Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 19/31] drm/amd/display: Handle downstream LTTPR with fixed VS sequence Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 20/31] drm/amd/display: Remove unused vendor specific w/a Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 21/31] drm/amd/display: extract update stream allocation to link_hwss Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 22/31] drm/amd/display: Fix in dp link-training when updating payload allocation table Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 23/31] drm/amd/display: Check minimum disp_clk and dpp_clk debug option Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 24/31] drm/amd/display: Update DPPCLK programming sequence Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 25/31] drm/amd/display: Fix divide-by-zero in DPPCLK and DISPCLK calculation Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 26/31] drm/amd/display: Update SW state correctly for FCLK Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 27/31] drm/amd/display: Get VCO frequency from registers Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 28/31] drm/amd/display: Implement a pme workaround function Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 29/31] drm/amd/display: Update hook dcn32_funcs Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 30/31] drm/amd/display: Drop duplicate define Rodrigo Siqueira
2022-06-17 19:35 ` [PATCH 31/31] drm/amd/display: 3.2.191 Rodrigo Siqueira
2022-06-20 13:30 ` [PATCH 00/31] DC Patches June 17, 2022 Wheeler, Daniel
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=b194ebb6-8437-a5f2-fe97-e9cef74f7188@amd.com \
--to=rodrigo.siqueira@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=HaoPing.Liu@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Nicholas.Choi@amd.com \
--cc=Stylon.Wang@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=hamza.mahfooz@amd.com \
--cc=jerry.zuo@amd.com \
--cc=natechancellor@gmail.com \
--cc=nathan@kernel.org \
--cc=nicholas.kazlauskas@amd.com \
--cc=pavle.kotarac@amd.com \
--cc=qingqing.zhuo@amd.com \
--cc=roman.li@amd.com \
--cc=solomon.chiu@amd.com \
--cc=wayne.lin@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