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

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

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
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1185,6 +1185,7 @@ static void power_down_all_hw_blocks(struct core_dc *dc)
	power_down_clock_sources(dc);

#ifdef ENABLE_FBC
	if (dc->fbc_compressor)
		dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);
#endif
}
@@ -1658,6 +1659,7 @@ enum dc_status dce110_apply_ctx_to_hw(
	set_safe_displaymarks(&context->res_ctx, dc->res_pool);

#ifdef ENABLE_FBC
	if (dc->fbc_compressor)
		dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);
#endif
	/*TODO: when pplib works*/
@@ -2246,6 +2248,7 @@ static void init_hw(struct core_dc *dc)
		abm->funcs->abm_init(abm);
	}
#ifdef ENABLE_FBC
	if (dc->fbc_compressor)
		dc->fbc_compressor->funcs->power_up_fbc(dc->fbc_compressor);
#endif
}