Commit 07fde11f authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: program fbc for scatter/gather

Fixing screen flickering when FBC enabled on Stoney
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1e4cee77
......@@ -189,7 +189,7 @@ void dce110_compressor_enable_fbc(
(!dce110_compressor_is_fbc_enabled_in_hw(compressor, NULL))) {
uint32_t addr;
uint32_t value;
uint32_t value, misc_value;
addr = mmFBC_CNTL;
......@@ -206,9 +206,23 @@ void dce110_compressor_enable_fbc(
compressor->attached_inst = params->inst;
cp110->offsets = reg_offsets[params->inst];
/*Toggle it as there is bug in HW */
/* Toggle it as there is bug in HW */
set_reg_field_value(value, 0, FBC_CNTL, FBC_GRPH_COMP_EN);
dm_write_reg(compressor->ctx, addr, value);
/* FBC usage with scatter & gather for dce110 */
misc_value = dm_read_reg(compressor->ctx, mmFBC_MISC);
set_reg_field_value(misc_value, 1,
FBC_MISC, FBC_INVALIDATE_ON_ERROR);
set_reg_field_value(misc_value, 1,
FBC_MISC, FBC_DECOMPRESS_ERROR_CLEAR);
set_reg_field_value(misc_value, 0x14,
FBC_MISC, FBC_SLOW_REQ_INTERVAL);
dm_write_reg(compressor->ctx, mmFBC_MISC, misc_value);
/* Enable FBC */
set_reg_field_value(value, 1, FBC_CNTL, FBC_GRPH_COMP_EN);
dm_write_reg(compressor->ctx, addr, value);
......
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