amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Monk Liu <Monk.Liu@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: make IB test synchronize with init for SRIOV(v2)
Date: Mon, 29 Jun 2020 11:43:47 +0200	[thread overview]
Message-ID: <4c827264-1dd7-b977-0bea-d0ab8db82898@gmail.com> (raw)
In-Reply-To: <1593423339-2773-1-git-send-email-Monk.Liu@amd.com>

Am 29.06.20 um 11:35 schrieb Monk Liu:
> issue:
> originally we kickoff IB test asynchronously with driver's
> init, thus
> the IB test may still running when the driver loading
> done (modprobe amdgpu done).
> if we shutdown VM immediately after amdgpu driver
> loaded then GPU may
> hang because the IB test is still running
>
> fix:
> flush the delayed_init routine at the bottom of device_init
> to avoid driver loading done prior to the IB test completes
>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

Maybe do this even after sysfs and PMU init, but either way Acked-by: 
Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 457f5d2..7a4e965 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3295,6 +3295,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>   	queue_delayed_work(system_wq, &adev->delayed_init_work,
>   			   msecs_to_jiffies(AMDGPU_RESUME_MS));
>   
> +	if (amdgpu_sriov_vf(adev))
> +		flush_delayed_work(&adev->delayed_init_work);
> +
>   	r = sysfs_create_files(&adev->dev->kobj, amdgpu_dev_attributes);
>   	if (r) {
>   		dev_err(adev->dev, "Could not create amdgpu device attr\n");

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-06-29  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  9:35 [PATCH] drm/amdgpu: make IB test synchronize with init for SRIOV(v2) Monk Liu
2020-06-29  9:43 ` Christian König [this message]
2020-06-29 14:02   ` Liu, Monk

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=4c827264-1dd7-b977-0bea-d0ab8db82898@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=Monk.Liu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@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;
as well as URLs for NNTP newsgroup(s).