OSDN Git Service

drm/amdkfd: Add device to topology after it is completely inited
authorOak Zeng <Oak.Zeng@amd.com>
Mon, 10 Jun 2019 19:44:07 +0000 (14:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 17:57:33 +0000 (12:57 -0500)
commit465ab9e02aacb0588748690b27f7f3f837b74567
tree682962377fce814a1dc6d73101e3f991e7bbd3a6
parent1ae99eab34f90c3a5319c79a910e6b71313a9aab
drm/amdkfd: Add device to topology after it is completely inited

We can't have devices that are not completely initialized in kfd topology.
Otherwise it is a race condition when user access not completely
initialized device. This also addresses a kfd_topology_add_device accessing
NULL dqm pointer issue.

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c