Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dac0c3f authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/display: check if ppfuncs exists before using it



Fixes a crash on asics without powerplay yet (e.g., vega20).

Reviewed-by: default avatarRex <Zhu&lt;rezhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 762f52e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ bool dm_pp_get_clock_levels_by_type_with_latency(
	struct pp_clock_levels_with_latency pp_clks = { 0 };
	const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;

	if (!pp_funcs->get_clock_by_type_with_latency)
	if (!pp_funcs || !pp_funcs->get_clock_by_type_with_latency)
		return false;

	if (pp_funcs->get_clock_by_type_with_latency(pp_handle,