From: Ben Skeggs Date: Fri, 5 Aug 2011 05:56:53 +0000 (+1000) Subject: drm/nouveau/dp: preserve non-pattern bits in DP_TRAINING_PATTERN_SET X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b3eb95fd83861a8520a50aee517209b8c8b0505;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drm/nouveau/dp: preserve non-pattern bits in DP_TRAINING_PATTERN_SET Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 7eb841c8ddd9..d3552e766647 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -337,9 +337,16 @@ dp_set_link_config(struct drm_device *dev, struct dp_state *dp) static void dp_set_training_pattern(struct drm_device *dev, struct dp_state *dp, u8 tp) { + u8 sink_tp; + NV_DEBUG_KMS(dev, "training pattern %d\n", tp); + nv_mask(dev, NV50_SOR_DP_CTRL(dp->or, dp->link), 0x0f000000, tp << 24); - auxch_tx(dev, dp->auxch, 8, DP_TRAINING_PATTERN_SET, &tp, 1); + + auxch_tx(dev, dp->auxch, 9, DP_TRAINING_PATTERN_SET, &sink_tp, 1); + sink_tp &= ~DP_TRAINING_PATTERN_MASK; + sink_tp |= tp; + auxch_tx(dev, dp->auxch, 8, DP_TRAINING_PATTERN_SET, &sink_tp, 1); } static const u8 nv50_lane_map[] = { 16, 8, 0, 24 };