diff mbox

drm/i915: fix checksum write for automated test reply

Message ID 000C66961D35964B9714611E548C10AD0C2904F5@BGSMSX104.gar.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sonika.jindal@intel.com Aug. 14, 2015, 8:27 a.m. UTC
Looks good to me.
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>

-----Original Message-----
From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Sivakumar Thulasimani
Sent: Friday, August 7, 2015 3:15 PM
To: daniel@ffwll.ch; intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915: fix checksum write for automated test reply

From: "Thulasimani,Sivakumar" <sivakumar.thulasimani@intel.com>

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

Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--
1.7.9.5

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

Comments

Daniel Vetter Aug. 14, 2015, 9:12 a.m. UTC | #1
On Fri, Aug 14, 2015 at 08:27:45AM +0000, Jindal, Sonika wrote:
> Looks good to me.
> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>

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

> 
> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Sivakumar Thulasimani
> Sent: Friday, August 7, 2015 3:15 PM
> To: daniel@ffwll.ch; intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH] drm/i915: fix checksum write for automated test reply
> 
> From: "Thulasimani,Sivakumar" <sivakumar.thulasimani@intel.com>
> 
> 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
> 
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f1b9f93..fa6e202 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -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
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f1b9f93..fa6e202 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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");