AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: xinhui pan <xinhui.pan@amd.com>, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, christian.koenig@amd.com, shikang.fan@amd.com
Subject: Re: [PATCH] drm/amdgpu: Ignore first evction failure during suspend
Date: Fri, 8 Sep 2023 08:48:59 +0200	[thread overview]
Message-ID: <9ee0c0b2-dbe8-7e47-cd64-d35b974861e3@gmail.com> (raw)
In-Reply-To: <20230908033952.41872-1-xinhui.pan@amd.com>

Am 08.09.23 um 05:39 schrieb xinhui pan:
> Some BOs might be pinned. So the first eviction's failure will abort the
> suspend sequence. These pinned BOs will be unpined afterwards during
> suspend.

That doesn't make much sense since pinned BOs don't cause eviction 
failure here.

What exactly is the error code you see?

Christian.

>
> Actaully it has evicted most BOs, so that should stil work fine in sriov
> full access mode.
>
> Fixes: 47ea20762bb7 ("drm/amdgpu: Add an extra evict_resource call during device_suspend.")
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 5c0e2b766026..39af526cdbbe 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -4148,10 +4148,11 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
>   
>   	adev->in_suspend = true;
>   
> -	/* Evict the majority of BOs before grabbing the full access */
> -	r = amdgpu_device_evict_resources(adev);
> -	if (r)
> -		return r;
> +	/* Try to evict the majority of BOs before grabbing the full access
> +	 * Ignore the ret val at first place as we will unpin some BOs if any
> +	 * afterwards.
> +	 */
> +	(void)amdgpu_device_evict_resources(adev);
>   
>   	if (amdgpu_sriov_vf(adev)) {
>   		amdgpu_virt_fini_data_exchange(adev);


  reply	other threads:[~2023-09-08  6:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08  3:39 [PATCH] drm/amdgpu: Ignore first evction failure during suspend xinhui pan
2023-09-08  6:48 ` Christian König [this message]
2023-09-12  0:21   ` Pan, Xinhui
2023-09-12  9:01     ` Christian König
2023-09-13  5:13       ` 回复: " Pan, Xinhui
2023-09-13  8:07         ` Christian König
2023-09-13 13:54           ` Felix Kuehling
2023-09-13 14:28             ` Christian König
2023-09-14  0:02               ` Pan, Xinhui
2023-09-14  1:54                 ` Pan, Xinhui
2023-09-14  6:23                   ` Christian König
2023-09-14 13:37                     ` Felix Kuehling
2023-09-14 13:59                       ` Christian König
2023-09-22 10:38                         ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2023-09-12  2:03 xinhui pan

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=9ee0c0b2-dbe8-7e47-cd64-d35b974861e3@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=shikang.fan@amd.com \
    --cc=xinhui.pan@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