drm/sti: adjust delay for AWG
authorBich Hemon <bich.hemon@st.com>
Tue, 15 Mar 2016 16:11:14 +0000 (17:11 +0100)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 27 Jun 2016 08:18:25 +0000 (10:18 +0200)
Compensate delay introduced by AWG IP during DE generation

Signed-off-by: Bich Hemon <bich.hemon@st.com>
Reviewed-by: Vincent ABRIOU <vincent.abriou@st.com>
drivers/gpu/drm/sti/sti_awg_utils.c
drivers/gpu/drm/sti/sti_vtg.c

index a516eb869f6fe81c71b8b77106a9b6a13777105b..2da7d6866d5de3d566bf8b40211730d3f3fc8f19 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "sti_awg_utils.h"
 
+#define AWG_DELAY (-5)
+
 #define AWG_OPCODE_OFFSET 10
 #define AWG_MAX_ARG       0x3ff
 
@@ -125,7 +127,7 @@ static int awg_generate_line_signal(
                val = timing->blanking_level;
                ret |= awg_generate_instr(RPLSET, val, 0, 0, fwparams);
 
-               val = timing->trailing_pixels - 1;
+               val = timing->trailing_pixels - 1 + AWG_DELAY;
                ret |= awg_generate_instr(SKIP, val, 0, 0, fwparams);
        }
 
index 6bf4ce466d20fc194e968098bf76cca1efa77d84..957ce712ea44b34f83c88f0b789e739615b0ce6b 100644 (file)
@@ -65,7 +65,7 @@
 #define HDMI_DELAY          (5)
 
 /* Delay introduced by the DVO in nb of pixel */
-#define DVO_DELAY           (2)
+#define DVO_DELAY           (7)
 
 /* delay introduced by the Arbitrary Waveform Generator in nb of pixels */
 #define AWG_DELAY_HD        (-9)