Commit 37a99d0e authored by 吴智聪(John Wu)'s avatar 吴智聪(John Wu)

Merge branch 'neuros' of...

Merge branch 'neuros' of ssh://git@git.neuros.com.cn/git/git-pub/osd20/linux-davinci-2.6 into neuros
parents 62922b66 5f49f747
...@@ -508,8 +508,9 @@ source "arch/arm/common/Kconfig" ...@@ -508,8 +508,9 @@ source "arch/arm/common/Kconfig"
config FORCE_MAX_ZONEORDER config FORCE_MAX_ZONEORDER
int int
depends on SA1111 depends on SA1111 || ARCH_DAVINCI
default "9" default "9" if SA1111
default "13" if ARCH_DAVINCI
menu "Bus support" menu "Bus support"
......
...@@ -161,7 +161,8 @@ static struct platform_device ntosd_644xa_nandflash_device = { ...@@ -161,7 +161,8 @@ static struct platform_device ntosd_644xa_nandflash_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) #if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) || \
defined(CONFIG_FB_DM) || defined(CONFIG_FB_DM_MODULE)
static u64 davinci_fb_dma_mask = DMA_32BIT_MASK; static u64 davinci_fb_dma_mask = DMA_32BIT_MASK;
...@@ -240,7 +241,8 @@ static struct platform_device *ntosd_644xa_devices[] __initdata = { ...@@ -240,7 +241,8 @@ static struct platform_device *ntosd_644xa_devices[] __initdata = {
#if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE) #if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
&ntosd_644xa_nandflash_device, &ntosd_644xa_nandflash_device,
#endif #endif
#if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) #if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) || \
defined(CONFIG_FB_DM) || defined(CONFIG_FB_DM_MODULE)
&davinci_fb_device, &davinci_fb_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
......
This diff is collapsed.
...@@ -1857,6 +1857,10 @@ if ARCH_OMAP ...@@ -1857,6 +1857,10 @@ if ARCH_OMAP
source "drivers/video/omap/Kconfig" source "drivers/video/omap/Kconfig"
endif endif
if ARCH_DAVINCI
source "drivers/video/dm/Kconfig"
endif
config FB_VIRTUAL config FB_VIRTUAL
tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
depends on FB depends on FB
......
...@@ -121,6 +121,7 @@ obj-$(CONFIG_FB_IMAC) += imacfb.o ...@@ -121,6 +121,7 @@ obj-$(CONFIG_FB_IMAC) += imacfb.o
obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o
obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_OF) += offb.o
obj-$(CONFIG_FB_OMAP) += omap/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_OMAP) += omap/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_DM) += dm/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_DAVINCI) += davincifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_DAVINCI) += davincifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
# the test framebuffer is last # the test framebuffer is last
......
config FB_DM
tristate "DM frame buffer support (EXPERIMENTAL)"
depends on FB
help
Frame buffer driver for DM644X based boards.
obj-$(CONFIG_FB_DM) += dmfb.o
dmfb-y := dm_main.o
This diff is collapsed.
...@@ -178,6 +178,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask, ...@@ -178,6 +178,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask,
extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order)); extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
void free_pages_exact(void *virt, size_t size);
#define __get_free_page(gfp_mask) \ #define __get_free_page(gfp_mask) \
__get_free_pages((gfp_mask),0) __get_free_pages((gfp_mask),0)
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* *
* REVISION: * REVISION:
* *
* 1) Initial creation. ----------------------------------- 2007-11-13 JChen * 1) Initial creation. ----------------------------------- 2008-06-10 JChen
* 2) Add support for HDMI user interface . --------------- 2008-06-23 JChen
* *
*/ */
...@@ -235,5 +236,7 @@ ...@@ -235,5 +236,7 @@
#define AUDIO_IFOFRAMES_EN_RPT (0x30) #define AUDIO_IFOFRAMES_EN_RPT (0x30)
/*******************************HDMI Interface *********************/
#endif /* NEUROS_SIL9034__H */ #endif /* NEUROS_SIL9034__H */
unifdef-y += sisfb.h unifdef-y += sisfb.h davincifb.h
...@@ -432,6 +432,25 @@ ...@@ -432,6 +432,25 @@
#define OSD_TRANSPVA_RGBTRANS_SHIFT 0 #define OSD_TRANSPVA_RGBTRANS_SHIFT 0
enum
{
DAVINCIFB_WIN_VID0,
DAVINCIFB_WIN_VID1,
DAVINCIFB_WIN_OSD0,
DAVINCIFB_WIN_OSD1,
DAVINCIFB_WINDOWS
};
enum
{
DAVINCIFB_OUT_COMPOSITE,
DAVINCIFB_OUT_COMPONENT,
DAVINCIFB_OUT_SVIDEO,
DAVINCIFB_OUT_RGB,
DAVINCIFB_OUTPUTS
};
#define LCD 0 #define LCD 0
#define NTSC 1 #define NTSC 1
#define PAL 2 #define PAL 2
...@@ -457,4 +476,5 @@ struct zoom_params ...@@ -457,4 +476,5 @@ struct zoom_params
}; };
#define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params) #define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params)
#define FBIO_GETSTD _IOR('F', 0x25, u_int32_t) #define FBIO_GETSTD _IOR('F', 0x25, u_int32_t)
#define FBIO_ENABLE _IOW('F', 0x26, u_int32_t)
#endif /* _DAVINCIFB_H_ */ #endif /* _DAVINCIFB_H_ */
...@@ -1467,6 +1467,59 @@ fastcall void free_pages(unsigned long addr, unsigned int order) ...@@ -1467,6 +1467,59 @@ fastcall void free_pages(unsigned long addr, unsigned int order)
EXPORT_SYMBOL(free_pages); EXPORT_SYMBOL(free_pages);
/**
* alloc_pages_exact - allocate an exact number physically-contiguous pages.
* @size: the number of bytes to allocate
* @gfp_mask: GFP flags for the allocation
*
* This function is similar to alloc_pages(), except that it allocates the
* minimum number of pages to satisfy the request. alloc_pages() can only
* allocate memory in power-of-two pages.
*
* This function is also limited by MAX_ORDER.
*
* Memory allocated by this function must be released by free_pages_exact().
*/
void *alloc_pages_exact(size_t size, gfp_t gfp_mask)
{
unsigned int order = get_order(size);
unsigned long addr;
addr = __get_free_pages(gfp_mask, order);
if (addr) {
unsigned long alloc_end = addr + (PAGE_SIZE << order);
unsigned long used = addr + PAGE_ALIGN(size);
split_page(virt_to_page(addr), order);
while (used < alloc_end) {
free_page(used);
used += PAGE_SIZE;
}
}
return (void *)addr;
}
EXPORT_SYMBOL(alloc_pages_exact);
/**
* free_pages_exact - release memory allocated via alloc_pages_exact()
* @virt: the value returned by alloc_pages_exact.
* @size: size of allocation, same value as passed to alloc_pages_exact().
*
* Release the memory allocated by a previous call to alloc_pages_exact.
*/
void free_pages_exact(void *virt, size_t size)
{
unsigned long addr = (unsigned long)virt;
unsigned long end = addr + PAGE_ALIGN(size);
while (addr < end) {
free_page(addr);
addr += PAGE_SIZE;
}
}
EXPORT_SYMBOL(free_pages_exact);
static unsigned int nr_free_zone_pages(int offset) static unsigned int nr_free_zone_pages(int offset)
{ {
/* Just pick one node, since fallback list is circular */ /* Just pick one node, since fallback list is circular */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment