fba2ebd5db42e5ff198550c9dfa6edcaf6eb14a7
[openembedded.git] /
1 From 0db37fa025f0eac64f9fdad49e310d7660f48944 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
3 Date: Tue, 12 May 2009 14:38:05 +0200
4 Subject: [PATCH 68/69] DSS2: Swap field offset values w/ VRFB rotation
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 The field 0 and field 1 offset values were still incorrect when VRFB
10 rotation is used. Swap them to put the fields into proper order.
11
12 Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
13 ---
14  drivers/video/omap2/dss/dispc.c |   17 +++++++++++------
15  1 files changed, 11 insertions(+), 6 deletions(-)
16
17 diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
18 index 5fc9457..b0e4960 100644
19 --- a/drivers/video/omap2/dss/dispc.c
20 +++ b/drivers/video/omap2/dss/dispc.c
21 @@ -1182,6 +1182,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
22  
23         DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
24                         width, height);
25 +
26 +       /*
27 +        * field 0 = even field = bottom field
28 +        * field 1 = odd field = top field
29 +        */
30         switch (rotation + mirror * 4) {
31         case 0:
32         case 2:
33 @@ -1194,11 +1199,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
34                         width = width >> 1;
35         case 1:
36         case 3:
37 -               *offset0 = 0;
38 +               *offset1 = 0;
39                 if (fieldmode)
40 -                       *offset1 = screen_width * ps;
41 +                       *offset0 = screen_width * ps;
42                 else
43 -                       *offset1 = 0;
44 +                       *offset0 = 0;
45  
46                 *row_inc = pixinc(1 + (screen_width - width) +
47                                 (fieldmode ? screen_width : 0),
48 @@ -1216,11 +1221,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
49                         width = width >> 1;
50         case 5:
51         case 7:
52 -               *offset0 = 0;
53 +               *offset1 = 0;
54                 if (fieldmode)
55 -                       *offset1 = screen_width * ps;
56 +                       *offset0 = screen_width * ps;
57                 else
58 -                       *offset1 = 0;
59 +                       *offset0 = 0;
60                 *row_inc = pixinc(1 - (screen_width + width) -
61                                 (fieldmode ? screen_width : 0),
62                                 ps);
63 -- 
64 1.6.2.4
65