From e050b3a0e3c6b4f5b2548d394cdf10261cbc51af Mon Sep 17 00:00:00 2001
From: Narender Ankam <nankam@codeaurora.org>
Date: Wed, 4 Oct 2017 18:27:19 +0530
Subject: [PATCH] msm: mdss: dp: fix wrong parsing of sink count

Current Display Port driver is incorrectly parsing sink count
register (0x200) of DPCD. Made changes to parse it correctly
as per DP specification.

Change-Id: Ic858485f19f226f7b2d84f74c97170db8bebf822
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
---
 drivers/video/fbdev/msm/mdss_dp_aux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/msm/mdss_dp_aux.c b/drivers/video/fbdev/msm/mdss_dp_aux.c
index 407f230ca71e..662e55be8b94 100644
--- a/drivers/video/fbdev/msm/mdss_dp_aux.c
+++ b/drivers/video/fbdev/msm/mdss_dp_aux.c
@@ -1558,7 +1558,7 @@ static void dp_sink_parse_sink_count(struct mdss_dp_drv_pdata *ep)
 	data = *bp++;
 
 	/* BIT 7, BIT 5:0 */
-	ep->sink_count.count = (data & BIT(7)) << 6 | (data & 0x63);
+	ep->sink_count.count = (data & BIT(7)) >> 1 | (data & 0x3F);
 	/* BIT 6*/
 	ep->sink_count.cp_ready = data & BIT(6);