diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2020-09-17 04:19:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-09-22 19:24:11 +0300 |
commit | c7651b73586600ddf483de51806eada02cb1616e (patch) | |
tree | 73745b4786f5e16910aa09b900d4ca6449e0596d /drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | |
parent | 911d5bd5e7b8531b39301c2c27e5b90d7bd71b88 (diff) | |
download | linux-c7651b73586600ddf483de51806eada02cb1616e.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_chardev.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index b7b16adb0615..297484ca7d19 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -97,6 +97,7 @@ void kfd_chardev_exit(void) device_destroy(kfd_class, MKDEV(kfd_char_dev_major, 0)); class_destroy(kfd_class); unregister_chrdev(kfd_char_dev_major, kfd_dev_name); + kfd_device = NULL; } struct device *kfd_chardev(void) |