2c90c0cc06f48638aa1fd9e782c0a35134be01fa
[openembedded.git] /
1 From 9bcac9b9e678f476c83b5679b1215b6bc946130a Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
3 Date: Mon, 20 Apr 2009 16:26:18 +0200
4 Subject: [PATCH 41/69] DSS2: Disable vertical offset with fieldmode
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 When using fieldmode each field is basically a separate picture so the
10 vertical filter should start at phase 0 for both fields.
11
12 Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
13 ---
14  drivers/video/omap2/dss/dispc.c |   23 +++++++++--------------
15  1 files changed, 9 insertions(+), 14 deletions(-)
16
17 diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
18 index 7e551c2..f15614b 100644
19 --- a/drivers/video/omap2/dss/dispc.c
20 +++ b/drivers/video/omap2/dss/dispc.c
21 @@ -1029,12 +1029,12 @@ static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
22  static void _dispc_set_scaling(enum omap_plane plane,
23                 u16 orig_width, u16 orig_height,
24                 u16 out_width, u16 out_height,
25 -               bool ilace, bool five_taps)
26 +               bool ilace, bool five_taps,
27 +               bool fieldmode)
28  {
29         int fir_hinc;
30         int fir_vinc;
31         int hscaleup, vscaleup;
32 -       int fieldmode = 0;
33         int accu0 = 0;
34         int accu1 = 0;
35         u32 l;
36 @@ -1072,17 +1072,12 @@ static void _dispc_set_scaling(enum omap_plane plane,
37  
38         dispc_write_reg(dispc_reg_att[plane], l);
39  
40 -       if (ilace) {
41 -               if (fieldmode) {
42 -                       accu0 = fir_vinc / 2;
43 -                       accu1 = 0;
44 -               } else {
45 -                       accu0 = 0;
46 -                       accu1 = fir_vinc / 2;
47 -                       if (accu1 >= 1024/2) {
48 -                               accu0 = 1024/2;
49 -                               accu1 -= accu0;
50 -                       }
51 +       if (ilace && !fieldmode) {
52 +               accu0 = 0;
53 +               accu1 = fir_vinc / 2;
54 +               if (accu1 >= 1024/2) {
55 +                       accu0 = 1024/2;
56 +                       accu1 -= accu0;
57                 }
58         }
59  
60 @@ -1582,7 +1577,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
61         if (plane != OMAP_DSS_GFX) {
62                 _dispc_set_scaling(plane, width, height,
63                                    out_width, out_height,
64 -                                  ilace, five_taps);
65 +                                  ilace, five_taps, fieldmode);
66                 _dispc_set_vid_size(plane, out_width, out_height);
67                 _dispc_set_vid_color_conv(plane, cconv);
68         }
69 -- 
70 1.6.2.4
71