Commit b2d4b9f7 authored by Chris Park's avatar Chris Park Committed by Alex Deucher
Browse files

drm/amd/display: Fix BSOD with NULL check



[Why]
CLK mgr is null for server settings.

[How]
Guard the function with NULL check.

Signed-off-by: default avatarChris Park <Chris.Park@amd.com>
Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: default avatarWayne Lin <waynelin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 63de4f04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;