drm/amdgpu: Fix handling of KFD initialization failures
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 17 Sep 2020 01:19:34 +0000 (21:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 16:24:11 +0000 (12:24 -0400)
commitc7651b73586600ddf483de51806eada02cb1616e
tree73745b4786f5e16910aa09b900d4ca6449e0596d
parent911d5bd5e7b8531b39301c2c27e5b90d7bd71b88
drm/amdgpu: Fix handling of KFD initialization failures

Remember KFD module initializaton status in a global variable. Skip KFD
device probing when the module was not initialized. Other amdgpu_amdkfd
calls are then protected by the adev->kfd.dev check.

Also print a clear error message when KFD disables itself. Amdgpu
continues its initialization even when KFD failed.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_module.c