amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: Sunpeng.Li@amd.com, Bhawanpreet.Lakha@amd.com,
	Chris Park <Chris.Park@amd.com>,
	Harry.Wentland@amd.com, Martin Leung <martin.leung@amd.com>
Subject: [PATCH 13/17] drm/amd/display: add monitor patch to disable SCDC read/write
Date: Fri,  7 Feb 2020 10:50:06 -0500	[thread overview]
Message-ID: <20200207155010.1070737-14-Rodrigo.Siqueira@amd.com> (raw)
In-Reply-To: <20200207155010.1070737-1-Rodrigo.Siqueira@amd.com>

From: Martin Leung <martin.leung@amd.com>

[why]
customer issue: found that for their specific panel, EDID register space
being overwritten during SCDC read write

[how]
customer accepted HDMI 2 features not working - disabled SCDC read/write
as well as HDMI 2 in general based on monitor patch

Signed-off-by: Martin Leung <martin.leung@amd.com>
Reviewed-by: Chris Park <Chris.Park@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c             | 4 ++++
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c         | 8 ++++++++
 drivers/gpu/drm/amd/display/dc/dc_types.h                 | 1 +
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 5 +++++
 4 files changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index bed57051f04d..66d8d56f6abd 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -977,6 +977,10 @@ static bool dc_link_detect_helper(struct dc_link *link,
 		if ((prev_sink != NULL) && ((edid_status == EDID_THE_SAME) || (edid_status == EDID_OK)))
 			same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid);
 
+		if (&sink->edid_caps.panel_patch.skip_scdc_overwrite)
+			link->ctx->dc->debug.hdmi20_disable = true;
+
+
 		if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
 			sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX) {
 			/*
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index a49c10d5df26..a5586f68b4da 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -686,6 +686,10 @@ void dal_ddc_service_write_scdc_data(struct ddc_service *ddc_service,
 	uint8_t write_buffer[2] = {0};
 	/*Lower than 340 Scramble bit from SCDC caps*/
 
+	if (ddc_service->link->local_sink &&
+		ddc_service->link->local_sink->edid_caps.panel_patch.skip_scdc_overwrite)
+		return;
+
 	dal_ddc_service_query_ddc_data(ddc_service, slave_address, &offset,
 			sizeof(offset), &sink_version, sizeof(sink_version));
 	if (sink_version == 1) {
@@ -715,6 +719,10 @@ void dal_ddc_service_read_scdc_data(struct ddc_service *ddc_service)
 	uint8_t offset = HDMI_SCDC_TMDS_CONFIG;
 	uint8_t tmds_config = 0;
 
+	if (ddc_service->link->local_sink &&
+		ddc_service->link->local_sink->edid_caps.panel_patch.skip_scdc_overwrite)
+		return;
+
 	dal_ddc_service_query_ddc_data(ddc_service, slave_address, &offset,
 			sizeof(offset), &tmds_config, sizeof(tmds_config));
 	if (tmds_config & 0x1) {
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h
index 122c96455792..1490732a4b44 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
@@ -229,6 +229,7 @@ struct dc_panel_patch {
 	unsigned int extra_t12_ms;
 	unsigned int extra_delay_backlight_off;
 	unsigned int extra_t7_ms;
+	unsigned int skip_scdc_overwrite;
 };
 
 struct dc_edid_caps {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
index 1a37c90e9d43..d3617d6785a7 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
@@ -782,6 +782,11 @@ bool dcn10_link_encoder_validate_output_with_stream(
 	struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
 	bool is_valid;
 
+	//if SCDC (340-600MHz) is disabled, set to HDMI 1.4 timing limit
+	if (stream->sink->edid_caps.panel_patch.skip_scdc_overwrite &&
+		enc10->base.features.max_hdmi_pixel_clock > 300000)
+		enc10->base.features.max_hdmi_pixel_clock = 300000;
+
 	switch (stream->signal) {
 	case SIGNAL_TYPE_DVI_SINGLE_LINK:
 	case SIGNAL_TYPE_DVI_DUAL_LINK:
-- 
2.25.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-02-07 15:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 15:49 [PATCH 00/17] DC Patches February 07, 2020 Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 01/17] drm/amd/display: always apply T7/T9 delay logic Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 02/17] drm/amd/display: Don't treat missing command table as failure Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 03/17] drm/amd/display: Remove unused values from psr struct Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 04/17] drm/amd/display: Pass override OUI in to dc_init_data Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 05/17] drm/amd/display: Hookup psr set version call Rodrigo Siqueira
2020-02-07 15:49 ` [PATCH 06/17] drm/amd/display: Add AUX backlight register Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 07/17] drm/amd/display: Add backlight support via AUX Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 08/17] drm/amd/display: Toggle VSR button cause system crash Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 09/17] drm/amd/display: Update register defines Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 10/17] drm/amd/display: Drop unused field from dc_panel_patch Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 11/17] drm/amd/display: 3.2.72 Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 12/17] drm/amd/display: add odm split logic to scaling calculations Rodrigo Siqueira
2020-02-07 15:50 ` Rodrigo Siqueira [this message]
2020-02-07 15:50 ` [PATCH 14/17] drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 15/17] drm/amd/display: Add psr get_state call Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 16/17] drm/amd/display: Use fb_base/fb_offset if available for translation Rodrigo Siqueira
2020-02-07 15:50 ` [PATCH 17/17] drm/amd/display: DCN2.x Do not program DPPCLK if same value Rodrigo Siqueira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200207155010.1070737-14-Rodrigo.Siqueira@amd.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Chris.Park@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=martin.leung@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).