mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/amdkfd: Support enumerating non-GPU devices
Modify kfd_topology_enum_kfd_devices(..) function to support non-GPU nodes. The function returned NULL when it encountered non-GPU (say CPU) nodes. This caused kfd_ioctl_create_event and kfd_init_apertures to fail for Intel + Tonga. kfd_topology_enum_kfd_devices will now parse all the nodes and return valid kfd_dev for nodes with GPU. Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
committed by
Oded Gabbay
parent
4f449311e9
commit
6d82eb0ef2
@@ -59,7 +59,7 @@ unsigned int kfd_pasid_alloc(void)
|
||||
struct kfd_dev *dev = NULL;
|
||||
unsigned int i = 0;
|
||||
|
||||
while ((dev = kfd_topology_enum_kfd_devices(i)) != NULL) {
|
||||
while ((kfd_topology_enum_kfd_devices(i, &dev)) == 0) {
|
||||
if (dev && dev->kfd2kgd) {
|
||||
kfd2kgd = dev->kfd2kgd;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user