From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>,
"Zhuo, Qingqing" <Qingqing.Zhuo@amd.com>
Cc: "Brol, Eryk" <Eryk.Brol@amd.com>,
"Li, Sun peng \(Leo\)" <Sunpeng.Li@amd.com>,
"Wentland, Harry" <Harry.Wentland@amd.com>,
"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
"Zhang, Jinlong" <Jinlong.Zhang@amd.com>,
"Lakha, Bhawanpreet" <Bhawanpreet.Lakha@amd.com>
Subject: Re: [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer.
Date: Thu, 17 Sep 2020 10:26:51 +0200 [thread overview]
Message-ID: <80b70e69-8489-5f5f-a5a9-3f91431cdcfc@gmail.com> (raw)
In-Reply-To: <CADnq5_NFc+wdWLeb+aQ3QNHW7BZOXYHjCh-jzMRYTvRWBidLxA@mail.gmail.com>
Am 17.09.20 um 00:18 schrieb Alex Deucher:
> On Wed, Sep 16, 2020 at 6:16 PM Zhuo, Qingqing <Qingqing.Zhuo@amd.com> wrote:
>> [AMD Official Use Only - Internal Distribution Only]
>>
>> On Wed, Sep 16, 2020 at 3:42 PM Qingqing Zhuo <qingqing.zhuo@amd.com> wrote:
>>> From: jinlong zhang <jinlong.zhang@amd.com>
>>>
>>> [why]
>>> while read edid return defer, then it enter to msleep, but it actually
>>> took more time during msleep, this will cause remaining edid read
>>> fail.
>>>
>>> [how]
>>> Replacing msleep with udelay, it will not take any extra time, edid return pass finally.
>> How long of a delay are we talking about here? Some platforms don't support long udelays and someone will send a patch to change this to msleep.
>>
>> Alex
>>
>> ---------------------
>>
>> Hi Alex,
>>
>> It's between 0-5ms for generic cases, though there exist some dongle workaround cases where we will do 70ms. Would this be a concern?
> I think ARM has a limit of 2ms for udelay.
Yeah, there is even a define somewhere for this.
If you need a delay which is longer than this but still more precise
than msleep() then there is the high precision timer sleep as alternative.
I've forgotten the function name to use here, but there was a LWN
article about this a few years ago. You just need to google a bit.
Regards,
Christian.
>
> Alex
>
>> Thank you,
>> Lillian
>>
>>
>>> Signed-off-by: jinlong zhang <jinlong.zhang@amd.com>
>>> Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
>>> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> index 743042d5905a..cdcad82765e0 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
>>> @@ -653,7 +653,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
>>> if ((*payload->reply == AUX_TRANSACTION_REPLY_AUX_DEFER) ||
>>> (*payload->reply == AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER)) {
>>> if (payload->defer_delay > 0)
>>> - msleep(payload->defer_delay);
>>> +
>>> + udelay(payload->defer_delay * 1000);
>>> }
>>> }
>>> break;
>>> --
>>> 2.17.1
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
>>> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cqi
>>> ngqing.zhuo%40amd.com%7C36c3bee68c28448769fa08d85a884619%7C3dd8961fe48
>>> 84e608e11a82d994e183d%7C0%7C0%7C637358888627498307&sdata=mynpHpiup
>>> J%2FU2o5gZNW%2Bft%2Fg2beFY86%2BzMRWoTZCghQ%3D&reserved=0
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-09-17 8:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 19:36 [PATCH 00/15] DC Patches September 21, 2020 Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 01/15] drm/amd/display: Fix incorrect backlight register offset for DCN Qingqing Zhuo
2020-09-21 12:54 ` Sasha Levin
2020-09-16 19:36 ` [PATCH 02/15] drm/amd/display: [FW Promotion] Release 0.0.33 Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 03/15] drm/amd/display: 3.2.103 Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 04/15] drm/amd/display: Replace msleep with udelay while read edid return defer Qingqing Zhuo
2020-09-16 21:34 ` Alex Deucher
2020-09-16 22:16 ` Zhuo, Qingqing
2020-09-16 22:18 ` Alex Deucher
2020-09-17 8:26 ` Christian König [this message]
2020-09-17 12:51 ` Alex Deucher
2020-09-17 13:02 ` Zhuo, Qingqing
2020-09-17 14:39 ` Zhang, Jinlong
2020-09-17 14:46 ` Christian König
2020-09-17 14:49 ` Zhuo, Qingqing
2020-09-17 14:46 ` Alex Deucher
2020-09-16 19:36 ` [PATCH 05/15] drm/amd/display: Bug in dce_is_panel_backlight_on() Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 06/15] drm/amd/display: eDP intermittent black screen during PnP Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 07/15] drm/amd/display: Fix ODM policy implementation Qingqing Zhuo
2020-09-21 12:54 ` Sasha Levin
2020-09-16 19:36 ` [PATCH 08/15] drm/amd/display: Increase timeout for DP Disable Qingqing Zhuo
2020-09-21 12:54 ` Sasha Levin
2020-09-16 19:36 ` [PATCH 09/15] drm/amd/display: Enable DP YCbCr420 mode support for DCN10 Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 10/15] drm/amd/display: allow DP RX to use more cr aux rd interval delay Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 11/15] drm/amd/display: Implement PSR wait for enable/disable Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 12/15] drm/amd/display: Check for flip pending before locking pipes Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 13/15] drm/amd/display: TMDS Fallback transition Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 14/15] drm/amd/display: [FW Promotion] Release 0.0.34 Qingqing Zhuo
2020-09-16 19:36 ` [PATCH 15/15] drm/amd/display: 3.2.104 Qingqing Zhuo
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=80b70e69-8489-5f5f-a5a9-3f91431cdcfc@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Eryk.Brol@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Jinlong.Zhang@amd.com \
--cc=Qingqing.Zhuo@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@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