Skip to contentSkip to conversation

drm/amd/display: Add dm support for DP 1.4 Compliance edid corruption test

PATCH In review Jerry (Fangzhi) Zuo 2 participants 6 messages Apr 29, 2020 – May 4, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Add dm support for DP 1.4 Compliance edid corruption test

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40 ++++++-------------
 1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +13 -27
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(
 
 		edid = drm_get_edid(&aconnector->base, ddc);
 
+		/* DP Compliance Test 4.2.2.6 */
+		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) {
+			connector->edid_corrupt = false;
+			return EDID_BAD_CHECKSUM;
+		}
+
 		if (!edid)
 			return EDID_NO_RESPONSE;
 
@@ -605,34 +615,10 @@ 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));
-
-	}
+	/* DP Compliance Test 4.2.2.3 */
+	if (link->aux_mode)
+		drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux, sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
 
 	return edid_status;
 }
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw
Quoted 21 lines · Jerry (Fangzhi) Zuo

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40 ++++++-------------
 1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 581

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +7 -0
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(
 
 		edid = drm_get_edid(&aconnector->base, ddc);
 
+		/* DP Compliance Test 4.2.2.6 */
+		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) {
+			connector->edid_corrupt = false;
+			return EDID_BAD_CHECKSUM;

You return EDID_BAD_CHECKSUM here but the surrounding loop uses "edid_status == EDID_BAD_CHECKSUM" as condition to go again. Is this duplicating functionality that dm_helpers_parse_edid_caps did?

Harry

Quoted 34 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +2 -23
+		}
+
 		if (!edid)
 			return EDID_NO_RESPONSE;
 
@@ -605,34 +615,10 @@ 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,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 624

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +3 -4
-					&test_response.raw,
-					sizeof(test_response));
-
-	}
+	/* DP Compliance Test 4.2.2.3 */
+	if (link->aux_mode)
+		drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux, sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
 
 	return edid_status;
 }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

The error handling for edid read right now is categorized as:
1. If base block is fetched with checksum mismatch, drm will set connector->edid_corrupt and return with Null edid buffer. This case will be handled as compliance test case 4.2.2.6, retuning EDID_BAD_CHECKSUM right away without the need to got ahead to parse edid caps.
2. If edid buffer cannot be created, return EDID_NO_RESPONSE but do not set connector->edid_corrupt
3. For extension blocks, drm returns any valid blocks. For invalid extension blocks, drm doesn't set connector->edid_corrupt. This case will be further handled by dm_helpers_parse_edid_caps() with 3 times retries. If all failed, will return EDID_BAD_CHECKSUM dc as well to enable fail-safe mode.

Regards,
Jerry

-----Original Message-----
From: Wentland, Harry <[email protected]>
Sent: May 1, 2020 10:14 AM
To: Zuo, Jerry <[email protected]>; [email protected]; Wu, Hersen <[email protected]>; S, Shirish <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Siqueira, Rodrigo <[email protected]>
Subject: Re: [PATCH] drm/amd/display: Add dm support for DP 1.4 Compliance edid corruption test

Quoted 24 lines · Jerry (Fangzhi) Zuo

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40
++++++-------------
 1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(
 

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 582

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +8 -0
 edid = drm_get_edid(&aconnector->base, ddc);
 
+/* DP Compliance Test 4.2.2.6 */
+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) {
+connector->edid_corrupt = false;
+return EDID_BAD_CHECKSUM;

You return EDID_BAD_CHECKSUM here but the surrounding loop uses "edid_status == EDID_BAD_CHECKSUM" as condition to go again. Is this duplicating functionality that dm_helpers_parse_edid_caps did?

Harry

Quoted 35 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +2 -24
+}
+
 if (!edid)
 return EDID_NO_RESPONSE;
@@ -605,34 +615,10 @@ 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,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 624

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +4 -3
-sizeof(test_response));
-
-}
+/* DP Compliance Test 4.2.2.3 */
+if (link->aux_mode)
+drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux,
+sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
 
 return edid_status;
 }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#3 lore raw

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: Zuo, Jerry
Sent: May 1, 2020 8:23 PM
To: Wentland, Harry <[email protected]>; [email protected]; Wu, Hersen <[email protected]>; S, Shirish <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Siqueira, Rodrigo <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Add dm support for DP 1.4 Compliance edid corruption test

The error handling for edid read right now is categorized as:
1. If base block is fetched with checksum mismatch, drm will set connector->edid_corrupt and return with Null edid buffer. This case will be handled as compliance test case 4.2.2.6, retuning EDID_BAD_CHECKSUM to dc right away without the need to got ahead to parse edid caps.
2. If edid buffer cannot be created, return EDID_NO_RESPONSE but do not set connector->edid_corrupt
3. For extension blocks, drm returns any valid blocks. For invalid extension blocks, drm doesn't set connector->edid_corrupt. This case will be further handled by dm_helpers_parse_edid_caps() with 3 times retries. If all failed, will return EDID_BAD_CHECKSUM as well to enable fail-safe mode.

Regards,
Jerry

-----Original Message-----
From: Wentland, Harry <[email protected]>
Sent: May 1, 2020 10:14 AM
To: Zuo, Jerry <[email protected]>; [email protected]; Wu, Hersen <[email protected]>; S, Shirish <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Siqueira, Rodrigo <[email protected]>
Subject: Re: [PATCH] drm/amd/display: Add dm support for DP 1.4 Compliance edid corruption test

