]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: fix DF NULL pointer issue for soc24
authorLikun Gao <Likun.Gao@amd.com>
Fri, 26 Jul 2024 01:33:17 +0000 (09:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 17:58:07 +0000 (13:58 -0400)
If DF function not initialized, NULL pointer issue
will happen on soc24.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc24.c

index 308f32daa7802183b0b36081106236854e329e42..d1adf19a51c4507a77a3b595b7e0cec75ece52c9 100644 (file)
@@ -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 */