All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org, Bokun Zhang <Bokun.Zhang@amd.com>,
	dri-devel@lists.freedesktop.org, Monk Liu <monk.liu@amd.com>
Subject: [PATCH] drm/amdgpu: fix wrong unit of vf2pf_work delay
Date: Tue, 24 Nov 2026 02:55:12 +0900	[thread overview]
Message-ID: <20261123175513.2144018-1-ekffu200098@gmail.com> (raw)

The delay of schedule_delayed_work() is in jiffies. But
amdgpu_virt_update_vf2pf_work_item() reschedules vf2pf_work with
vf2pf_update_interval_ms without converting it, so the interval is in
milliseconds only if HZ is 1000.

So use msecs_to_jiffies() when rescheduling.

Fixes: 519b8b76f0b6 ("drm/amdgpu: Implement new guest side VF2PF message transaction (v2)")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
I don't have a test environment, so this patch is compile tested only.

 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 915e2a069baf..f93d5df51528 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -797,7 +797,8 @@ static void amdgpu_virt_update_vf2pf_work_item(struct work_struct *work)
 	amdgpu_virt_write_vf2pf_data(adev);
 
 out:
-	schedule_delayed_work(&(adev->virt.vf2pf_work), adev->virt.vf2pf_update_interval_ms);
+	schedule_delayed_work(&(adev->virt.vf2pf_work),
+			      msecs_to_jiffies(adev->virt.vf2pf_update_interval_ms));
 }
 
 static int amdgpu_virt_read_exchange_data_from_mem(struct amdgpu_device *adev, uint32_t *pfvf_data)

base-commit: 8dd68a79583aaf6df6fe4feea3ee9e9f26b02993
-- 
2.53.0


             reply	other threads:[~2026-11-24  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 17:55 Sang-Heon Jeon [this message]
2026-11-24  8:44 ` [PATCH] drm/amdgpu: fix wrong unit of vf2pf_work delay sashiko-bot

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=20261123175513.2144018-1-ekffu200098@gmail.com \
    --to=ekffu200098@gmail.com \
    --cc=Bokun.Zhang@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=monk.liu@amd.com \
    --cc=simona@ffwll.ch \
    /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.