All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jerry (Fangzhi) Zuo" <Jerry.Zuo@amd.com>
To: <intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	<amd-gfx@lists.freedesktop.org>
Cc: rodrigo.siqueira@amd.com, Jerry.Zuo@amd.com,
	Alexander.Deucher@amd.com, harry.wentland@amd.com,
	nicholas.kazlauskas@amd.com
Subject: [Intel-gfx] [RESEND 2/2] drm/amd/display: Hook up drm interface for DP 1.4 edid corruption test
Date: Mon, 2 Dec 2019 14:04:49 -0500	[thread overview]
Message-ID: <20191202190449.2864-3-Jerry.Zuo@amd.com> (raw)
Message-ID: <20191202190449.MDNNW-u7Z47_znS6ATSzMM0Pd8J3ICzOVw6ZP9B3aMc@z> (raw)
In-Reply-To: <20191202190449.2864-1-Jerry.Zuo@amd.com>

-v3: Rename to avoid confusion

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  | 35 +++++-----------------
 1 file changed, 7 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 11e5784aa62a..927fdac77b6f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -575,6 +575,7 @@ enum dc_edid_status dm_helpers_read_local_edid(
 		struct dc_sink *sink)
 {
 	struct amdgpu_dm_connector *aconnector = link->priv;
+	struct drm_connector *connector = &aconnector->base;
 	struct i2c_adapter *ddc;
 	int retry = 3;
 	enum dc_edid_status edid_status;
@@ -592,6 +593,12 @@ enum dc_edid_status dm_helpers_read_local_edid(
 
 		edid = drm_get_edid(&aconnector->base, ddc);
 
+		if (link->aux_mode && connector->edid_corrupt)
+			drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux, connector->real_edid_checksum);
+
+		if (!edid && connector->edid_corrupt)
+			return EDID_BAD_CHECKSUM;
+
 		if (!edid)
 			return EDID_NO_RESPONSE;
 
@@ -612,34 +619,6 @@ enum dc_edid_status dm_helpers_read_local_edid(
 		DRM_ERROR("EDID err: %d, on connector: %s",
 				edid_status,
 				aconnector->base.name);
-	if (link->aux_mode) {
-		union test_request test_request = { {0} };
-		union test_response test_response = { {0} };
-
-		dm_helpers_dp_read_dpcd(ctx,
-					link,
-					DP_TEST_REQUEST,
-					&test_request.raw,
-					sizeof(union test_request));
-
-		if (!test_request.bits.EDID_READ)
-			return edid_status;
-
-		test_response.bits.EDID_CHECKSUM_WRITE = 1;
-
-		dm_helpers_dp_write_dpcd(ctx,
-					link,
-					DP_TEST_EDID_CHECKSUM,
-					&sink->dc_edid.raw_edid[sink->dc_edid.length-1],
-					1);
-
-		dm_helpers_dp_write_dpcd(ctx,
-					link,
-					DP_TEST_RESPONSE,
-					&test_response.raw,
-					sizeof(test_response));
-
-	}
 
 	return edid_status;
 }
-- 
2.14.1

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

  parent reply	other threads:[~2019-12-02 19:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 19:04 [RESEND 0/2] Changes for DP 1.4 Compliance test 4.2.2.6 Jerry (Fangzhi) Zuo
2019-12-02 19:04 ` Jerry (Fangzhi) Zuo
2019-12-02 19:04 ` [Intel-gfx] " Jerry (Fangzhi) Zuo
2019-12-02 19:04 ` Jerry (Fangzhi) Zuo
     [not found] ` <20191202190449.2864-1-Jerry.Zuo-5C7GfCeVMHo@public.gmane.org>
2019-12-02 19:04   ` [RESEND 1/2] drm: Add support for DP 1.4 Compliance edid corruption " Jerry (Fangzhi) Zuo
2019-12-02 19:04     ` Jerry (Fangzhi) Zuo
2019-12-02 19:04     ` [Intel-gfx] " Jerry (Fangzhi) Zuo
2019-12-02 19:04     ` Jerry (Fangzhi) Zuo
2019-12-02 19:04   ` Jerry (Fangzhi) Zuo [this message]
2019-12-02 19:04     ` [RESEND 2/2] drm/amd/display: Hook up drm interface for DP 1.4 edid corruption test Jerry (Fangzhi) Zuo
2019-12-02 19:04     ` [Intel-gfx] " Jerry (Fangzhi) Zuo
2019-12-02 19:04     ` Jerry (Fangzhi) Zuo
2019-12-02 20:20 ` ✗ Fi.CI.BUILD: failure for Changes for DP 1.4 Compliance test 4.2.2.6 Patchwork
2019-12-02 20:20   ` [Intel-gfx] " Patchwork

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=20191202190449.2864-3-Jerry.Zuo@amd.com \
    --to=jerry.zuo@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=rodrigo.siqueira@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.