Commit 2f3bfb27 authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: safeguard compressor api

Only call compressor api if it's available.
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d6356b0
...@@ -1185,6 +1185,7 @@ static void power_down_all_hw_blocks(struct core_dc *dc) ...@@ -1185,6 +1185,7 @@ static void power_down_all_hw_blocks(struct core_dc *dc)
power_down_clock_sources(dc); power_down_clock_sources(dc);
#ifdef ENABLE_FBC #ifdef ENABLE_FBC
if (dc->fbc_compressor)
dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor); dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);
#endif #endif
} }
...@@ -1658,6 +1659,7 @@ enum dc_status dce110_apply_ctx_to_hw( ...@@ -1658,6 +1659,7 @@ enum dc_status dce110_apply_ctx_to_hw(
set_safe_displaymarks(&context->res_ctx, dc->res_pool); set_safe_displaymarks(&context->res_ctx, dc->res_pool);
#ifdef ENABLE_FBC #ifdef ENABLE_FBC
if (dc->fbc_compressor)
dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor); dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);
#endif #endif
/*TODO: when pplib works*/ /*TODO: when pplib works*/
...@@ -2246,6 +2248,7 @@ static void init_hw(struct core_dc *dc) ...@@ -2246,6 +2248,7 @@ static void init_hw(struct core_dc *dc)
abm->funcs->abm_init(abm); abm->funcs->abm_init(abm);
} }
#ifdef ENABLE_FBC #ifdef ENABLE_FBC
if (dc->fbc_compressor)
dc->fbc_compressor->funcs->power_up_fbc(dc->fbc_compressor); dc->fbc_compressor->funcs->power_up_fbc(dc->fbc_compressor);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment