diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-22 04:46:13 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-22 04:46:13 +0000 |
commit | 2852caa1af03babdb86e759e9d4abc00b3d70c2f (patch) | |
tree | 1741c8430a29751d349d4751501ccb7fbfa20160 /sys/dev/pci | |
parent | b8e967f4cf4ebe91b34a66ce1f43196e3d65ee31 (diff) |
drm/amdgpu/display: properly guard the calls to swSMU functions
From Alex Deucher
bb4960cc236b57708c44d11e272a9eeff66e90d9 in linux 5.7.y/5.7.16
4072327a2622af8688b88f5cd0a472136d3bf33d in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c index 7cee8070cb1..5c6a6ae48d3 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c @@ -106,7 +106,7 @@ bool dm_pp_apply_display_requirements( adev->powerplay.pp_funcs->display_configuration_change( adev->powerplay.pp_handle, &adev->pm.pm_display_cfg); - else + else if (adev->smu.ppt_funcs) smu_display_configuration_change(smu, &adev->pm.pm_display_cfg); @@ -592,7 +592,7 @@ void pp_rv_set_wm_ranges(struct pp_smu *pp, if (pp_funcs && pp_funcs->set_watermarks_for_clocks_ranges) pp_funcs->set_watermarks_for_clocks_ranges(pp_handle, &wm_with_clock_ranges); - else + else if (adev->smu.ppt_funcs) smu_set_watermarks_for_clock_ranges(&adev->smu, &wm_with_clock_ranges); } |