From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: xinhui pan <xinhui.pan@amd.com>, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH v2] drm/amdgpu: Fix a race of IB test
Date: Mon, 13 Sep 2021 10:41:01 -0400 [thread overview]
Message-ID: <f8d10120-ae1b-7f4a-2bd0-3cdde53e8d24@amd.com> (raw)
In-Reply-To: <20210912234817.13051-1-xinhui.pan@amd.com>
Please add a tag V2 in description explaining what was the delta from V1.
Other then that looks good to me.
Andrey
On 2021-09-12 7:48 p.m., xinhui pan wrote:
> Direct IB submission should be exclusive. So use write lock.
>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 19323b4cce7b..be5d12ed3db1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -1358,7 +1358,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
> }
>
> /* Avoid accidently unparking the sched thread during GPU reset */
> - r = down_read_killable(&adev->reset_sem);
> + r = down_write_killable(&adev->reset_sem);
> if (r)
> return r;
>
> @@ -1387,7 +1387,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
> kthread_unpark(ring->sched.thread);
> }
>
> - up_read(&adev->reset_sem);
> + up_write(&adev->reset_sem);
>
> pm_runtime_mark_last_busy(dev->dev);
> pm_runtime_put_autosuspend(dev->dev);
prev parent reply other threads:[~2021-09-13 14:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-12 23:48 [PATCH v2] drm/amdgpu: Fix a race of IB test xinhui pan
2021-09-13 4:00 ` Lazar, Lijo
2021-09-13 4:42 ` 回复: " Pan, Xinhui
2021-09-13 6:22 ` Christian König
2021-09-13 6:25 ` Lazar, Lijo
2021-09-13 6:37 ` Christian König
2021-09-13 6:43 ` Lazar, Lijo
2021-09-13 6:51 ` Christian König
2021-09-13 7:15 ` Lazar, Lijo
2021-09-13 7:22 ` Christian König
2021-09-13 7:23 ` 回复: " Pan, Xinhui
2021-09-13 13:50 ` Lazar, Lijo
2021-09-13 14:41 ` Andrey Grodzovsky [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=f8d10120-ae1b-7f4a-2bd0-3cdde53e8d24@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@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