From: Likun Gao Date: Fri, 26 Jul 2024 01:33:17 +0000 (+0800) Subject: drm/amdgpu: fix DF NULL pointer issue for soc24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50808826a64b4957b7088c789e539dd0a75a1560;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: fix DF NULL pointer issue for soc24 If DF function not initialized, NULL pointer issue will happen on soc24. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/soc24.c b/drivers/gpu/drm/amd/amdgpu/soc24.c index 308f32daa7802..d1adf19a51c45 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc24.c +++ b/drivers/gpu/drm/amd/amdgpu/soc24.c @@ -478,7 +478,7 @@ static int soc24_common_hw_init(struct amdgpu_ip_block *ip_block) if (adev->nbio.funcs->remap_hdp_registers) adev->nbio.funcs->remap_hdp_registers(adev); - if (adev->df.funcs->hw_init) + if (adev->df.funcs && adev->df.funcs->hw_init) adev->df.funcs->hw_init(adev); /* enable the doorbell aperture */