summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch170
1 files changed, 170 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
new file mode 100644
index 0000000000..93ff3205d3
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
@@ -0,0 +1,170 @@
+From b47aef28536f3c276d232c41cd3084c69389dca4 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 22 Apr 2009 14:11:52 +0300
+Subject: [PATCH] DSS2: VRAM: use debugfs, not procfs
+
+---
+ arch/arm/plat-omap/vram.c | 103 +++++++++++++++------------------------------
+ 1 files changed, 34 insertions(+), 69 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index 90276ac..e847579 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -27,11 +27,11 @@
+ #include <linux/mm.h>
+ #include <linux/list.h>
+ #include <linux/dma-mapping.h>
+-#include <linux/proc_fs.h>
+ #include <linux/seq_file.h>
+ #include <linux/bootmem.h>
+ #include <linux/omapfb.h>
+ #include <linux/completion.h>
++#include <linux/debugfs.h>
+
+ #include <asm/setup.h>
+
+@@ -398,88 +398,54 @@ int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr)
+ }
+ EXPORT_SYMBOL(omap_vram_alloc);
+
+-#ifdef CONFIG_PROC_FS
+-static void *r_next(struct seq_file *m, void *v, loff_t *pos)
+-{
+- struct list_head *l = v;
+-
+- (*pos)++;
+-
+- if (list_is_last(l, &region_list))
+- return NULL;
+-
+- return l->next;
+-}
+-
+-static void *r_start(struct seq_file *m, loff_t *pos)
+-{
+- loff_t p = *pos;
+- struct list_head *l = &region_list;
+-
+- mutex_lock(&region_mutex);
+-
+- do {
+- l = l->next;
+- if (l == &region_list)
+- return NULL;
+- } while (p--);
+-
+- return l;
+-}
+-
+-static void r_stop(struct seq_file *m, void *v)
+-{
+- mutex_unlock(&region_mutex);
+-}
+-
+-static int r_show(struct seq_file *m, void *v)
++#if defined(CONFIG_DEBUG_FS)
++static int vram_debug_show(struct seq_file *s, void *unused)
+ {
+ struct vram_region *vr;
+ struct vram_alloc *va;
+ unsigned size;
+
+- vr = list_entry(v, struct vram_region, list);
+-
+- size = vr->pages << PAGE_SHIFT;
+-
+- seq_printf(m, "%08lx-%08lx (%d bytes)\n",
+- vr->paddr, vr->paddr + size - 1,
+- size);
++ mutex_lock(&region_mutex);
+
+- list_for_each_entry(va, &vr->alloc_list, list) {
+- size = va->pages << PAGE_SHIFT;
+- seq_printf(m, " %08lx-%08lx (%d bytes)\n",
+- va->paddr, va->paddr + size - 1,
++ list_for_each_entry(vr, &region_list, list) {
++ size = vr->pages << PAGE_SHIFT;
++ seq_printf(s, "%08lx-%08lx (%d bytes)\n",
++ vr->paddr, vr->paddr + size - 1,
+ size);
+- }
+
++ list_for_each_entry(va, &vr->alloc_list, list) {
++ size = va->pages << PAGE_SHIFT;
++ seq_printf(s, " %08lx-%08lx (%d bytes)\n",
++ va->paddr, va->paddr + size - 1,
++ size);
++ }
++ }
+
++ mutex_unlock(&region_mutex);
+
+ return 0;
+ }
+
+-static const struct seq_operations resource_op = {
+- .start = r_start,
+- .next = r_next,
+- .stop = r_stop,
+- .show = r_show,
+-};
+-
+-static int vram_open(struct inode *inode, struct file *file)
++static int vram_debug_open(struct inode *inode, struct file *file)
+ {
+- return seq_open(file, &resource_op);
++ return single_open(file, vram_debug_show, inode->i_private);
+ }
+
+-static const struct file_operations proc_vram_operations = {
+- .open = vram_open,
+- .read = seq_read,
+- .llseek = seq_lseek,
+- .release = seq_release,
++static const struct file_operations vram_debug_fops = {
++ .open = vram_debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
+ };
+
+-static int __init omap_vram_create_proc(void)
++static int __init omap_vram_create_debugfs(void)
+ {
+- proc_create("omap-vram", 0, NULL, &proc_vram_operations);
++ struct dentry *d;
++
++ d = debugfs_create_file("vram", S_IRUGO, NULL,
++ NULL, &vram_debug_fops);
++ if (IS_ERR(d))
++ return PTR_ERR(d);
+
+ return 0;
+ }
+@@ -487,7 +453,7 @@ static int __init omap_vram_create_proc(void)
+
+ static __init int omap_vram_init(void)
+ {
+- int i, r;
++ int i;
+
+ vram_initialized = 1;
+
+@@ -495,10 +461,9 @@ static __init int omap_vram_init(void)
+ omap_vram_add_region(postponed_regions[i].paddr,
+ postponed_regions[i].size);
+
+-#ifdef CONFIG_PROC_FS
+- r = omap_vram_create_proc();
+- if (r)
+- return -ENOMEM;
++#ifdef CONFIG_DEBUG_FS
++ if (omap_vram_create_debugfs())
++ pr_err("VRAM: Failed to create debugfs file\n");
+ #endif
+
+ return 0;
+--
+1.5.6.5
+