[PATCH] drm/amdgpu: Fix missing drain retry fault the last entry

Philip Yang yangp at amd.com
Tue Mar 4 15:00:29 UTC 2025


On 2025-03-03 19:44, Deng, Emily wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Ping......
>
> Emily Deng
> Best Wishes
>
>
>
>> -----Original Message-----
>> From: Emily Deng <Emily.Deng at amd.com>
>> Sent: Monday, March 3, 2025 5:35 PM
>> To: amd-gfx at lists.freedesktop.org
>> Cc: Deng, Emily <Emily.Deng at amd.com>
>> Subject: [PATCH] drm/amdgpu: Fix missing drain retry fault the last entry
>>
>> For equal case, it also need to be dropped.
>>
>> Signed-off-by: Emily Deng <Emily.Deng at amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h
>> index 7d4395a5d8ac..73b8bcb54734 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h
>> @@ -76,7 +76,7 @@ struct amdgpu_ih_ring {
>>
>> /* return true if time stamp t2 is after t1 with 48bit wrap around */  #define
>> amdgpu_ih_ts_after(t1, t2) \
>> -              (((int64_t)((t2) << 16) - (int64_t)((t1) << 16)) > 0LL)
>> +              (((int64_t)((t2) << 16) - (int64_t)((t1) << 16)) >= 0LL)

The comment is correct and current condition is correct too, 
svm_range_drain_retry_fault drop the retry fault with same timestamp as 
the IH checkpoint_wptr timestamp. Do you see GPU page fault with the 
stale retry fault after process exit, or what issue do you want to fix?

Regards,

Philip


>>
>> /* provided by the ih block */
>> struct amdgpu_ih_funcs {
>> --
>> 2.34.1


More information about the amd-gfx mailing list