* [PATCH v3] drm/ttm: Should to return the evict error
@ 2025-06-03 9:09 Emily Deng
2025-06-03 9:12 ` Deng, Emily
0 siblings, 1 reply; 7+ messages in thread
From: Emily Deng @ 2025-06-03 9:09 UTC (permalink / raw)
To: amd-gfx; +Cc: Emily Deng
For the evict fail case, the evict error should be returned.
v2: Consider ENOENT case.
v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
and not wait for the move to finish
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 7e5a60c55813..a9fa903b8e39 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
cond_resched();
} while (!ret);
+ if (ret != -ENOENT)
+ return ret;
+
spin_lock(&man->move_lock);
fence = dma_fence_get(man->move);
spin_unlock(&man->move_lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH v3] drm/ttm: Should to return the evict error
2025-06-03 9:09 [PATCH v3] drm/ttm: Should to return the evict error Emily Deng
@ 2025-06-03 9:12 ` Deng, Emily
0 siblings, 0 replies; 7+ messages in thread
From: Deng, Emily @ 2025-06-03 9:12 UTC (permalink / raw)
To: Deng, Emily, amd-gfx@lists.freedesktop.org
[AMD Official Use Only - AMD Internal Distribution Only]
Sorry, send the wrong patch, please ignore this.
Emily Deng
Best Wishes
>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Tuesday, June 3, 2025 5:10 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH v3] drm/ttm: Should to return the evict error
>
>For the evict fail case, the evict error should be returned.
>
>v2: Consider ENOENT case.
>
>v3: Abort directly when the eviction failed for some reason (except for -ENOENT) and
>not wait for the move to finish
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
>index 7e5a60c55813..a9fa903b8e39 100644
>--- a/drivers/gpu/drm/ttm/ttm_resource.c
>+++ b/drivers/gpu/drm/ttm/ttm_resource.c
>@@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> cond_resched();
> } while (!ret);
>
>+ if (ret != -ENOENT)
>+ return ret;
>+
> spin_lock(&man->move_lock);
> fence = dma_fence_get(man->move);
> spin_unlock(&man->move_lock);
>--
>2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] drm/ttm: Should to return the evict error
@ 2025-06-03 9:11 Emily Deng
2025-06-04 3:17 ` Deng, Emily
2025-06-04 9:00 ` Christian König
0 siblings, 2 replies; 7+ messages in thread
From: Emily Deng @ 2025-06-03 9:11 UTC (permalink / raw)
To: amd-gfx; +Cc: Emily Deng
For the evict fail case, the evict error should be returned.
v2: Consider ENOENT case.
v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
and not wait for the move to finish
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 7e5a60c55813..bb84528276cd 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
cond_resched();
} while (!ret);
+ if (ret && ret != -ENOENT)
+ return ret;
+
spin_lock(&man->move_lock);
fence = dma_fence_get(man->move);
spin_unlock(&man->move_lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH v3] drm/ttm: Should to return the evict error
2025-06-03 9:11 Emily Deng
@ 2025-06-04 3:17 ` Deng, Emily
2025-06-04 9:00 ` Christian König
1 sibling, 0 replies; 7+ messages in thread
From: Deng, Emily @ 2025-06-04 3:17 UTC (permalink / raw)
To: Koenig, Christian
Cc: Deng, Emily, amd-gfx@lists.freedesktop.org, Zhang, Owen(SRDC)
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Christian,
Could you help to review again?
Emily Deng
Best Wishes
>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Tuesday, June 3, 2025 5:12 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH v3] drm/ttm: Should to return the evict error
>
>For the evict fail case, the evict error should be returned.
>
>v2: Consider ENOENT case.
>
>v3: Abort directly when the eviction failed for some reason (except for -ENOENT) and
>not wait for the move to finish
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
>index 7e5a60c55813..bb84528276cd 100644
>--- a/drivers/gpu/drm/ttm/ttm_resource.c
>+++ b/drivers/gpu/drm/ttm/ttm_resource.c
>@@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> cond_resched();
> } while (!ret);
>
>+ if (ret && ret != -ENOENT)
>+ return ret;
>+
> spin_lock(&man->move_lock);
> fence = dma_fence_get(man->move);
> spin_unlock(&man->move_lock);
>--
>2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v3] drm/ttm: Should to return the evict error
2025-06-03 9:11 Emily Deng
2025-06-04 3:17 ` Deng, Emily
@ 2025-06-04 9:00 ` Christian König
2025-06-06 16:55 ` Alex Deucher
1 sibling, 1 reply; 7+ messages in thread
From: Christian König @ 2025-06-04 9:00 UTC (permalink / raw)
To: Emily Deng, amd-gfx
On 6/3/25 11:11, Emily Deng wrote:
> For the evict fail case, the evict error should be returned.
>
> v2: Consider ENOENT case.
>
> v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
> and not wait for the move to finish
>
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
> index 7e5a60c55813..bb84528276cd 100644
> --- a/drivers/gpu/drm/ttm/ttm_resource.c
> +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> @@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> cond_resched();
> } while (!ret);
>
> + if (ret && ret != -ENOENT)
> + return ret;
> +
> spin_lock(&man->move_lock);
> fence = dma_fence_get(man->move);
> spin_unlock(&man->move_lock);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] drm/ttm: Should to return the evict error
2025-06-04 9:00 ` Christian König
@ 2025-06-06 16:55 ` Alex Deucher
2025-06-10 8:47 ` Christian König
0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2025-06-06 16:55 UTC (permalink / raw)
To: Christian König; +Cc: Emily Deng, amd-gfx
On Wed, Jun 4, 2025 at 5:06 AM Christian König <christian.koenig@amd.com> wrote:
>
> On 6/3/25 11:11, Emily Deng wrote:
> > For the evict fail case, the evict error should be returned.
> >
> > v2: Consider ENOENT case.
> >
> > v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
> > and not wait for the move to finish
> >
> > Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
Did you push this to drm-misc?
Alex
>
> > ---
> > drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
> > index 7e5a60c55813..bb84528276cd 100644
> > --- a/drivers/gpu/drm/ttm/ttm_resource.c
> > +++ b/drivers/gpu/drm/ttm/ttm_resource.c
> > @@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
> > cond_resched();
> > } while (!ret);
> >
> > + if (ret && ret != -ENOENT)
> > + return ret;
> > +
> > spin_lock(&man->move_lock);
> > fence = dma_fence_get(man->move);
> > spin_unlock(&man->move_lock);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] drm/ttm: Should to return the evict error
2025-06-06 16:55 ` Alex Deucher
@ 2025-06-10 8:47 ` Christian König
0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2025-06-10 8:47 UTC (permalink / raw)
To: Alex Deucher; +Cc: Emily Deng, amd-gfx
On 6/6/25 18:55, Alex Deucher wrote:
> On Wed, Jun 4, 2025 at 5:06 AM Christian König <christian.koenig@amd.com> wrote:
>>
>> On 6/3/25 11:11, Emily Deng wrote:
>>> For the evict fail case, the evict error should be returned.
>>>
>>> v2: Consider ENOENT case.
>>>
>>> v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
>>> and not wait for the move to finish
>>>
>>> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> Did you push this to drm-misc?
Not yet, I wanted to take care of it this morning.
Christian.
>
> Alex
>
>>
>>> ---
>>> drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
>>> index 7e5a60c55813..bb84528276cd 100644
>>> --- a/drivers/gpu/drm/ttm/ttm_resource.c
>>> +++ b/drivers/gpu/drm/ttm/ttm_resource.c
>>> @@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
>>> cond_resched();
>>> } while (!ret);
>>>
>>> + if (ret && ret != -ENOENT)
>>> + return ret;
>>> +
>>> spin_lock(&man->move_lock);
>>> fence = dma_fence_get(man->move);
>>> spin_unlock(&man->move_lock);
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-10 8:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 9:09 [PATCH v3] drm/ttm: Should to return the evict error Emily Deng
2025-06-03 9:12 ` Deng, Emily
-- strict thread matches above, loose matches on Subject: below --
2025-06-03 9:11 Emily Deng
2025-06-04 3:17 ` Deng, Emily
2025-06-04 9:00 ` Christian König
2025-06-06 16:55 ` Alex Deucher
2025-06-10 8:47 ` Christian König
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.