Commit 7a65e88f authored by Ovidiu Bunea's avatar Ovidiu Bunea Committed by Alex Deucher
Browse files

drm/amd/display: Optimize power up sequence for specific OLED



[why & how]
OLED power up sequence takes an extra 150ms via hardcoded delay,
but there is a strict requirement on DisplayOn resume time.
For customer panel, remove these delays to meet target until a
cleaner solution is can be put in place.

Reviewed-by: default avatarCharlene Liu <charlene.liu@amd.com>
Signed-off-by: default avatarOvidiu Bunea <Ovidiu.Bunea@amd.com>
Signed-off-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 57e92d99
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1067,6 +1067,7 @@ struct dc_debug_options {
	unsigned int sharpen_policy;
	unsigned int scale_to_sharpness_policy;
	bool skip_full_updated_if_possible;
	unsigned int enable_oled_edp_power_up_opt;
};


+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ struct dc_panel_patch {
	unsigned int remove_sink_ext_caps;
	unsigned int disable_colorimetry;
	uint8_t blankstream_before_otg_off;
	bool oled_optimize_display_on;
};

struct dc_edid_caps {
+2 −1
Original line number Diff line number Diff line
@@ -1039,7 +1039,8 @@ void dce110_edp_backlight_control(
	link_transmitter_control(ctx->dc_bios, &cntl);

	if (enable && link->dpcd_sink_ext_caps.bits.oled &&
	    !link->dc->config.edp_no_power_sequencing) {
	    !link->dc->config.edp_no_power_sequencing &&
	    !link->local_sink->edid_caps.panel_patch.oled_optimize_display_on) {
		post_T7_delay += link->panel_config.pps.extra_post_t7_ms;
		msleep(post_T7_delay);
	}
+11 −4
Original line number Diff line number Diff line
@@ -2082,6 +2082,9 @@ static enum dc_status enable_link_dp(struct dc_state *state,
	if (link_settings->link_rate == LINK_RATE_LOW)
		skip_video_pattern = false;

	if (stream->sink_patches.oled_optimize_display_on)
		set_default_brightness_aux(link);

	if (perform_link_training_with_retries(link_settings,
					       skip_video_pattern,
					       lt_attempts,
@@ -2105,10 +2108,14 @@ static enum dc_status enable_link_dp(struct dc_state *state,
	if (link->dpcd_sink_ext_caps.bits.oled == 1 ||
		link->dpcd_sink_ext_caps.bits.sdr_aux_backlight_control == 1 ||
		link->dpcd_sink_ext_caps.bits.hdr_aux_backlight_control == 1) {
		if (!stream->sink_patches.oled_optimize_display_on) {
			set_default_brightness_aux(link);
			if (link->dpcd_sink_ext_caps.bits.oled == 1)
				msleep(bl_oled_enable_delay);
			edp_backlight_enable_aux(link, true);
		} else {
			edp_backlight_enable_aux(link, true);
		}
	}

	return status;