diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch new file mode 100644 index 00000000..51305984 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-Fix-scaling-checks-when-rotation-is-90-or-270-d.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From fc2e9ddb93cb026ed10900d794dd1db11191dc24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tim Yamin <plasm@roo.me.uk> | ||
3 | Date: Fri, 12 Mar 2010 13:57:38 +0100 | ||
4 | Subject: [PATCH 09/17] DSS2: Fix scaling checks when rotation is 90 or 270 degrees. | ||
5 | |||
6 | --- | ||
7 | drivers/video/omap2/dss/dispc.c | 25 +++++++++++++++++++------ | ||
8 | 1 files changed, 19 insertions(+), 6 deletions(-) | ||
9 | |||
10 | diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c | ||
11 | index 1b38c49..d648c08 100644 | ||
12 | --- a/drivers/video/omap2/dss/dispc.c | ||
13 | +++ b/drivers/video/omap2/dss/dispc.c | ||
14 | @@ -1563,16 +1563,29 @@ static int _dispc_setup_plane(enum omap_plane plane, | ||
15 | } | ||
16 | } else { | ||
17 | /* video plane */ | ||
18 | - | ||
19 | + u8 error = 0; | ||
20 | unsigned long fclk = 0; | ||
21 | |||
22 | - if (out_width < width / maxdownscale || | ||
23 | - out_width > width * 8) | ||
24 | - return -EINVAL; | ||
25 | + if(rotation == 1 || rotation == 3) | ||
26 | + { | ||
27 | + if (out_width < height / maxdownscale || out_width > height * 8) | ||
28 | + error = 1; | ||
29 | + | ||
30 | + if (out_height < width / maxdownscale || out_height > width * 8) | ||
31 | + error = 1; | ||
32 | + } else { | ||
33 | + if (out_width < width / maxdownscale || out_width > width * 8) | ||
34 | + error = 1; | ||
35 | |||
36 | - if (out_height < height / maxdownscale || | ||
37 | - out_height > height * 8) | ||
38 | + if (out_height < height / maxdownscale || out_height > height * 8) | ||
39 | + error = 1; | ||
40 | + } | ||
41 | + | ||
42 | + if(error != 0) | ||
43 | + { | ||
44 | + printk("DSS: Unable to down/up scale video plane\n"); | ||
45 | return -EINVAL; | ||
46 | + } | ||
47 | |||
48 | switch (color_mode) { | ||
49 | case OMAP_DSS_COLOR_RGBX32: | ||
50 | -- | ||
51 | 1.6.6.1 | ||
52 | |||