video: tegra: dc: moved KSV reads before V'
Sharath Sarangpur [Mon, 23 Nov 2015 23:04:41 +0000 (15:04 -0800)]
Moved KSV reads before reading V'

bug 200144160

Change-Id: If74570c2e37e6d9df5aada1a055d104ebe65449e
Signed-off-by: Sharath Sarangpur <ssarangpur@nvidia.com>
Reviewed-on: http://git-master/r/837486
Reviewed-by: Mitch Luban <mluban@nvidia.com>

drivers/video/tegra/dc/nvhdcp.c

index 4404c4d..4704345 100644 (file)
@@ -830,13 +830,6 @@ static int get_repeater_info(struct tegra_nvhdcp *nvhdcp)
                return -ETIMEDOUT;
        }
 
-       memset(nvhdcp->v_prime, 0, sizeof nvhdcp->v_prime);
-       e = get_vprime(nvhdcp, nvhdcp->v_prime);
-       if (e) {
-               nvhdcp_err("repeater Vprime read failure!\n");
-               return e;
-       }
-
        e = nvhdcp_i2c_read16(nvhdcp, 0x41, &b_status);
        if (e) {
                nvhdcp_err("Bstatus read failure!\n");
@@ -865,6 +858,13 @@ static int get_repeater_info(struct tegra_nvhdcp *nvhdcp)
                return e;
        }
 
+       memset(nvhdcp->v_prime, 0, sizeof nvhdcp->v_prime);
+       e = get_vprime(nvhdcp, nvhdcp->v_prime);
+       if (e) {
+               nvhdcp_err("repeater Vprime read failure!\n");
+               return e;
+       }
+
        return 0;
 }