Quoted 24 lines · Jerry (Fangzhi) Zuo

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40
++++++-------------
 1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(
 

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 582

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +8 -0
 edid = drm_get_edid(&aconnector->base, ddc);
 
+/* DP Compliance Test 4.2.2.6 */
+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) {
+connector->edid_corrupt = false;
+return EDID_BAD_CHECKSUM;

You return EDID_BAD_CHECKSUM here but the surrounding loop uses "edid_status == EDID_BAD_CHECKSUM" as condition to go again. Is this duplicating functionality that dm_helpers_parse_edid_caps did?

Harry

Quoted 35 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +2 -24
+}
+
 if (!edid)
 return EDID_NO_RESPONSE;
@@ -605,34 +615,10 @@ 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,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 624

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +4 -3
-sizeof(test_response));
-
-}
+/* DP Compliance Test 4.2.2.3 */
+if (link->aux_mode)
+drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux,
+sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
 
 return edid_status;
 }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#4 lore raw
In reply to Harry Wentland

[AMD Official Use Only - Internal Distribution Only]

Quoted 21 lines · Jerry (Fangzhi) Zuo

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40 ++++++-------------
 1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 581

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +7 -0
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(
 
               edid = drm_get_edid(&aconnector->base, ddc);
 
+             /* DP Compliance Test 4.2.2.6 */
+             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) {
+                     connector->edid_corrupt = false;
+                     return EDID_BAD_CHECKSUM;

You return EDID_BAD_CHECKSUM here but the surrounding loop uses "edid_status == EDID_BAD_CHECKSUM" as condition to go again. Is this duplicating functionality that dm_helpers_parse_edid_caps did?

Harry

It is not duplicate. You mentioned dm_helpers_parse_edid_caps() with retries is fallen into the 3rd checkup step below:
1. If base block is fetched with checksum mismatch, drm will set connector->edid_corrupt and return with Null edid buffer. This case will be handled as compliance test case 4.2.2.6, retuning EDID_BAD_CHECKSUM right away without going ahead to parse edid caps --> newly added
2. If edid buffer cannot be created, return EDID_NO_RESPONSE but do not set connector->edid_corrupt
3. For invalid extension blocks, drm doesn't set connector->edid_corrupt. This case will be further handled by dm_helpers_parse_edid_caps() with 3 times retries.
If failed any step above with EDID_BAD_CHECKSUM, will enable fail-safe mode in DC.

Jerry

Quoted 34 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +2 -23
+             }
+
               if (!edid)
                       return EDID_NO_RESPONSE;
 
@@ -605,34 +615,10 @@ 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,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c enum dc_edid_status dm_helpers_read_local_edid( · line 624

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +3 -4
-                                     &test_response.raw,
-                                     sizeof(test_response));
-
-     }
+     /* DP Compliance Test 4.2.2.3 */
+     if (link->aux_mode)
+             drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux, sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
 
       return edid_status;
 }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#5 lore raw
Quoted 43 lines · Jerry

[AMD Official Use Only - Internal Distribution Only]

Quoted 23 lines · Jerry (Fangzhi) Zuo

It works together with drm framework
"drm: Add support for DP 1.4 Compliance edid corruption test"

---
  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 40 ++++++-------------

  1 file changed, 13 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index c407f06cd1f5..b086d5c906e0 100644
@@ -554,6 +554,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;
@@ -571,6 +572,15 @@ enum dc_edid_status dm_helpers_read_local_edid(


                edid = drm_get_edid(&aconnector->base, ddc);

Quoted 8 lines


+             /* DP Compliance Test 4.2.2.6 */
+             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) {
+                     connector->edid_corrupt = false;
+                     return EDID_BAD_CHECKSUM;

You return EDID_BAD_CHECKSUM here but the surrounding loop uses "edid_status == EDID_BAD_CHECKSUM" as condition to go again. Is this duplicating functionality that dm_helpers_parse_edid_caps did?

Harry

Quoted 14 lines

It is not duplicate. You mentioned dm_helpers_parse_edid_caps() with retries is fallen into the 3rd checkup step below:
1. If base block is fetched with checksum mismatch, drm will set connector->edid_corrupt and return with Null edid buffer. This case will be handled as compliance test case 4.2.2.6, retuning EDID_BAD_CHECKSUM right away without going ahead to parse edid caps --> newly added
2. If edid buffer cannot be created, return EDID_NO_RESPONSE but do not set connector->edid_corrupt
3. For invalid extension blocks, drm doesn't set connector->edid_corrupt. This case will be further handled by dm_helpers_parse_edid_caps() with 3 times retries.
If failed any step above with EDID_BAD_CHECKSUM, will enable fail-safe mode in DC.

Thanks. Just curious if there's a way to simplify the code.

Either way, this patch is

Harry

Quoted 39 lines

Jerry

Quoted 36 lines

+             }
+
                if (!edid)
                        return EDID_NO_RESPONSE;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +0 -12
@@ -605,34 +615,10 @@ 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;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +0 -13
-
-             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));
-
Quoted 8 lines
Quoted 8 lines

-     }
+     /* DP Compliance Test 4.2.2.3 */
+     if (link->aux_mode)
+             drm_dp_send_real_edid_checksum(&aconnector->dm_dp_aux.aux, sink->dc_edid.raw_edid[sink->dc_edid.length-1]);
        return edid_status;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx