All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: "Liu, Zhan" <Zhan.Liu@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Li, Sun peng \(Leo\)" <Sunpeng.Li@amd.com>,
	"Tsai, Martin" <Martin.Tsai@amd.com>,
	"Lakha, Bhawanpreet" <Bhawanpreet.Lakha@amd.com>,
	"Cheng, Tony" <Tony.Cheng@amd.com>,
	"Wentland, Harry" <Harry.Wentland@amd.com>
Subject: Re: [PATCH 39/43] drm/amd/display: Use udelay to avoid context switch
Date: Fri, 10 Jan 2020 16:30:44 -0500	[thread overview]
Message-ID: <ea175487-1c3c-c7f9-e3be-267e6d2c6566@amd.com> (raw)
In-Reply-To: <3b143333-21a8-6075-ae85-026180eae286@amd.com>

On 2020-01-10 4:16 p.m., Harry Wentland wrote:
> On 2020-01-10 1:47 p.m., Liu, Zhan wrote:
>>
>>
>>> -----Original Message-----
>>> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
>>> Christian König
>>> Sent: 2020/January/10, Friday 10:02 AM
>>> To: Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; amd-
>>> gfx@lists.freedesktop.org
>>> Cc: Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Cheng, Tony
>>> <Tony.Cheng@amd.com>; Tsai, Martin <Martin.Tsai@amd.com>; Lakha,
>>> Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Wentland, Harry
>>> <Harry.Wentland@amd.com>
>>> Subject: Re: [PATCH 39/43] drm/amd/display: Use udelay to avoid context
>>> switch
>>>
>>> Am 10.01.20 um 15:46 schrieb Rodrigo Siqueira:
>>>> From: Martin Tsai <martin.tsai@amd.com>
>>>>
>>>> [why]
>>>> The rapid msleep operation causes the white line garbage when DAL
>>>> check flip pending status in SetVidPnSourceVisibility.
>>>> To execute this msleep will induce context switch, and longer delay
>>>> could cause worse garbage situation.
>>>>
>>>> [how]
>>>> To replace msleep with udelay.
>>>>
>>>> Signed-off-by: Martin Tsai <martin.tsai@amd.com>
>>>> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
>>>> Acked-by: Harry Wentland <harry.wentland@amd.com>
>>>> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>>>> ---
>>>>   drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
>>>> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
>>>> index 89920924a154..0dc652e76848 100644
>>>> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
>>>> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
>>>> @@ -1642,9 +1642,9 @@ void dcn20_program_front_end_for_ctx(
>>>>   			struct hubp *hubp = pipe->plane_res.hubp;
>>>>   			int j = 0;
>>>>
>>>> -			for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS
>>>> +			for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS*1000
>>>>   					&& hubp->funcs-
>>>> hubp_is_flip_pending(hubp); j++)
>>>> -				msleep(1);
>>>> +				udelay(1);
>>>
>>> Why not using mdelay() here?
>>
>> As far as I know, mdelay() is only defined on Linux side.
>>
>> This piece of code is shared by both Linux and Windows, so we have to use a function that's available on both platforms.
>>
> 
> It was used here before so we definitely have it defined for Windows as
> well.
> 

Whoops, I misread that.

mdelay is indeed not defined on our other platforms but we could go
ahead and define it if needed.

Harry

> From the commit description it sounds like msleep wasn't tight enough
> and longer delays lead to issues here, at least on Windows.
> 
> Martin, Tony, do you have more details about this?
> 
> Thanks,
> Harry
> 
>> Zhan
>>
>>>
>>> Christian.
>>>
>>>>   		}
>>>>   	}
>>>>
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-01-10 21:30 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 14:46 [PATCH 00/43] DC Patches - January 10, 2020 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 01/43] drm/amd/include: Add OCSC registers Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 02/43] drm/amd/display: Clear state after exiting fixed active VRR state Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 03/43] drm/amd/display: 3.2.65 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 04/43] drm/amd/display: fix chroma vp wa corner case Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 05/43] drm/amd/display: Fix 300Hz Freesync bug Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 06/43] drm/amd/display: Disable secondary link for certain monitors Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 07/43] drm/amd/display: Adding forgotten hubbub func Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 08/43] drm/amd/display: Flush framebuffer data before passing to DMCUB Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 09/43] drm/amd/display: Read inst_fb data back during DMUB loading Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 10/43] drm/amd/display: Soft reset DMUIF during DMUB reset Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 11/43] drm/amd/display: Add double buffering to dcn20 OCSC Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 12/43] drm/amd/display: store lttpr mode with dpcd Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 13/43] drm/amd/display: Don't always set pstate true if dummy latency = 0 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 14/43] drm/amd/display: Update HDMI hang w/a to apply to all TMDS signals Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 15/43] drm/amd/display: wait for update when setting dpg test pattern Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 16/43] drm/amd/display: stop doing unnecessary detection when going to D3 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 17/43] drm/amd/display: expand dml structs Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 18/43] drm/amd/display: 3.2.66 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 19/43] drm/amd/display: Fix double buffering in dcn2 ICSC Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 20/43] drm/amd/display: Driverside changes to support PSR in DMCUB Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 21/43] drm/amd/display: Double buffer dcn2 Gamut Remap Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 22/43] drm/amd/display: programing surface flip by dmcub Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 23/43] drm/amd/display: DMCUB FW Changes to support PSR Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 24/43] drm/amd/display: Indirect reg read macro with shift and mask Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 25/43] drm/amd/display: Refactor surface flip programming Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 26/43] drm/amd/display: Fix DMUB PSR command IDs Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 27/43] drm/amd/display: Add w/a to reset PHY before link training in verify_link_cap Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 28/43] drm/amd/display: rename _lvp to l_vp Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 29/43] drm/amd/display: Use SMU ClockTable Values for DML Calculations Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 30/43] drm/amd/display: Add default switch case for DCC Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 31/43] drm/amd/display: implement fw-driver interface for abm 2.4 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 32/43] drm/amd/display: remove psr state condition when psr exit case Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 33/43] drm/amd/display: 3.2.67 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 34/43] drm/amd/display: make PSR static screen entry within 30 ms Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 35/43] drm/amd/display: wait for test pattern after when all pipes are programmed Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 36/43] drm/amd/display: Add monitor patch for AUO dpcd issue Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 37/43] drm/amd/display: Enable double buffer for OTG_BLANK Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 38/43] drm/amd/display: Only program surface flip for video plane via dmcub Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 39/43] drm/amd/display: Use udelay to avoid context switch Rodrigo Siqueira
2020-01-10 15:01   ` Christian König
2020-01-10 18:47     ` Liu, Zhan
2020-01-10 21:16       ` Harry Wentland
2020-01-10 21:30         ` Harry Wentland [this message]
2020-01-11 16:34           ` Christian König
2020-01-13 17:12             ` Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 40/43] drm/amd/display: fixup DML dependencies Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 41/43] drm/amd/display: reallocate MST payload when link loss Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 42/43] drm/amd/display: 3.2.68 Rodrigo Siqueira
2020-01-10 14:46 ` [PATCH 43/43] drm/amd/display: skip opp blank or unblank if test pattern enabled Rodrigo Siqueira

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=ea175487-1c3c-c7f9-e3be-267e6d2c6566@amd.com \
    --to=hwentlan@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Martin.Tsai@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Tony.Cheng@amd.com \
    --cc=Zhan.Liu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.