Tested-by: Carol L Soto cs...@nvidia.com<mailto:cs...@nvidia.com>

From: Nirmoy Das <nirm...@nvidia.com>
Date: Thursday, September 18, 2025 at 7:17 AM
To: Thomas Zimmermann <tzimmerm...@suse.de>, dri-devel@lists.freedesktop.org 
<dri-devel@lists.freedesktop.org>
Cc: jfale...@redhat.com <jfale...@redhat.com>, mrip...@kernel.org 
<mrip...@kernel.org>, Carol Soto <cs...@nvidia.com>
Subject: Re: [RFC PATCH] drm/ast: Use msleep instead of mdelay for edid read
Hi Thomas,

On 18.09.25 12:32, Thomas Zimmermann wrote:
> Hi
>
> Am 17.09.25 um 21:43 schrieb Nirmoy Das:
>> The busy-waiting in `mdelay()` can cause CPU stalls and kernel timeouts
>> during boot.
>>
>> Signed-off-by: Nirmoy Das <nirm...@nvidia.com>
>
> Reviewed-by: Thomas Zimmermann <tzimmerm...@suse.de>
>
>>
>> Sending this as RFC as I am familiar with the code and not sure
>> if this transition is safe.
>
> It's only waiting for hardware, so most likely safe. I'll give it a
> try before merging the patch. Thanks for this fix.
>

Perfect. Thanks for also trying it out. We tried it on older kernel and
it helped.


> There are other calls to mdelay in the driver. Should they be replaced
> as well?


Haven't observed any issue with those calls which occurs at shorter
intervals and may be that is why they didn't cause a blockage.


Regards,

Nirmoy

>
> Best regards
> Thomas
>
>> ---
>>   drivers/gpu/drm/ast/ast_dp.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c
>> index 19c04687b0fe1..8e650a02c5287 100644
>> --- a/drivers/gpu/drm/ast/ast_dp.c
>> +++ b/drivers/gpu/drm/ast/ast_dp.c
>> @@ -134,7 +134,7 @@ static int ast_astdp_read_edid_block(void *data,
>> u8 *buf, unsigned int block, si
>>                * 3. The Delays are often longer a lot when system
>> resume from S3/S4.
>>                */
>>               if (j)
>> -                mdelay(j + 1);
>> +                msleep(j + 1);
>>
>>               /* Wait for EDID offset to show up in mirror register */
>>               vgacrd7 = ast_get_index_reg(ast, AST_IO_VGACRI, 0xd7);
>> --
>> 2.43.0
>>
>

Reply via email to