mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Correct the condition of warning while bo release
@ 2020-03-09 14:34 xinhui pan
  2020-03-09 14:45 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: xinhui pan @ 2020-03-09 14:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: nicholas.johnson-opensource, Felix.Kuehling, Christian.Koenig,
	Alexander.Deucher, xinhui pan

Only kernel bo has kfd eviction fence.
This warning is to give a notice that kfd only remove eviction fence on
individual bos.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 5766d20f29d8..e99f68af2bf7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
 		amdgpu_amdkfd_unreserve_memory_limit(abo);
 
 	/* We only remove the fence if the resv has individualized. */
-	WARN_ON_ONCE(bo->base.resv != &bo->base._resv);
+	WARN_ON_ONCE(bo->type == ttm_bo_type_kernel
+			&& bo->base.resv != &bo->base._resv);
 	if (bo->base.resv == &bo->base._resv)
 		amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Correct the condition of warning while bo release
  2020-03-09 14:34 [PATCH] drm/amdgpu: Correct the condition of warning while bo release xinhui pan
@ 2020-03-09 14:45 ` Christian König
  2020-03-09 16:03   ` Nicholas Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2020-03-09 14:45 UTC (permalink / raw)
  To: xinhui pan, linux-kernel
  Cc: nicholas.johnson-opensource, Felix.Kuehling, Alexander.Deucher

Am 09.03.20 um 15:34 schrieb xinhui pan:
> Only kernel bo has kfd eviction fence.
> This warning is to give a notice that kfd only remove eviction fence on
> individual bos.
>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 5766d20f29d8..e99f68af2bf7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
>   		amdgpu_amdkfd_unreserve_memory_limit(abo);
>   
>   	/* We only remove the fence if the resv has individualized. */
> -	WARN_ON_ONCE(bo->base.resv != &bo->base._resv);
> +	WARN_ON_ONCE(bo->type == ttm_bo_type_kernel
> +			&& bo->base.resv != &bo->base._resv);
>   	if (bo->base.resv == &bo->base._resv)
>   		amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo);
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Correct the condition of warning while bo release
  2020-03-09 14:45 ` Christian König
@ 2020-03-09 16:03   ` Nicholas Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Johnson @ 2020-03-09 16:03 UTC (permalink / raw)
  To: Christian König
  Cc: xinhui pan, linux-kernel, Felix.Kuehling, Alexander.Deucher

On Mon, Mar 09, 2020 at 03:45:04PM +0100, Christian König wrote:
> Am 09.03.20 um 15:34 schrieb xinhui pan:
> > Only kernel bo has kfd eviction fence.
> > This warning is to give a notice that kfd only remove eviction fence on
> > individual bos.
> > 
> > Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> 
> Reviewed-by: Christian König <christian.koenig@amd.com>
If applicable (I reported but was not the first to report / you were 
already aware):

Tested-by: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>

The warning went away when applied.

Cheers!
> 
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> > index 5766d20f29d8..e99f68af2bf7 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> > @@ -1308,7 +1308,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
> >   		amdgpu_amdkfd_unreserve_memory_limit(abo);
> >   	/* We only remove the fence if the resv has individualized. */
> > -	WARN_ON_ONCE(bo->base.resv != &bo->base._resv);
> > +	WARN_ON_ONCE(bo->type == ttm_bo_type_kernel
> > +			&& bo->base.resv != &bo->base._resv);
> >   	if (bo->base.resv == &bo->base._resv)
> >   		amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-09 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 14:34 [PATCH] drm/amdgpu: Correct the condition of warning while bo release xinhui pan
2020-03-09 14:45 ` Christian König
2020-03-09 16:03   ` Nicholas Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®