mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-24 21:52:15 -04:00
drm/amdkfd: Limit per-process xnack support for GFX12.1
GFX12.1 doesn't support different processes with different xnack setting. Hence, xnack changes from its default setting needs driver reload with noretry module parameter. However, if driver boots-up with xnack on and process sets xnack off, this condition is supported. In this case, only driver takes xnack off path whereas hardware / firmware considers xnack is on. Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Reviewed-by: Philip.Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
bfeb7b28e9
commit
05c0109e12
@@ -54,6 +54,7 @@ static int update_qpd_v12_1(struct device_queue_manager *dqm,
|
||||
struct kfd_process_device *pdd;
|
||||
struct amdgpu_device *adev = dqm->dev->adev;
|
||||
struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB(0)];
|
||||
bool xnack_enabled;
|
||||
|
||||
pdd = qpd_to_pdd(qpd);
|
||||
qpd->vm_cntx_cntl = hub->vm_cntx_cntl;
|
||||
@@ -71,16 +72,18 @@ static int update_qpd_v12_1(struct device_queue_manager *dqm,
|
||||
qpd->sh_mem_ape1_base = 0;
|
||||
}
|
||||
|
||||
if (KFD_SUPPORT_XNACK_PER_PROCESS(dqm->dev)) {
|
||||
if (!pdd->process->xnack_enabled) {
|
||||
qpd->sh_mem_config |= 1 << SH_MEM_CONFIG__RETRY_DISABLE__SHIFT;
|
||||
qpd->vm_cntx_cntl &=
|
||||
xnack_enabled = KFD_SUPPORT_XNACK_PER_PROCESS(dqm->dev) ?
|
||||
pdd->process->xnack_enabled :
|
||||
!pdd->dev->kfd->noretry;
|
||||
|
||||
if (!xnack_enabled) {
|
||||
qpd->sh_mem_config |= 1 << SH_MEM_CONFIG__RETRY_DISABLE__SHIFT;
|
||||
qpd->vm_cntx_cntl &=
|
||||
~(1 << GCVM_CONTEXT0_CNTL__RETRY_PERMISSION_OR_INVALID_PAGE_FAULT__SHIFT);
|
||||
} else {
|
||||
qpd->sh_mem_config &= ~(1 << SH_MEM_CONFIG__RETRY_DISABLE__SHIFT);
|
||||
qpd->vm_cntx_cntl |=
|
||||
} else {
|
||||
qpd->sh_mem_config &= ~(1 << SH_MEM_CONFIG__RETRY_DISABLE__SHIFT);
|
||||
qpd->vm_cntx_cntl |=
|
||||
(1 << GCVM_CONTEXT0_CNTL__RETRY_PERMISSION_OR_INVALID_PAGE_FAULT__SHIFT);
|
||||
}
|
||||
}
|
||||
|
||||
qpd->sh_mem_bases = compute_sh_mem_bases_64bit(pdd);
|
||||
|
||||
@@ -215,8 +215,7 @@ enum cache_policy {
|
||||
((KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 2)) || \
|
||||
(KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 3)) || \
|
||||
(KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 4)) || \
|
||||
(KFD_GC_VERSION(dev) == IP_VERSION(9, 5, 0)) || \
|
||||
(KFD_GC_VERSION(dev) == IP_VERSION(12, 1, 0)))
|
||||
(KFD_GC_VERSION(dev) == IP_VERSION(9, 5, 0)))
|
||||
|
||||
struct kfd_node;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user