From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: "Lin.Cao" <lincao12@amd.com>, amd-gfx@lists.freedesktop.org
Cc: zhenguo.yin@amd.com, jingwen.chen2@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH] drm/amdgpu: Fix vram recover doesn't work after whole GPU reset
Date: Fri, 5 May 2023 09:19:05 -0400 [thread overview]
Message-ID: <090666d1-84d2-e051-58a4-e508af410976@amd.com> (raw)
In-Reply-To: <20230505034655.1077755-1-lincao12@amd.com>
On 5/4/23 23:46, Lin.Cao wrote:
> v1: Vmbo->shadow is used to back vram bo up when vram lost. So that we
> should set shadow as vmbo->shadow to recover vmbo->bo
> v2: Modify if(vmbo->shadow) shadow = vmbo->shadow as if(!vmbo->shadow)
> continue;
>
> Fix: 'commit e18aaea733da ("drm/amdgpu: move shadow_list to amdgpu_bo_vm")'
Please change the previous line to:
Fixes: e18aaea733da ("drm/amdgpu: move shadow_list to amdgpu_bo_vm")
> Signed-off-by: Lin.Cao <lincao12@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 750eaffa81ba..0581b4fec001 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -4514,7 +4514,12 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
> dev_info(adev->dev, "recover vram bo from shadow start\n");
> mutex_lock(&adev->shadow_list_lock);
> list_for_each_entry(vmbo, &adev->shadow_list, shadow_list) {
> - shadow = &vmbo->bo;
> +
> + /* If vm is compute context or adev is APU, shadow will be NULL */
> + if (!vmbo->shadow)
> + continue;
> + shadow = vmbo->shadow;
> +
> /* No need to recover an evicted BO */
> if (shadow->tbo.resource->mem_type != TTM_PL_TT ||
> shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET ||
--
Hamza
prev parent reply other threads:[~2023-05-05 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 3:46 [PATCH] drm/amdgpu: Fix vram recover doesn't work after whole GPU reset Lin.Cao
2023-05-05 8:24 ` Christian König
2023-05-05 13:19 ` Hamza Mahfooz [this message]
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=090666d1-84d2-e051-58a4-e508af410976@amd.com \
--to=hamza.mahfooz@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=jingwen.chen2@amd.com \
--cc=lincao12@amd.com \
--cc=zhenguo.yin@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 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.