[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Kent Russell <[email protected]>
> -----Original Message----- > From: amd-gfx <[email protected]> On Behalf Of Mario > Limonciello (AMD) > Sent: Sunday, December 7, 2025 9:04 AM > To: [email protected] > Cc: Mario Limonciello (AMD) <[email protected]> > Subject: [PATCH 1/2] amdkfd: Only ignore -ENOENT for KFD init failuires > > 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. > > Signed-off-by: Mario Limonciello (AMD) <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index 16adeba4d7e68..e804461e5f272 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -3169,8 +3169,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); > -- > 2.43.0
