]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: Fix BSOD with NULL check
authorChris Park <Chris.Park@amd.com>
Wed, 14 Apr 2021 02:25:23 +0000 (22:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:35:50 +0000 (23:35 -0400)
[Why]
CLK mgr is null for server settings.

[How]
Guard the function with NULL check.

Signed-off-by: Chris Park <Chris.Park@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Wayne Lin <waynelin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index e57df2f6f82473c2ce937ecbefb64d8e5b6711b2..a869702d77af50b3c758c4cc3bc5d6c1796118a6 100644 (file)
@@ -3274,7 +3274,7 @@ void dc_allow_idle_optimizations(struct dc *dc, bool allow)
        if (dc->debug.disable_idle_power_optimizations)
                return;
 
-       if (dc->clk_mgr->funcs->is_smu_present)
+       if (dc->clk_mgr != NULL && dc->clk_mgr->funcs->is_smu_present)
                if (!dc->clk_mgr->funcs->is_smu_present(dc->clk_mgr))
                        return;