diff options
author | Koen Kooi <k-kooi@ti.com> | 2010-03-31 12:01:25 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-04-12 19:43:31 +0200 |
commit | a13876b305618e4491524d287f47f0c2f7eafa74 (patch) | |
tree | bcbdc307f931a2bebbe4d0469e565bc911bc5d63 /recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch | |
parent | a4c06e0afce07bca6223eedea39de8d0ab34a94f (diff) | |
download | openembedded-a13876b305618e4491524d287f47f0c2f7eafa74.tar.gz |
linux-omap-psp 2.6.32: update touchbook patches and defconfig
Diffstat (limited to 'recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch')
-rw-r--r-- | recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch new file mode 100644 index 0000000000..3a2f3b268b --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0009-DSS2-fix-rotation-offsets.patch @@ -0,0 +1,69 @@ +From a592b342f23d503feebd3c895b1b6d176e132cdb Mon Sep 17 00:00:00 2001 +From: Gregoire Gentil <gregoire@gentil.com> +Date: Wed, 31 Mar 2010 11:32:23 +0200 +Subject: [PATCH 09/16] DSS2: fix rotation offsets + +--- + drivers/video/omap2/omapfb/omapfb-main.c | 34 +++++++++++++++++++++++++---- + 1 files changed, 29 insertions(+), 5 deletions(-) + +diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c +index c2c9663..1b116b6 100644 +--- a/drivers/video/omap2/omapfb/omapfb-main.c ++++ b/drivers/video/omap2/omapfb/omapfb-main.c +@@ -859,12 +859,14 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, + u32 data_start_p; + void __iomem *data_start_v; + struct omap_overlay_info info; +- int xres, yres; ++ int xres, yres, xoff, yoff; + int screen_width; + int mirror; + int rotation = var->rotate; + int i; + ++ xoff = var->xoffset; ++ yoff = var->yoffset; + for (i = 0; i < ofbi->num_overlays; i++) { + if (ovl != ofbi->overlays[i]) + continue; +@@ -893,10 +895,32 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, + data_start_v = omapfb_get_region_vaddr(ofbi, 0); + } + +- if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) +- offset = calc_rotation_offset_vrfb(var, fix, 0); +- else +- offset = calc_rotation_offset_dma(var, fix, rotation); ++ if (ofbi->rotation == FB_ROTATE_CW || ofbi->rotation == FB_ROTATE_UD) { ++ if (var->yres < var->yres_virtual) { ++ if (var->yoffset) ++ yoff = 0; ++ else ++ yoff = var->yres_virtual - var->yres; ++ } ++ } ++ ++ if (ofbi->rotation == FB_ROTATE_CCW || ofbi->rotation == FB_ROTATE_UD) { ++ if (var->xres < var->xres_virtual) { ++ if (var->xoffset) ++ xoff = 0; ++ else ++ xoff = var->xres_virtual - var->xres; ++ } ++ } ++ ++ if (ofbi->rotation == FB_ROTATE_CW || ofbi->rotation == FB_ROTATE_CCW) { ++ offset = ((xoff * fix->line_length) >> 1) + ++ ((yoff * var->bits_per_pixel) >> 2); ++ } else ++ { ++ offset = yoff * fix->line_length + ++ ((xoff * var->bits_per_pixel) >> 3); ++ } + + data_start_p += offset; + data_start_v += offset; +-- +1.6.6.1 + |