drm/amdgpu: correct oversubscription timer interval for gfx11

oversubscription_timer in MES is in micro second, so change the
timer's interval in KFD/useq to micro second.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Suggested-by: Leo Lin <Leo.Lin@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Eric Huang 2026-08-26 15:59:38 -04:00 committed by Alex Deucher
parent 8b607d6f54
commit a6ea3f9ec2
2 changed files with 6 additions and 6 deletions

View File

@ -1171,7 +1171,7 @@ int amdgpu_mes_notify_unmap_queue(struct amdgpu_device *adev)
}
/* Interval for notifying MES of work on unmapped queues during oversubscription */
#define AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS 50
#define AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US 50
static unsigned int amdgpu_mes_userq_hw_queue_num(struct amdgpu_device *adev)
{
@ -1198,7 +1198,7 @@ static void amdgpu_mes_userq_notify_unmap_work_handler(struct work_struct *work)
if (atomic_read(&mes->userq_hw_queue_count) >
amdgpu_mes_userq_hw_queue_num(adev))
queue_delayed_work(system_wq, &mes->userq_notify_unmap_work,
msecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS));
usecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US));
}
/*
@ -1215,7 +1215,7 @@ void amdgpu_mes_userq_queue_mapped(struct amdgpu_device *adev)
if (atomic_inc_return(&adev->mes.userq_hw_queue_count) >
amdgpu_mes_userq_hw_queue_num(adev))
queue_delayed_work(system_wq, &adev->mes.userq_notify_unmap_work,
msecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS));
usecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US));
}
/*

View File

@ -48,7 +48,7 @@
#define USE_DEFAULT_GRACE_PERIOD 0xffffffff
/* Interval for notifying MES of work on unmapped queues during oversubscription */
#define DQM_MES_UNMAP_NOTIFY_DELAY_MS 50
#define DQM_MES_UNMAP_NOTIFY_DELAY_US 50
static int set_pasid_vmid_mapping(struct device_queue_manager *dqm,
u32 pasid, unsigned int vmid);
@ -287,7 +287,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
KFD_GC_VERSION(dqm->dev) < IP_VERSION(12, 0, 0) &&
dqm->active_cp_queue_count > get_cp_queues_num(dqm))
queue_delayed_work(system_wq, &dqm->notify_unmap_work,
msecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_MS));
usecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_US));
return r;
}
@ -3283,7 +3283,7 @@ static void mes_notify_unmap_work_handler(struct work_struct *work)
/* Re-arm if still oversubscribed */
if (READ_ONCE(dqm->active_cp_queue_count) > get_cp_queues_num(dqm))
queue_delayed_work(system_wq, &dqm->notify_unmap_work,
msecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_MS));
usecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_US));
}
struct device_queue_manager *device_queue_manager_init(struct kfd_node *dev)