diff options
author | Koen Kooi <k-kooi@ti.com> | 2009-09-30 10:26:42 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-10-01 19:48:39 +0200 |
commit | 02b1862a3b96784cd8caeb5d86c331fa5bbc2b84 (patch) | |
tree | 5590c4f4da9f9923ab5b6a626a719ac662f4bc24 /recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch | |
parent | 6e779f0d529fa60a4a322868766b3bba3832a622 (diff) | |
download | openembedded-02b1862a3b96784cd8caeb5d86c331fa5bbc2b84.tar.gz |
omap kernels: sync with .dev
Omap kernels in .dev have seen a big number of improvements, the most notable
change being the mem-hole issue being resolved.
Like the u-boot change this also adds support for new machines
Signed-off-by: Koen Kooi <k-kooi@ti.com>
Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Acked-by: Philip Balister <philip@balister.org>
Diffstat (limited to 'recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch')
-rw-r--r-- | recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch b/recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch new file mode 100644 index 0000000000..1dd9176001 --- /dev/null +++ b/recipes/linux/linux-omap-pm/dss2/0043-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch @@ -0,0 +1,76 @@ +From 99cf62779ad75224b9b8ea6490733ac5557d1763 Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Mon, 20 Apr 2009 14:55:33 +0200 +Subject: [PATCH 043/146] DSS2: add sysfs entry for seting the rotate type + +This can help in utilizing VRAM memory better. Since with VRFB rotation +we waste a lot of physical memory due to the VRFB HW design, provide the +possibility to turn it off and free the extra memory for the use by other +planes for example. +--- + drivers/video/omap2/omapfb/omapfb-sysfs.c | 42 ++++++++++++++++++++++++++++- + 1 files changed, 41 insertions(+), 1 deletions(-) + +diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c +index 2c88718..4e3da42 100644 +--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c ++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c +@@ -43,6 +43,46 @@ static ssize_t show_rotate_type(struct device *dev, + return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->rotation_type); + } + ++static ssize_t store_rotate_type(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct fb_info *fbi = dev_get_drvdata(dev); ++ struct omapfb_info *ofbi = FB2OFB(fbi); ++ struct omapfb2_device *fbdev = ofbi->fbdev; ++ enum omap_dss_rotation_type rot_type; ++ int r; ++ ++ rot_type = simple_strtoul(buf, NULL, 0); ++ ++ if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB) ++ return -EINVAL; ++ ++ omapfb_lock(fbdev); ++ ++ r = 0; ++ if (rot_type == ofbi->rotation_type) ++ goto out; ++ ++ r = -EBUSY; ++ if (ofbi->region.size) ++ goto out; ++ ++ ofbi->rotation_type = rot_type; ++ ++ /* ++ * Since the VRAM for this FB is not allocated at the moment we don't need to ++ * do any further parameter checking at this point. ++ */ ++ ++ r = count; ++out: ++ omapfb_unlock(fbdev); ++ ++ return r; ++} ++ ++ + static ssize_t show_mirror(struct device *dev, + struct device_attribute *attr, char *buf) + { +@@ -327,7 +367,7 @@ static ssize_t show_virt(struct device *dev, + } + + static struct device_attribute omapfb_attrs[] = { +- __ATTR(rotate_type, S_IRUGO, show_rotate_type, NULL), ++ __ATTR(rotate_type, S_IRUGO | S_IWUSR, show_rotate_type, store_rotate_type), + __ATTR(mirror, S_IRUGO | S_IWUSR, show_mirror, store_mirror), + __ATTR(size, S_IRUGO | S_IWUSR, show_size, store_size), + __ATTR(overlays, S_IRUGO | S_IWUSR, show_overlays, store_overlays), +-- +1.6.2.4 + |