linux-brain/drivers/gpu/drm/amd/amdkfd
Sean Keely 3da13a1e2a drm/amdkfd: Account for SH/SE count when setting up cu masks.
[ Upstream commit 1ec06c2dee679e9f089e78ed20cb74ee90155f61 ]

On systems with multiple SH per SE compute_static_thread_mgmt_se#
is split into independent masks, one for each SH, in the upper and
lower 16 bits.  We need to detect this and apply cu masking to each
SH.  The cu mask bits are assigned first to each SE, then to
alternate SHs, then finally to higher CU id.  This ensures that
the maximum number of SPIs are engaged as early as possible while
balancing CU assignment to each SH.

v2: Use max SH/SE rather than max SH in cu_per_sh.

v3: Fix comment blocks, ensure se_mask is initially zero filled,
    and correctly assign se.sh.cu positions to unset bits in cu_mask.

Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:26:35 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm/amdkfd: Add navi10 support to amdkfd. (v3) 2019-06-21 18:59:24 -05:00
cik_event_interrupt.c
cik_int.h
cik_regs.h
cwsr_trap_handler.h drm/amdkfd: Fix race in gfx10 context restore handler 2020-10-01 13:17:11 +02:00
cwsr_trap_handler_gfx8.asm drm/amdkfd: Remove dead code from gfx8/gfx9 trap handlers 2019-07-30 23:22:18 -05:00
cwsr_trap_handler_gfx9.asm drm/amdkfd: Remove dead code from gfx8/gfx9 trap handlers 2019-07-30 23:22:18 -05:00
cwsr_trap_handler_gfx10.asm drm/amdkfd: Fix race in gfx10 context restore handler 2020-10-01 13:17:11 +02:00
kfd_chardev.c drm/amdkfd: Fix leak in dmabuf import 2020-12-30 11:51:30 +01:00
kfd_crat.c Linux 5.3-rc3 2019-08-09 13:07:28 -05:00
kfd_crat.h drm/amdkfd: Adjust weight to represent num_hops info when report xgmi iolink 2019-05-24 12:20:48 -05:00
kfd_dbgdev.c
kfd_dbgdev.h
kfd_dbgmgr.c
kfd_dbgmgr.h
kfd_debugfs.c drm/amdkfd: Fix cat debugfs hang_hws file causes system crash bug 2021-05-11 14:04:12 +02:00
kfd_device.c drm/amdkfd: kfree the wrong pointer 2020-04-23 10:36:38 +02:00
kfd_device_queue_manager.c drm/amdkfd: Walk through list with dqm lock hold 2021-07-19 08:53:11 +02:00
kfd_device_queue_manager.h drm/amdkfd: Add navi10 support to amdkfd. (v3) 2019-06-21 18:59:24 -05:00
kfd_device_queue_manager_cik.c drm/amdkfd: Introduce asic-specific mqd_manager_init function 2019-05-24 12:21:02 -05:00
kfd_device_queue_manager_v9.c drm/amdkfd: Consistently apply noretry setting 2019-07-16 13:02:55 -05:00
kfd_device_queue_manager_v10.c drm/amdkfd: Use same SQ prefetch setting as amdgpu 2020-11-05 11:43:34 +01:00
kfd_device_queue_manager_vi.c drm/amdkfd: Introduce asic-specific mqd_manager_init function 2019-05-24 12:21:02 -05:00
kfd_doorbell.c
kfd_events.c drm/amdkfd: Cosmetic cleanup 2019-05-24 12:20:48 -05:00
kfd_events.h
kfd_flat_memory.c amd/amdkfd: Add ASIC ARCTURUS to kfd 2019-07-18 14:18:03 -05:00
kfd_int_process_v9.c drm/amdkfd: Support MMHUB1 in kfd interrupt path 2019-07-18 14:18:04 -05:00
kfd_interrupt.c drm/amdkfd: fix a potential NULL pointer dereference (v2) 2019-12-31 16:43:31 +01:00
kfd_iommu.c drm/amdkfd: fix build error with AMD_IOMMU_V2=m 2021-05-14 09:44:23 +02:00
kfd_iommu.h drm/amdkfd: fix build error with AMD_IOMMU_V2=m 2021-05-14 09:44:23 +02:00
kfd_kernel_queue.c amd/amdkfd: Add ASIC ARCTURUS to kfd 2019-07-18 14:18:03 -05:00
kfd_kernel_queue.h drm/amdkfd: Add navi10 support to amdkfd. (v3) 2019-06-21 18:59:24 -05:00
kfd_kernel_queue_cik.c
kfd_kernel_queue_v9.c drm/amdkfd: Support bigger gds size 2019-07-18 14:18:03 -05:00
kfd_kernel_queue_v10.c drm/amdkfd: Add navi10 support to amdkfd. (v3) 2019-06-21 18:59:24 -05:00
kfd_kernel_queue_vi.c drm/amdkfd: Delete alloc_format field from map_queue struct 2019-05-24 12:21:03 -05:00
kfd_module.c drm/amdkfd: Add procfs-style information for KFD processes 2019-06-20 11:34:00 -05:00
kfd_mqd_manager.c drm/amdkfd: Account for SH/SE count when setting up cu masks. 2021-09-22 12:26:35 +02:00
kfd_mqd_manager.h drm/amdkfd: Account for SH/SE count when setting up cu masks. 2021-09-22 12:26:35 +02:00
kfd_mqd_manager_cik.c drm/amdkfd: Separate mqd allocation and initialization 2019-06-11 12:56:59 -05:00
kfd_mqd_manager_v9.c drm/amdkfd: Extend CU mask to 8 SEs (v3) 2019-08-02 10:19:11 -05:00
kfd_mqd_manager_v10.c drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning 2019-07-25 20:13:01 -05:00
kfd_mqd_manager_vi.c drm/amdkfd: Separate mqd allocation and initialization 2019-06-11 12:56:59 -05:00
kfd_packet_manager.c amd/amdkfd: Add ASIC ARCTURUS to kfd 2019-07-18 14:18:03 -05:00
kfd_pasid.c
kfd_pm4_headers.h
kfd_pm4_headers_ai.h drm/amdkfd: Support bigger gds size 2019-07-18 14:18:03 -05:00
kfd_pm4_headers_diq.h
kfd_pm4_headers_vi.h drm/amdkfd: Delete alloc_format field from map_queue struct 2019-05-24 12:21:03 -05:00
kfd_pm4_opcodes.h
kfd_priv.h hmm related patches for 5.4 2019-09-21 10:07:42 -07:00
kfd_process.c drm/amd: fix potential memleak in err branch 2020-06-30 15:37:10 -04:00
kfd_process_queue_manager.c drm/amdkfd: Remove GWS from process during uninit 2019-07-17 13:34:31 -05:00
kfd_queue.c
kfd_topology.c drm/amdkfd: Fix reference count leaks. 2020-09-03 11:26:43 +02:00
kfd_topology.h drm/amdkfd: Fill the name field in node topology with asic name v2 2019-08-21 22:16:28 -05:00
soc15_int.h