Skip to contentSkip to conversation

drm/i915: fix checksum write for automated test reply

PATCH Applied Sivakumar Thulasimani 3 participants 5 messages Aug 7, 2015 – Aug 14, 2015

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

PATCH 1/1 drm/i915: fix checksum write for automated test reply

From: "Thulasimani,Sivakumar" <[email protected]>

DP spec requires the checksum of the last block read to be written when replying to TEST_EDID_READ. This patch fixes the current code to do the same.

v2: removed loop for jumping blocks and performed direct addition as recommended by Daniel

---
 drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +8 -1
index f1b9f93..fa6e202 100644
@@ -4090,9 +4090,16 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
 				      intel_dp->aux.i2c_defer_count);
 		intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE;
 	} else {
+		struct edid *block = intel_connector->detect_edid;
+
+		/* We have to write the checksum
+		 * of the last block read
+		 */
+		block += intel_connector->detect_edid->extensions;
+
 		if (!drm_dp_dpcd_write(&intel_dp->aux,
 					DP_TEST_EDID_CHECKSUM,
-					&intel_connector->detect_edid->checksum,
+					&block->checksum,
 					1))
 			DRM_DEBUG_KMS("Failed to write EDID checksum\n");
 
Signature · 6 lines
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Hi Daniel,
any comments for the patch below ?

regards,
Sivakumar

Quoted 26 lines · Sivakumar Thulasimani

From: "Thulasimani,Sivakumar" <[email protected]>

DP spec requires the checksum of the last block read to be written when replying to TEST_EDID_READ. This patch fixes the current code to do the same.

v2: removed loop for jumping blocks and performed direct addition as recommended by Daniel

---
  drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +4 -0
index f1b9f93..fa6e202 100644
@@ -4090,9 +4090,16 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
  				      intel_dp->aux.i2c_defer_count);
  		intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE;
  	} else {
+		struct edid *block = intel_connector->detect_edid;
+
+		/* We have to write the checksum
+		 * of the last block read

drivers/gpu/drm/i915/intel_dp.c static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp) · line 4105

Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +4 -1
+		 */
+		block += intel_connector->detect_edid->extensions;
+
  		if (!drm_dp_dpcd_write(&intel_dp->aux,
  					DP_TEST_EDID_CHECKSUM,
-					&intel_connector->detect_edid->checksum,
+					&block->checksum,
  					1))
  			DRM_DEBUG_KMS("Failed to write EDID checksum\n");
 

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 2 lines · Sivakumar Thulasimani

Hi Daniel,
any comments for the patch below ?

Find me a reviewer to r-b stamp this patch and I'll merge. -Daniel

Quoted 41 lines

regards,
Sivakumar

Quoted 35 lines · Sivakumar Thulasimani

From: "Thulasimani,Sivakumar" <[email protected]>

DP spec requires the checksum of the last block read to be written when replying to TEST_EDID_READ. This patch fixes the current code to do the same.

v2: removed loop for jumping blocks and performed direct addition as recommended by Daniel

---
 drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +8 -1
index f1b9f93..fa6e202 100644
@@ -4090,9 +4090,16 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
 				      intel_dp->aux.i2c_defer_count);
 		intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE;
 	} else {
+		struct edid *block = intel_connector->detect_edid;
+
+		/* We have to write the checksum
+		 * of the last block read
+		 */
+		block += intel_connector->detect_edid->extensions;
+
 		if (!drm_dp_dpcd_write(&intel_dp->aux,
 					DP_TEST_EDID_CHECKSUM,
-					&intel_connector->detect_edid->checksum,
+					&block->checksum,
 					1))
 			DRM_DEBUG_KMS("Failed to write EDID checksum\n");
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#3 lore raw
In reply to Sivakumar Thulasimani

Looks good to me.

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Sivakumar Thulasimani
Sent: Friday, August 7, 2015 3:15 PM
To: [email protected]; [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: fix checksum write for automated test reply

From: "Thulasimani,Sivakumar" <[email protected]>

DP spec requires the checksum of the last block read to be written when replying to TEST_EDID_READ. This patch fixes the current code to do the same.

v2: removed loop for jumping blocks and performed direct addition as recommended by Daniel

---
 drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +8 -1
@@ -4090,9 +4090,16 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
 				      intel_dp->aux.i2c_defer_count);
 		intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE;
 	} else {
+		struct edid *block = intel_connector->detect_edid;
+
+		/* We have to write the checksum
+		 * of the last block read
+		 */
+		block += intel_connector->detect_edid->extensions;
+
 		if (!drm_dp_dpcd_write(&intel_dp->aux,
 					DP_TEST_EDID_CHECKSUM,
-					&intel_connector->detect_edid->checksum,
+					&block->checksum,
 					1))
 			DRM_DEBUG_KMS("Failed to write EDID checksum\n");
 

--
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 2 lines · Sonika

Looks good to me.

Queued for -next, thanks for the patch.
-Daniel

Quoted 46 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Sivakumar Thulasimani
Sent: Friday, August 7, 2015 3:15 PM
To: [email protected]; [email protected]
Subject: [Intel-gfx] [PATCH] drm/i915: fix checksum write for automated test reply

From: "Thulasimani,Sivakumar" <[email protected]>

DP spec requires the checksum of the last block read to be written when replying to TEST_EDID_READ. This patch fixes the current code to do the same.

v2: removed loop for jumping blocks and performed direct addition as recommended by Daniel

---
 drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +8 -2
@@ -4090,9 +4090,16 @@ static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
 				      intel_dp->aux.i2c_defer_count);
 		intel_dp->compliance_test_data = INTEL_DP_RESOLUTION_FAILSAFE;
 	} else {
+		struct edid *block = intel_connector->detect_edid;
+
+		/* We have to write the checksum
+		 * of the last block read
+		 */
+		block += intel_connector->detect_edid->extensions;
+
 		if (!drm_dp_dpcd_write(&intel_dp->aux,
 					DP_TEST_EDID_CHECKSUM,
-					&intel_connector->detect_edid->checksum,
+					&block->checksum,
 					1))
 			DRM_DEBUG_KMS("Failed to write EDID checksum\n");
 
--

1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx