亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? davincifb.c

?? 這是我自已改的適合RGB888的視頻驅動
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * drivers/video/dm64xxfb.c * * Framebuffer driver for Texas Instruments DM644x display controller. * * Copyright (C) 2005 Texas Instruments, Inc. * Rishi Bhattacharya <support@ti.com> * * Leveraged from the framebuffer driver for OMAP24xx  * written by Andy Lowe (source@mvista.com) * Copyright (C) 2004 MontaVista Software, Inc. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied. */#include <linux/module.h>#include <linux/kernel.h>#include <linux/errno.h>#include <linux/string.h>#include <linux/mm.h>#include <linux/tty.h>#include <linux/slab.h>//包含內存分配函數,原來的malloc.h不存在#include <linux/delay.h>#include <linux/fb.h>#include <linux/init.h>#include <linux/dma-mapping.h>#include <linux/interrupt.h>#include <asm/irq.h>#include <asm/uaccess.h>#include <video/davincifb.h>


/*為了定義 pinmux0和pinmux1而包含以下的文件,調試時可根據結果刪減文件*/
/*
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <linux/root_dev.h>

#include <asm/setup.h>
#include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include <asm/io.h>
#include <asm/mach-types.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>

#include <asm/arch/hardware.h>
//#include "clock.h"
#define PINMUX0     __REG(0x01c40000)
#define PINMUX1     __REG(0x01c40004)
///////////////////////////////////////////////////

*/


#define PINMUX0     IO_ADDRESS(0x01c40000)
#define PINMUX1     IO_ADDRESS(0x01c40004)

