mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards
In certain cooperative group dispatch scenarios the default SPI resource allocation may cause reduced per-CU workgroup occupancy. Set COMPUTE_RESOURCE_LIMITS.FORCE_SIMD_DIST=1 to mitigate soft hang scenarions. Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Suggested-by: Joseph Greathouse <Joseph.Greathouse@amd.com> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0d555e481c
commit
e3de58f8fd
@ -303,6 +303,15 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
|
||||
update_cu_mask(mm, mqd, minfo, 0);
|
||||
set_priority(m, q);
|
||||
|
||||
if (minfo && KFD_GC_VERSION(mm->dev) >= IP_VERSION(9, 4, 2)) {
|
||||
if (minfo->update_flag & UPDATE_FLAG_IS_GWS)
|
||||
m->compute_resource_limits |=
|
||||
COMPUTE_RESOURCE_LIMITS__FORCE_SIMD_DIST_MASK;
|
||||
else
|
||||
m->compute_resource_limits &=
|
||||
~COMPUTE_RESOURCE_LIMITS__FORCE_SIMD_DIST_MASK;
|
||||
}
|
||||
|
||||
q->is_active = QUEUE_IS_ACTIVE(*q);
|
||||
}
|
||||
|
||||
|
@ -532,6 +532,7 @@ struct queue_properties {
|
||||
enum mqd_update_flag {
|
||||
UPDATE_FLAG_DBG_WA_ENABLE = 1,
|
||||
UPDATE_FLAG_DBG_WA_DISABLE = 2,
|
||||
UPDATE_FLAG_IS_GWS = 4, /* quirk for gfx9 IP */
|
||||
};
|
||||
|
||||
struct mqd_update_info {
|
||||
|
@ -95,6 +95,7 @@ void kfd_process_dequeue_from_device(struct kfd_process_device *pdd)
|
||||
int pqm_set_gws(struct process_queue_manager *pqm, unsigned int qid,
|
||||
void *gws)
|
||||
{
|
||||
struct mqd_update_info minfo = {0};
|
||||
struct kfd_node *dev = NULL;
|
||||
struct process_queue_node *pqn;
|
||||
struct kfd_process_device *pdd;
|
||||
@ -146,9 +147,10 @@ int pqm_set_gws(struct process_queue_manager *pqm, unsigned int qid,
|
||||
}
|
||||
|
||||
pdd->qpd.num_gws = gws ? dev->adev->gds.gws_size : 0;
|
||||
minfo.update_flag = gws ? UPDATE_FLAG_IS_GWS : 0;
|
||||
|
||||
return pqn->q->device->dqm->ops.update_queue(pqn->q->device->dqm,
|
||||
pqn->q, NULL);
|
||||
pqn->q, &minfo);
|
||||
}
|
||||
|
||||
void kfd_process_dequeue_from_all_devices(struct kfd_process *p)
|
||||
|
Loading…
Reference in New Issue
Block a user