diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch new file mode 100644 index 0000000000..b3248527e8 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From 9f8f1613253656f155b3844c8255a560f86e0acd 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, 6 Apr 2009 17:32:05 +0200 | ||
4 | Subject: [PATCH] DSS2: Check scaling limits against proper values | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=utf-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Move the ilace and fieldmode related height adjustments to be performed | ||
10 | before checking the scaling limits. | ||
11 | |||
12 | Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> | ||
13 | --- | ||
14 | drivers/video/omap2/dss/dispc.c | 31 ++++++++++++++++--------------- | ||
15 | 1 files changed, 16 insertions(+), 15 deletions(-) | ||
16 | |||
17 | diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c | ||
18 | index 61861d8..ae7be3d 100644 | ||
19 | --- a/drivers/video/omap2/dss/dispc.c | ||
20 | +++ b/drivers/video/omap2/dss/dispc.c | ||
21 | @@ -1366,10 +1366,25 @@ static int _dispc_setup_plane(enum omap_plane plane, | ||
22 | unsigned offset0, offset1; | ||
23 | s32 row_inc; | ||
24 | s32 pix_inc; | ||
25 | + u16 frame_height = height; | ||
26 | |||
27 | if (paddr == 0) | ||
28 | return -EINVAL; | ||
29 | |||
30 | + if (ilace && height >= out_height) | ||
31 | + fieldmode = 1; | ||
32 | + | ||
33 | + if (ilace) { | ||
34 | + if (fieldmode) | ||
35 | + height /= 2; | ||
36 | + pos_y /= 2; | ||
37 | + out_height /= 2; | ||
38 | + | ||
39 | + DSSDBG("adjusting for ilace: height %d, pos_y %d, " | ||
40 | + "out_height %d\n", | ||
41 | + height, pos_y, out_height); | ||
42 | + } | ||
43 | + | ||
44 | if (plane == OMAP_DSS_GFX) { | ||
45 | if (width != out_width || height != out_height) | ||
46 | return -EINVAL; | ||
47 | @@ -1448,28 +1463,14 @@ static int _dispc_setup_plane(enum omap_plane plane, | ||
48 | return -EINVAL; | ||
49 | } | ||
50 | |||
51 | - if (ilace && height >= out_height) | ||
52 | - fieldmode = 1; | ||
53 | - | ||
54 | calc_rotation_offset(rotation, mirror, | ||
55 | - screen_width, width, height, color_mode, | ||
56 | + screen_width, width, frame_height, color_mode, | ||
57 | fieldmode, | ||
58 | &offset0, &offset1, &row_inc, &pix_inc); | ||
59 | |||
60 | DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n", | ||
61 | offset0, offset1, row_inc, pix_inc); | ||
62 | |||
63 | - if (ilace) { | ||
64 | - if (fieldmode) | ||
65 | - height /= 2; | ||
66 | - pos_y /= 2; | ||
67 | - out_height /= 2; | ||
68 | - | ||
69 | - DSSDBG("adjusting for ilace: height %d, pos_y %d, " | ||
70 | - "out_height %d\n", | ||
71 | - height, pos_y, out_height); | ||
72 | - } | ||
73 | - | ||
74 | _dispc_set_channel_out(plane, channel_out); | ||
75 | _dispc_set_color_mode(plane, color_mode); | ||
76 | |||
77 | -- | ||
78 | 1.5.6.5 | ||
79 | |||