diff options
author | Chris Park <[email protected]> | 2021-04-13 22:25:23 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2021-04-28 23:35:50 -0400 |
commit | b2d4b9f72fb14c1e6e4f0128964a84539a72d831 (patch) | |
tree | 9ddd2c4542442efd84097cb7986503dee1a42c62 | |
parent | 63de4f0413fe5487ba5a1ed04c92fa10ca6af7c7 (diff) |
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: Chris Park <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index e57df2f6f824..a869702d77af 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -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; |