summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2014-09-29 18:29:52 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-30 09:39:02 +0200
commitce31d9f4fc05964f6c0dd3a8661dc1a1d843a1e2 (patch)
treed1af196c37e353664dffcf0f7034c5b9a9b273f4 /drivers/gpu/drm/i915
parentda09654d777c361006f6ea3452f8de4a374d5783 (diff)
drm/i915: preserve other DP_TEST_SINK bits.
Sink crc was implemented based on dp 1.1 spec that had all TEST_SINK bits reserved reading all 0s. But when reviewing my latest changes on sink crc Todd warned me that on new specs we have other valid bits on this reg that we might want to preserve. Cc: Todd Previte <tprevite@gmail.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Todd Previte <tprevite@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3caac0f01265..342d624f8312 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3817,8 +3817,9 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
if (!(buf & DP_TEST_CRC_SUPPORTED))
return -ENOTTY;
+ drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf);
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
- DP_TEST_SINK_START) < 0)
+ buf | DP_TEST_SINK_START) < 0)
return -EIO;
drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf);
@@ -3837,7 +3838,10 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0)
return -EIO;
- drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK, 0);
+ drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf);
+ drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
+ buf & ~DP_TEST_SINK_START);
+
return 0;
}