]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
amdkfd: Only ignore -ENOENT for KFD init failuires
authorMario Limonciello (AMD) <superm1@kernel.org>
Wed, 10 Dec 2025 20:15:08 +0000 (14:15 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Apr 2026 15:09:05 +0000 (11:09 -0400)
When compiled without CONFIG_HSA_AMD KFD will return -ENOENT.
As other errors will cause KFD functionality issues this is the
only error code that should be ignored at init.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4259a25341abf77939767215706f4e3cfd4b73b8)

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index e47921e2a9af27bd0a037ca8c454d570672a3200..46aae3fad4bf6cdaf17464d1d43dbd0798551f79 100644 (file)
@@ -3158,8 +3158,10 @@ static int __init amdgpu_init(void)
        amdgpu_register_atpx_handler();
        amdgpu_acpi_detect();
 
-       /* Ignore KFD init failures. Normal when CONFIG_HSA_AMD is not set. */
-       amdgpu_amdkfd_init();
+       /* Ignore KFD init failures when CONFIG_HSA_AMD is not set. */
+       r = amdgpu_amdkfd_init();
+       if (r && r != -ENOENT)
+               goto error_fence;
 
        if (amdgpu_pp_feature_mask & PP_OVERDRIVE_MASK) {
                add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);