AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: YuBiao Wang <YuBiao.Wang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: "Evan Quan" <Evan.Quan@amd.com>,
	horace.chen@amd.com, "Tuikov Luben" <Luben.Tuikov@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Deucher Alexander" <Alexander.Deucher@amd.com>,
	"Jack Xiao" <Jack.Xiao@amd.com>,
	"Hawking Zhang" <Hawking.Zhang@amd.com>,
	"Monk Liu" <Monk.Liu@amd.com>, "Feifei Xu" <Feifei.Xu@amd.com>,
	"Kevin Wang" <Kevin1.Wang@amd.com>
Subject: Re: [PATCH] drm/amd/amdgpu:flush ttm delayed work before cancel_sync
Date: Tue, 17 Aug 2021 12:54:06 -0400	[thread overview]
Message-ID: <23f99700-3ab4-0111-228a-e844e99d62b1@amd.com> (raw)
In-Reply-To: <20210817095005.8536-1-YuBiao.Wang@amd.com>

Looks reasonable to me.

Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>

Andrey

On 2021-08-17 5:50 a.m., YuBiao Wang wrote:
> [Why]
> In some cases when we unload driver, warning call trace
> will show up in vram_mgr_fini which claims that LRU is not empty, caused
> by the ttm bo inside delay deleted queue.
>
> [How]
> We should flush delayed work to make sure the delay deleting is done.
>
> Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4d266c40382c..0b5764aa98a4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3824,8 +3824,10 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
>   {
>   	dev_info(adev->dev, "amdgpu: finishing device.\n");
>   	flush_delayed_work(&adev->delayed_init_work);
> -	if (adev->mman.initialized)
> +	if (adev->mman.initialized) {
> +		flush_delayed_work(&adev->mman.bdev.wq);
>   		ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
> +	}
>   	adev->shutdown = true;
>   
>   	/* make sure IB test finished before entering exclusive mode

  reply	other threads:[~2021-08-17 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  9:50 [PATCH] drm/amd/amdgpu:flush ttm delayed work before cancel_sync YuBiao Wang
2021-08-17 16:54 ` Andrey Grodzovsky [this message]
2021-08-18  8:06 ` Christian König

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=23f99700-3ab4-0111-228a-e844e99d62b1@amd.com \
    --to=andrey.grodzovsky@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Evan.Quan@amd.com \
    --cc=Feifei.Xu@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Jack.Xiao@amd.com \
    --cc=Kevin1.Wang@amd.com \
    --cc=Luben.Tuikov@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=YuBiao.Wang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=horace.chen@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox