diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch new file mode 100644 index 0000000000..f643ca64f3 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 5390230ed12585a79683733209db34e9130b8e3b Mon Sep 17 00:00:00 2001 | ||
2 | From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com> | ||
3 | Date: Thu, 9 Apr 2009 15:04:43 +0200 | ||
4 | Subject: [PATCH] DSS2: Prefer 3-tap filter | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=utf-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The 5-tap filter seems rather unstable. With some scaling settings it | ||
10 | works and with some it doesn't even though the functional clock remains | ||
11 | within the TRM limits. So prefer the 3-tap filter unless the functional | ||
12 | clock required for it is too high. | ||
13 | |||
14 | Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> | ||
15 | --- | ||
16 | drivers/video/omap2/dss/dispc.c | 27 ++++++++++++--------------- | ||
17 | 1 files changed, 12 insertions(+), 15 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c | ||
20 | index b8a3329..b631dd8 100644 | ||
21 | --- a/drivers/video/omap2/dss/dispc.c | ||
22 | +++ b/drivers/video/omap2/dss/dispc.c | ||
23 | @@ -1405,15 +1405,10 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height, | ||
24 | } | ||
25 | |||
26 | static unsigned long calc_fclk(u16 width, u16 height, | ||
27 | - u16 out_width, u16 out_height, | ||
28 | - enum omap_color_mode color_mode, bool five_taps) | ||
29 | + u16 out_width, u16 out_height) | ||
30 | { | ||
31 | unsigned int hf, vf; | ||
32 | |||
33 | - if (five_taps) | ||
34 | - return calc_fclk_five_taps(width, height, | ||
35 | - out_width, out_height, color_mode); | ||
36 | - | ||
37 | /* | ||
38 | * FIXME how to determine the 'A' factor | ||
39 | * for the no downscaling case ? | ||
40 | @@ -1494,7 +1489,7 @@ static int _dispc_setup_plane(enum omap_plane plane, | ||
41 | } else { | ||
42 | /* video plane */ | ||
43 | |||
44 | - unsigned long fclk; | ||
45 | + unsigned long fclk = 0; | ||
46 | |||
47 | if (out_width < width / maxdownscale || | ||
48 | out_width > width * 8) | ||
49 | @@ -1530,20 +1525,22 @@ static int _dispc_setup_plane(enum omap_plane plane, | ||
50 | /* Must use 5-tap filter? */ | ||
51 | five_taps = height > out_height * 2; | ||
52 | |||
53 | - /* Try to use 5-tap filter whenever possible. */ | ||
54 | - if (cpu_is_omap34xx() && !five_taps && | ||
55 | - height > out_height && width <= 1024) { | ||
56 | - fclk = calc_fclk_five_taps(width, height, | ||
57 | - out_width, out_height, color_mode); | ||
58 | - if (fclk <= dispc_fclk_rate()) | ||
59 | + if (!five_taps) { | ||
60 | + fclk = calc_fclk(width, height, | ||
61 | + out_width, out_height); | ||
62 | + | ||
63 | + /* Try 5-tap filter if 3-tap fclk is too high */ | ||
64 | + if (cpu_is_omap34xx() && height > out_height && | ||
65 | + fclk > dispc_fclk_rate()) | ||
66 | five_taps = true; | ||
67 | } | ||
68 | |||
69 | if (width > (2048 >> five_taps)) | ||
70 | return -EINVAL; | ||
71 | |||
72 | - fclk = calc_fclk(width, height, out_width, out_height, | ||
73 | - color_mode, five_taps); | ||
74 | + if (five_taps) | ||
75 | + fclk = calc_fclk_five_taps(width, height, | ||
76 | + out_width, out_height, color_mode); | ||
77 | |||
78 | DSSDBG("required fclk rate = %lu Hz\n", fclk); | ||
79 | DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate()); | ||
80 | -- | ||
81 | 1.5.6.5 | ||
82 | |||