summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-pm/dss2/0040-DSS2-Disable-vertical-offset-with-fieldmode.patch
blob: e153c9c5a4956bb7af16b9d60bb4164bde14a33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From a2649a29d782112aa5e853f71992314f631762e2 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:18 +0200
Subject: [PATCH 040/146] DSS2: Disable vertical offset with fieldmode
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

When using fieldmode each field is basically a separate picture so the
vertical filter should start at phase 0 for both fields.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
---
 drivers/video/omap2/dss/dispc.c |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 7e551c2..f15614b 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1029,12 +1029,12 @@ static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
 static void _dispc_set_scaling(enum omap_plane plane,
 		u16 orig_width, u16 orig_height,
 		u16 out_width, u16 out_height,
-		bool ilace, bool five_taps)
+		bool ilace, bool five_taps,
+		bool fieldmode)
 {
 	int fir_hinc;
 	int fir_vinc;
 	int hscaleup, vscaleup;
-	int fieldmode = 0;
 	int accu0 = 0;
 	int accu1 = 0;
 	u32 l;
@@ -1072,17 +1072,12 @@ static void _dispc_set_scaling(enum omap_plane plane,
 
 	dispc_write_reg(dispc_reg_att[plane], l);
 
-	if (ilace) {
-		if (fieldmode) {
-			accu0 = fir_vinc / 2;
-			accu1 = 0;
-		} else {
-			accu0 = 0;
-			accu1 = fir_vinc / 2;
-			if (accu1 >= 1024/2) {
-				accu0 = 1024/2;
-				accu1 -= accu0;
-			}
+	if (ilace && !fieldmode) {
+		accu0 = 0;
+		accu1 = fir_vinc / 2;
+		if (accu1 >= 1024/2) {
+			accu0 = 1024/2;
+			accu1 -= accu0;
 		}
 	}
 
@@ -1582,7 +1577,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
 	if (plane != OMAP_DSS_GFX) {
 		_dispc_set_scaling(plane, width, height,
 				   out_width, out_height,
-				   ilace, five_taps);
+				   ilace, five_taps, fieldmode);
 		_dispc_set_vid_size(plane, out_width, out_height);
 		_dispc_set_vid_color_conv(plane, cconv);
 	}
-- 
1.6.2.4