From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Andrey Grodzovsky
<andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
christian.koenig-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: Fix warning in dma_fence_is_later on resume from S3.
Date: Mon, 23 Jul 2018 17:11:52 +0800 [thread overview]
Message-ID: <5B559BD8.3070803@amd.com> (raw)
In-Reply-To: <1532101641-24755-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
On 07/20/2018 11:47 PM, Andrey Grodzovsky wrote:
> Problem:
> amdgpu_ttm_set_buffer_funcs_status destroys adev->mman.entity on suspend
> without releasing adev->mman.bdev.man[TTM_PL_VRAM].move fence
> so on resume the new drm_sched_entity.fence_context causes
> the warning against the old fence context which is different.
>
> Fix:
> When destroying sched_entity in amdgpu_ttm_set_buffer_funcs_status
> release man->move fence and set the pointer to NULL.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 13977ea..8ed1029 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1927,6 +1927,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
> } else {
> drm_sched_entity_destroy(adev->mman.entity.sched,
> &adev->mman.entity);
> + dma_fence_put(man->move);
> + man->move = NULL;
> }
>
> /* this just adjusts TTM size idea, which sets lpfn to the correct value */
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2018-07-23 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 15:47 [PATCH] drm/amdgpu: Fix warning in dma_fence_is_later on resume from S3 Andrey Grodzovsky
[not found] ` <1532101641-24755-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-07-20 15:51 ` Christian König
2018-07-23 9:11 ` Zhang, Jerry (Junwei) [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=5B559BD8.3070803@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
/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