diff options
Diffstat (limited to 'recipes/linux/linux-omap-pm/dss2/0135-DSS2-VRAM-Add-defines-for-VRAM-types.patch')
-rw-r--r-- | recipes/linux/linux-omap-pm/dss2/0135-DSS2-VRAM-Add-defines-for-VRAM-types.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/dss2/0135-DSS2-VRAM-Add-defines-for-VRAM-types.patch b/recipes/linux/linux-omap-pm/dss2/0135-DSS2-VRAM-Add-defines-for-VRAM-types.patch new file mode 100644 index 0000000000..a139847f4f --- /dev/null +++ b/recipes/linux/linux-omap-pm/dss2/0135-DSS2-VRAM-Add-defines-for-VRAM-types.patch @@ -0,0 +1,89 @@ +From 9a472e2308e253e64652ff35954c05525abfb10a Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen <tomi.valkeinen@nokia.com> +Date: Wed, 1 Jul 2009 14:42:52 +0300 +Subject: [PATCH 135/146] DSS2: VRAM: Add defines for VRAM types + +Also clean up includes a bit. + +Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> +--- + arch/arm/plat-omap/include/mach/vram.h | 4 ++++ + arch/arm/plat-omap/vram.c | 11 +++++------ + drivers/video/omap2/omapfb/omapfb-main.c | 2 +- + 3 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/plat-omap/include/mach/vram.h b/arch/arm/plat-omap/include/mach/vram.h +index 494ddde..66b788e 100644 +--- a/arch/arm/plat-omap/include/mach/vram.h ++++ b/arch/arm/plat-omap/include/mach/vram.h +@@ -24,6 +24,10 @@ + + #include <asm/types.h> + ++#define OMAP_VRAM_MEMTYPE_SDRAM 0 ++#define OMAP_VRAM_MEMTYPE_SRAM 1 ++#define OMAP_VRAM_MEMTYPE_MAX 1 ++ + extern int omap_vram_add_region(unsigned long paddr, size_t size); + extern int omap_vram_free(unsigned long paddr, size_t size); + extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr); +diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c +index 940c25d..2954764 100644 +--- a/arch/arm/plat-omap/vram.c ++++ b/arch/arm/plat-omap/vram.c +@@ -22,16 +22,15 @@ + + /*#define DEBUG*/ + +-#include <linux/vmalloc.h> + #include <linux/kernel.h> + #include <linux/mm.h> + #include <linux/list.h> +-#include <linux/dma-mapping.h> + #include <linux/seq_file.h> + #include <linux/bootmem.h> +-#include <linux/omapfb.h> + #include <linux/completion.h> + #include <linux/debugfs.h> ++#include <linux/jiffies.h> ++#include <linux/module.h> + + #include <asm/setup.h> + +@@ -82,9 +81,9 @@ static inline int region_mem_type(unsigned long paddr) + { + if (paddr >= OMAP2_SRAM_START && + paddr < OMAP2_SRAM_START + OMAP2_SRAM_SIZE) +- return OMAPFB_MEMTYPE_SRAM; ++ return OMAP_VRAM_MEMTYPE_SRAM; + else +- return OMAPFB_MEMTYPE_SDRAM; ++ return OMAP_VRAM_MEMTYPE_SDRAM; + } + + static struct vram_region *omap_vram_create_region(unsigned long paddr, +@@ -374,7 +373,7 @@ int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr) + unsigned pages; + int r; + +- BUG_ON(mtype > OMAPFB_MEMTYPE_MAX || !size); ++ BUG_ON(mtype > OMAP_VRAM_MEMTYPE_MAX || !size); + + DBG("alloc mem type %d size %d\n", mtype, size); + +diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c +index b806dc9..45f087f 100644 +--- a/drivers/video/omap2/omapfb/omapfb-main.c ++++ b/drivers/video/omap2/omapfb/omapfb-main.c +@@ -1204,7 +1204,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size, + + if (!paddr) { + DBG("allocating %lu bytes for fb %d\n", size, ofbi->id); +- r = omap_vram_alloc(OMAPFB_MEMTYPE_SDRAM, size, &paddr); ++ r = omap_vram_alloc(OMAP_VRAM_MEMTYPE_SDRAM, size, &paddr); + } else { + DBG("reserving %lu bytes at %lx for fb %d\n", size, paddr, + ofbi->id); +-- +1.6.2.4 + |