]> www.infradead.org Git - users/hch/configfs.git/commit
drm/amdkfd: fix partition query when setting up recommended sdma engines
authorJonathan Kim <Jonathan.Kim@amd.com>
Wed, 7 Aug 2024 19:33:41 +0000 (15:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Aug 2024 14:35:00 +0000 (10:35 -0400)
commit70f83e7706e57200edb8ffa36883b2f43d214142
tree5187d0b70d6320cad19a59de202efa7124d2ab1f
parent9b7e697839c2745c10f63fe5fd54c9e328fa2e3b
drm/amdkfd: fix partition query when setting up recommended sdma engines

When users dynamically set the partition mode through sysfs writes,
this can lead to a double lock situation where the KFD is trying to take
the partition lock when updating the recommended SDMA engines.
Have the KFD reference its saved socket device number count instead.
Also ensure we have enough SDMA xGMI engines to report the recommended
engines in the first place.

Fixes: e06b71b2313a ("drm/amdkfd: allow users to target recommended SDMA engines")
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c