#define LCDS 7#define PLL IO_ADDRESS(0x01c40c00)#define PLLM (PLL+0x110)      //PLL的默認值是12,與文檔中不一樣#define PLLDIV1 (PLL+0x118)   //PLLDIV1的默認值是5,與文檔中不一樣#define PLLDIV2 (PLL+0x11c)#define POSTDIV (PLL+0x128)#define PLLCTL (PLL+0x100)#define EDMA IO_ADDRESS(0x01c00000)#define EER (EDMA+0x1020)#define EERH (EDMA+0x1024)#define EECR (EDMA+0x1028)#define EECRH (EDMA+0x102c)#define EESR (EDMA+0x1030)#define EESRH (EDMA+0x1034)#define DDR IO_ADDRESS(0x20000000)#define DDR_SDRSTAT (DDR+0x04)#define DDR_SDBCR      (DDR+0x08)#define  DDR_SDRCR (DDR+0x0c)#define DDR_DDRPHYCR (DDR+0xe4)/* Output Format Selection  */#define COMPOSITE_OUTPUT//#define SVIDEO_OUTPUT//#define COMPONENT_OUTPUT//#define	DEBUG#ifdef 	DEBUG#define	DBGENTER	printk("Entered %s\n", __FUNCTION__)#define	DBGEXIT		printk("Exited %s\n", __FUNCTION__)#define	RETURN(x)						\do {								\	int __ret = (x);					\	printk("Exited %s : ret %d\n", __FUNCTION__, __ret);	\	return __ret; 						\} while(0)#else#define	DBGENTER#define	DBGEXIT#define	RETURN(x)	return (x)#endif//#define MULTIPLE_BUFFERING	1 #ifdef MULTIPLE_BUFFERING#define DOUBLE_BUF	2#define TRIPLE_BUF	3#else#define DOUBLE_BUF	1#define TRIPLE_BUF	1#endif/* * display controller register I/O routines */static __inline__ u32dispc_reg_in(u32 offset)       //把offset地址中的值讀入{	return(inl(offset));}static __inline__ u32dispc_reg_out(u32 offset, u32 val)  //把val寫到offset地址中{	/* outw(val, offset);  */	outl(val, offset);	return(val);}static __inline__ u32dispc_reg_merge(u32 offset, u32 val, u32 mask)//寄存器值的合并,把val中mask指定的位寫入到寄存器中{	u32 addr = offset;	u32 new_val = (inl(addr) & ~mask) | (val & mask); 	outl(new_val, addr);                   	return(new_val);}/* There are 4 framebuffers, each represented by an fb_info and  * a dm_win_info structure  */#define DRIVER		"dm64xxfb"
#define OSD0_FBNAME	"dm_osd0_fb"#define OSD1_FBNAME	"dm_osd1_fb"#define VID0_FBNAME	"dm_vid0_fb"#define VID1_FBNAME	"dm_vid1_fb"/* usage:	if (is_win(info->fix.id, OSD0)) ... */#define is_win(name, x) ((strcmp(name, x ## _FBNAME) == 0) ? 1 : 0)  struct dm_win_info {					//窗口的信息結構	struct fb_info	info;			//此窗口的fb_info信息	/* X and Y position */
	unsigned int x, y; 				//x,y的坐標
	
	/* framebuffer area */
	dma_addr_t fb_base_phys;		//ram 的物理地址
	unsigned long fb_base;			//fb的起始地址
	unsigned long fb_size;			//fb的大小

	u32 pseudo_palette[17];

	/* flag to identify if framebuffer area is fixed already or not */
	int alloc_fb_mem;	

	struct dm_info *dm;				//
};static struct dm_info {	struct dm_win_info *osd0;	struct dm_win_info *osd1;	
	struct dm_win_info *vid0;	
	struct dm_win_info *vid1;	/* to map the registers */	dma_addr_t mmio_base_phys;	unsigned long mmio_base;	unsigned long mmio_size;	wait_queue_head_t vsync_wait;	unsigned long vsync_cnt;	int timeout;	/* this is the function that configures the output device (NTSC/PAL/LCD)	 * for the required output format (composite/s-video/component/rgb)	 */ 	void (*output_device_config)(int on);} dm;static struct fb_ops dm64xxfb_ops;#define BASEX		0x25 //80#define BASEY		0x15#define NTSCPAL  LCDS#define DISP_XRES	1280#define DISP_YRES	1024#define DISP_MEMY	1024#ifdef  COMPOSITE_OUTPUT#define OUTPUT COMPOSITE#endif#ifdef  SVIDEO_OUTPUT#define OUTPUT SVIDEO#endif#ifdef  COMPONENT_OUTPUT#define OUTPUT COMPONENT#endif/* Random value chosen for now. Should be within the panel's supported range */#define LCD_PANEL_CLOCK	18518	//這個還沒弄懂!!!/* All window widths have to be rounded up to a multiple of 32 bytes *//* The OSD0 window has to be always within VID0. Plus, since it is in RGB565  * mode, it _cannot_ overlap with VID1.  * For defaults, we are setting the OSD0 window to be displayed in the top  * left quadrant of the screen, and the VID1 in the bottom right quadrant.  * So the default 'xres' and 'yres' are set to  half of the screen width and  * height respectively. Note however that the framebuffer size is allocated  * for the full screen size so the user can change the 'xres' and 'yres' by  * using the FBIOPUT_VSCREENINFO ioctl within the limits of the screen size. */#define round_32(width)	((((width) + 31) / 32) * 32 ) //把width取到32的整數倍		#define OSD0_XRES	round_32((720)*16/8) * 8/16	/* pixels */   //round_32((DISP_XRES)*16/8)是round后水平方向含有的byte數#define OSD0_YRES	480 //DISP_YRES  //垂直方向的分辨率,不用是32的整數倍#define OSD0_FB_PHY	0#define OSD0_FB_SIZE	(round_32((720)*16/8) * DISP_MEMY * DOUBLE_BUF) //FB的大小,水平方向的byte數×DISP_MEMY×buffer的個數			/* 16 bpp, Double buffered */static struct fb_var_screeninfo osd0_default_var = {	.xres		= 256;//OSD0_XRES,					//x方向可見分辨率	.yres		= 200;//OSD0_YRES,					//y方向可見分辨率	.xres_virtual	= OSD0_XRES,
	.yres_virtual	= OSD0_YRES * DOUBLE_BUF,    //y方向的虛擬(存儲)分辨率	.xoffset	= 0,   //可見畫面與可顯示畫面的偏移	.yoffset	= 0,	.bits_per_pixel	= 16,			//每個象素有16bit	.grayscale	= 0,				//灰度平衡 0	.red		= {11, 5, 0},     /*RGB 565 模式*/	.green		= { 5, 6, 0},	.blue		= { 0, 5, 0},	.transp		= { 0, 0, 0},	.nonstd		= 0,	.activate	= FB_ACTIVATE_NOW,	.height		= -1,	.width		= -1,	.accel_flags	= 0,	.pixclock	= LCD_PANEL_CLOCK, /* picoseconds */	.left_margin	= 40,		/* pixclocks */	.right_margin	= 4,		/* pixclocks */	.upper_margin	= 8,		/* line clocks */	.lower_margin	= 2,		/* line clocks */	.hsync_len	= 4,		/* pixclocks */
	.vsync_len	= 2,		/* line clocks */	.sync		= 0,	.vmode		= FB_VMODE_INTERLACED,	.reserved[0]	= 0,		/* X position */	.reserved[1] = 0,		/* Y position */	//.reserved[3]	= 0,		/* Zoom */};/* Using the full screen for OSD1 by default */
#define OSD1_XRES	round_32(DISP_XRES*4/8) * 8/4	/* pixels */
#define OSD1_YRES	DISP_YRES
#define OSD1_FB_PHY	0
#define OSD1_FB_SIZE	(round_32(DISP_XRES*4/8) * DISP_MEMY * DOUBLE_BUF)
			
static struct fb_var_screeninfo osd1_default_var = {
	.xres		= DISP_XRES,	.yres		= OSD1_YRES,	.xres_virtual	= OSD1_XRES,	.yres_virtual	= OSD1_YRES * DOUBLE_BUF,	.xoffset	= 0,	.yoffset	= 0,	.bits_per_pixel	= 4,	.activate	= FB_ACTIVATE_NOW,	.accel_flags	= 0,	.pixclock	= LCD_PANEL_CLOCK, /* picoseconds */	.vmode		= FB_VMODE_INTERLACED,	.reserved[0]	= 0,		/* X position */	.reserved[1]	= 0,		/* Y position */	//.reserved[3]	= 0,		/* Zoom */};/* Using the full screen for VID0 by default */#define VID0_XRES	(round_32((DISP_XRES)*16/8) * 8/16)	/* pixels */#define VID0_YRES	DISP_YRES#define VID0_FB_PHY	0#define VID0_FB_SIZE	(round_32((DISP_XRES)*16/8) * DISP_MEMY * TRIPLE_BUF)static struct fb_var_screeninfo vid0_default_var = {	.xres		= VID0_XRES,	.yres		= VID0_YRES,	.xres_virtual	= VID0_XRES,	.yres_virtual	= VID0_YRES * TRIPLE_BUF ,		////////////	.xoffset	= 0,	.yoffset	= 0,	.bits_per_pixel	= 16,	.activate	= FB_ACTIVATE_NOW,	.height		= -1,	.width		= -1,	.left_margin	= 20,		/* pixclocks */	.right_margin	= 4,		/* pixclocks */	.upper_margin	= 8,		/* line clocks */	.lower_margin	= 2,		/* line clocks */	.hsync_len	= 4,		/* pixclocks */
	.vsync_len	= 2,		/* line clocks */	.sync		= 0,	.accel_flags	= 0,	.pixclock	= LCD_PANEL_CLOCK, /* picoseconds */	.vmode		= FB_VMODE_INTERLACED,	.reserved[0]	= 0,		/* X position */	.reserved[1]	= 0,		/* Y position */	//.reserved[3]	= 0,		/* Zoom */};/* Using the bottom right quadrant of the screen screen for VID1 by default,  * but keeping the framebuffer allocated for the full screen, so the user can  * change the 'xres' and 'yres' later using the FBIOPUT_VSCREENINFO ioctl.  */#define VID1_BPP	32   //*****16	/* Video1 can be in YUV or RGB888 format */#define VID1_XRES (round_32((DISP_XRES)*32/8) * 8/32)	/* pixels */#define VID1_YRES DISP_YRES#define VID1_FB_PHY	0#define VID1_FB_SIZE (round_32((DISP_XRES)*32/8) * DISP_MEMY * TRIPLE_BUF)static struct fb_var_screeninfo vid1_default_var = {	.xres		= VID1_XRES,	.yres		= VID1_YRES,	.xres_virtual	= VID1_XRES,	.yres_virtual	= VID1_YRES * TRIPLE_BUF,	.xoffset	= 0,	.yoffset	= 0,		.red={16,8,0},	.green={8,8,0},	.blue={0,8,0},	.transp		= { 0, 0, 0},	.nonstd		= 0,	.grayscale=0,	.height		= -1,	.width		= -1,	.left_margin	= 20,		/* pixclocks */	.right_margin	= 4,		/* pixclocks */	.upper_margin	= 8,		/* line clocks */	.lower_margin	= 2,		/* line clocks */	.hsync_len	= 4,		/* pixclocks */
	.vsync_len	= 2,		/* line clocks */	.sync		= 0,		.bits_per_pixel	= VID1_BPP,	.activate	= FB_ACTIVATE_NOW,	.accel_flags	= 0,	.pixclock	= LCD_PANEL_CLOCK, /* picoseconds */	.vmode		= FB_VMODE_INTERLACED,	//.reserved[0]	= 256 + 16, /* X position */ //相對于OSD0窗口的位置
	//.reserved[1]	= 200 + 16, /* Y position */	//.reserved[3]	= 0,		/* Zoom */};#define	x_pos(w)	((w)->x)#define	y_pos(w)	((w)->y)#define	zoom(w)		((w)->zoom)/*#define	x_pos(v)	((v)->reserved[0])#define	y_pos(v)	((v)->reserved[1])#define	zoom(v)		((v)->reserved[2])*/static struct dmparams_t {        u8 output;        u8 format;        u8 windows;      /* bitmap flag based on VID0, VID1, OSD0, OSD1                          * definitions in header file */        u32 vid0_xres;        u32 vid0_yres;        u32 vid0_xpos;        u32 vid0_ypos;        u32 vid1_xres;        u32 vid1_yres;        u32 vid1_xpos;        u32 vid1_ypos;        u32 osd0_xres;
        u32 osd0_yres;        u32 osd0_xpos;        u32 osd0_ypos;        u32 osd1_xres;        u32 osd1_yres;        u32 osd1_xpos;        u32 osd1_ypos;} dmparams =    {                        NTSCPAL,                        /* output */                        OUTPUT,             /* format */                        (1<<VID0)|(1<<VID1)|(1<<OSD0)&~(1<<OSD1), /*設置窗口的使能與否*/                                                   /* windows registered */								VID0_XRES, VID0_YRES, 0, 0,                        //712,480,256+16,200+16,         /* vid0 size and position */                        VID1_XRES, VID1_YRES, 0, 0,         /* vid1 size and position */								//720 ,  480  , 0 ,   0 ,								//712 ,480  ,16 ,  0 ,                        256,200, 0,0,         /* osd0 size and position */                        OSD1_XRES,OSD1_YRES, 0, 0,         /* osd1 size and position */                };/* Must do checks against the limits of the output device */static int dm64xx_venc_check_mode(const struct dm_win_info *w, 				  const struct fb_var_screeninfo *var){	DBGENTER;	RETURN(0);}static irqreturn_t dm64xxfb_isr(int irq, void *arg, struct pt_regs *regs){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品理论在线观看| 国产经典欧美精品| 欧美综合在线视频| 一区二区三区欧美日| 色婷婷亚洲综合| 亚洲午夜av在线| 欧美一区二区三区视频| 蜜桃久久久久久| 日韩小视频在线观看专区| 免费看欧美美女黄的网站| 2021中文字幕一区亚洲| 成人性生交大片免费看视频在线| 国产清纯白嫩初高生在线观看91 | 亚洲理论在线观看| 色综合久久六月婷婷中文字幕| 欧美精品1区2区| 日本成人在线一区| 2023国产精品自拍| 99久久国产免费看| 五月激情综合色| 久久男人中文字幕资源站| 成人中文字幕在线| 亚洲国产精品欧美一二99| 爽好久久久欧美精品| 久久成人免费网| 一本一道久久a久久精品综合蜜臀| 色综合久久久久综合| 91麻豆精品国产自产在线观看一区 | 91麻豆.com| 在线观看国产一区二区| 欧美大白屁股肥臀xxxxxx| 中文字幕中文字幕中文字幕亚洲无线| 视频一区二区三区在线| 国产91在线观看丝袜| 日韩免费观看高清完整版在线观看| 国产人妖乱国产精品人妖| 亚洲另类在线视频| 日韩欧美在线影院| 中文字幕一区在线| 97久久超碰国产精品| 17c精品麻豆一区二区免费| 欧美肥胖老妇做爰| 婷婷国产在线综合| 香蕉乱码成人久久天堂爱免费| 国内精品国产成人国产三级粉色 | 日韩一区二区精品| 午夜不卡在线视频| 欧美亚洲国产bt| 国产精品一区二区免费不卡| 亚洲国产精品久久不卡毛片 | 国产精品影视在线| 亚洲电影你懂得| 偷拍日韩校园综合在线| 国产精品水嫩水嫩| 日韩一区二区三区观看| 91精品福利视频| 成人午夜电影小说| 国产做a爰片久久毛片| 五月天亚洲婷婷| 亚洲日本在线视频观看| 国产丝袜欧美中文另类| 日韩一区和二区| 欧美日韩电影一区| 色妹子一区二区| 成人深夜视频在线观看| 国产一区二区在线影院| 麻豆久久一区二区| 日本不卡不码高清免费观看| 亚洲国产va精品久久久不卡综合| 亚洲日本丝袜连裤袜办公室| 国产精品欧美久久久久一区二区| 久久久综合激的五月天| 欧美mv日韩mv国产网站app| 黄网站免费久久| 男人的j进女人的j一区| 丝袜诱惑亚洲看片| 五月天一区二区| 日韩黄色一级片| 日本一区中文字幕| 青青青爽久久午夜综合久久午夜| 午夜电影网亚洲视频| 欧美v日韩v国产v| 欧美v国产在线一区二区三区| 日韩欧美精品三级| 欧美电影免费提供在线观看| 日韩亚洲欧美一区| 亚洲精品一线二线三线无人区| 69堂亚洲精品首页| 在线不卡中文字幕播放| 日韩一卡二卡三卡四卡| 亚洲精品一区二区三区99| 久久综合久久综合亚洲| 国产日产欧产精品推荐色| 中文子幕无线码一区tr| 中文字幕字幕中文在线中不卡视频| 中文字幕在线免费不卡| 一区二区三区四区乱视频| 亚洲成人动漫在线免费观看| 日韩**一区毛片| 国产真实乱偷精品视频免| 国产69精品久久777的优势| 99视频超级精品| 欧美日韩一本到| 国产999精品久久久久久| 成人ar影院免费观看视频| 日本高清成人免费播放| 欧美日韩中文精品| 精品少妇一区二区三区日产乱码| 国产欧美一区二区精品性色超碰| 中文字幕在线观看一区二区| 丝袜美腿亚洲综合| 国产精品亚洲综合一区在线观看| 91在线观看成人| 在线视频欧美精品| 精品久久久久香蕉网| 最新国产精品久久精品| 日韩中文字幕一区二区三区| 国产精品萝li| 日韩欧美国产小视频| 国产精品动漫网站| 日本不卡一二三| 99久久免费国产| 欧美一卡在线观看| 中文字幕一区二区三区四区 | 午夜精彩视频在线观看不卡| 国产一区二区福利| 欧美日韩一区中文字幕| 国产日韩在线不卡| 天堂影院一区二区| av亚洲精华国产精华精| 91精品国产黑色紧身裤美女| 亚洲国产成人私人影院tom| 午夜av电影一区| a4yy欧美一区二区三区| 日韩欧美成人激情| 国产精品久久久久一区二区三区| 午夜精品久久久久久| 国产精品乡下勾搭老头1| 91麻豆精品秘密| 色美美综合视频| 亚洲天堂久久久久久久| 国产在线精品视频| 在线播放视频一区| 国产精品毛片无遮挡高清| 久久精品噜噜噜成人av农村| 欧美亚洲综合色| 国产精品久久久久久久久免费相片| 日本欧美肥老太交大片| 色婷婷综合在线| 国产欧美精品一区二区色综合 | 国产一区二区三区免费观看| 波多野结衣中文一区| 久久久久久久免费视频了| 亚洲精品一二三四区| 久久精品国产99国产| 7777精品伊人久久久大香线蕉经典版下载 | 国产一区二区三区四| 色综合久久66| 亚洲国产激情av| 男男成人高潮片免费网站| 成人激情av网| 中文字幕乱码亚洲精品一区| 日本在线不卡视频一二三区| 欧美日韩一区久久| 亚洲一区在线播放| 色美美综合视频| 精品不卡在线视频| 香蕉影视欧美成人| 欧美放荡的少妇| 日韩中文字幕麻豆| 欧美大片国产精品| 人人精品人人爱| 337p亚洲精品色噜噜狠狠| 日韩av二区在线播放| 欧美一区二区三区在线电影| 免播放器亚洲一区| 91精品国产91久久久久久最新毛片 | 久久九九国产精品| 免费观看在线综合色| 精品成人私密视频| 国产午夜精品一区二区三区四区| 精品国产伦一区二区三区免费| 欧美婷婷六月丁香综合色| 国产精品人成在线观看免费| 久久66热偷产精品| 91精品国产福利在线观看| 亚洲国产精品一区二区www| 欧美片网站yy| 婷婷综合另类小说色区| 91亚洲精华国产精华精华液| 亚洲综合清纯丝袜自拍| 欧美视频一区在线| 亚洲成av人片在www色猫咪| 91精品国产日韩91久久久久久| 久久成人免费电影| 国产精品视频九色porn| 波多野结衣亚洲| 亚洲成人动漫一区| 欧美成人三级在线| www.视频一区|