mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
drm/amdgpu/display: check if ppfuncs exists before using it
Fixes a crash on asics without powerplay yet (e.g., vega20). Reviewed-by: Rex Zhu<rezhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
762f52e9e4
commit
9dac0c3fb4
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue