video: tegra: dc: increase V_REF_TO_SYNC
Jon Mayo [Tue, 22 Jul 2014 17:50:29 +0000 (10:50 -0700)]
Increase V_REF_TO_SYNC value to the maximum size. This adjusts where the flip
activation occurs and permits spool up to include more of the front porch
time.

Bug 1528419

Change-Id: I981d3ffca49c694acf0806279bcf87d92084169c
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/440817
(cherry picked from commit 1c9c042b31735bb1b04780037ba5d7b6aee9fcd2)
Reviewed-on: http://git-master/r/441378
(cherry picked from commit 24afa49b1c471bdd90f06a5cee840d8101761b31)
Reviewed-on: http://git-master/r/592932
Reviewed-by: Automatic_Commit_Validation_User

drivers/video/tegra/dc/mode.c

index b38e514..b600c70 100644 (file)
@@ -71,7 +71,9 @@ static int calc_h_ref_to_sync(const struct tegra_dc_mode *mode, int *href)
 static int calc_v_ref_to_sync(const struct tegra_dc_mode *mode, int *vref)
 {
        long a;
-       a = 1; /* Constraint 5: V_REF_TO_SYNC >= 1 */
+
+       /* Constraint 5: V_REF_TO_SYNC >= 1 */
+       a = mode->v_front_porch - 1;
 
        /* Constraint 2: V_REF_TO_SYNC + V_SYNC_WIDTH + V_BACK_PORCH > 1 */
        if (a + mode->v_sync_width + mode->v_back_porch <= 1)