AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix wrong unit of vf2pf_work delay
@ 2026-11-23 17:55 Sang-Heon Jeon
  2026-11-24  8:44 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Sang-Heon Jeon @ 2026-11-23 17:55 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter
  Cc: amd-gfx, Bokun Zhang, dri-devel, Monk Liu

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-24  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 17:55 [PATCH] drm/amdgpu: fix wrong unit of vf2pf_work delay Sang-Heon Jeon
2026-11-24  8:44 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox