Commit a4b0a5b8 authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/display: Tidy up dce120_timing_generator_enable_advanced_request()

Simplify the function by removing identical looking code blocks.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0a5c357a
...@@ -669,36 +669,23 @@ void dce120_timing_generator_enable_advanced_request( ...@@ -669,36 +669,23 @@ void dce120_timing_generator_enable_advanced_request(
mmCRTC0_CRTC_START_LINE_CONTROL, mmCRTC0_CRTC_START_LINE_CONTROL,
tg110->offsets.crtc); tg110->offsets.crtc);
set_reg_field_value(
if (enable) { value,
set_reg_field_value( enable ? 0 : 1,
value, CRTC0_CRTC_START_LINE_CONTROL,
0, CRTC_LEGACY_REQUESTOR_EN);
CRTC0_CRTC_START_LINE_CONTROL,
CRTC_LEGACY_REQUESTOR_EN);
} else {
set_reg_field_value(
value,
1,
CRTC0_CRTC_START_LINE_CONTROL,
CRTC_LEGACY_REQUESTOR_EN);
}
/* Program advanced line position acc.to the best case from fetching data perspective to hide MC latency /* Program advanced line position acc.to the best case from fetching data perspective to hide MC latency
* and prefilling Line Buffer in V Blank (to 10 lines as LB can store max 10 lines) * and prefilling Line Buffer in V Blank (to 10 lines as LB can store max 10 lines)
*/ */
if (v_sync_width_and_b_porch > 10) if (v_sync_width_and_b_porch > 10)
set_reg_field_value( v_sync_width_and_b_porch = 10;
value,
10, set_reg_field_value(
CRTC0_CRTC_START_LINE_CONTROL, value,
CRTC_ADVANCED_START_LINE_POSITION); v_sync_width_and_b_porch,
else CRTC0_CRTC_START_LINE_CONTROL,
set_reg_field_value( CRTC_ADVANCED_START_LINE_POSITION);
value,
v_sync_width_and_b_porch,
CRTC0_CRTC_START_LINE_CONTROL,
CRTC_ADVANCED_START_LINE_POSITION);
dm_write_reg_soc15(tg->ctx, dm_write_reg_soc15(tg->ctx,
mmCRTC0_CRTC_START_LINE_CONTROL, mmCRTC0_CRTC_START_LINE_CONTROL,
......
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