AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Shikang Fan <shikang.fan@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Add an extra evict_resource call during device_suspend.
Date: Thu, 8 Dec 2022 12:58:54 +0100	[thread overview]
Message-ID: <92929b53-0064-5133-b2d3-c0a9afa027cf@gmail.com> (raw)
In-Reply-To: <20221208115516.7280-1-shikang.fan@amd.com>

Am 08.12.22 um 12:55 schrieb Shikang Fan:
> - evict_resource is taking too long causing sriov full access mode timeout.
>    So, add an extra evict_resource in the beginning as an early evict.
>
> Signed-off-by: Shikang Fan <shikang.fan@amd.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 818fa72c670d..b76e8fdfd266 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -4111,6 +4111,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;
> +
>   	if (amdgpu_sriov_vf(adev)) {
>   		amdgpu_virt_fini_data_exchange(adev);
>   		r = amdgpu_virt_request_full_gpu(adev, false);


  reply	other threads:[~2022-12-08 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 11:55 [PATCH] drm/amdgpu: Add an extra evict_resource call during device_suspend Shikang Fan
2022-12-08 11:58 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-08  9:25 Shikang Fan
2022-12-08  9:30 ` Christian König
2022-12-08  9:58   ` Fan, Shikang
2022-12-08 11:26     ` 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=92929b53-0064-5133-b2d3-c0a9afa027cf@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=shikang.fan@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