在mx6q_sabrsd.c文件中
函数else if(strcmp(s, "YUV444") == 0)
val = IPU_PIX_FMT_YUV444;
else
val = IPU_PIX_FMT_RGB666;
printf("fixfmt = %s %d\n", s, val); ,其中val=RGB24 di=1 lvsd=fb_videomode
ret = ipuv3_fb_init(&lvds_xga, di, val,
DI_PCLK_LDB, 65000000);
此后进入ipuv3_fb_init这个函数
分析发现ret = ipuv3_fb_init(&lvds_xga, di, val,DI_PCLK_LDB, 65000000);

int ipuv3_fb_init(struct fb_videomode *mode, int di, int interface_pix_fmt(即是val),
ipu_di_clk_parent_t di_clk_parent, int di_clk_val)
{
int ret;

ret = ipu_probe(di, di_clk_parent, di_clk_val);
if (ret)
puts("Error initializing IPU\n");

debug("Framebuffer at 0x%x\n", (unsigned int)lcd_base);
ret = mxcfb_probe(interface_pix_fmt, mode, di);

return ret;
}
interface_pix_fmt==RGB24
struct fb_videomode *mode ==&lvds_xga
di ==1
发现mxcfb_probe这个函数设计到了RGB24==interface_pix_fmt, 的形式
此时我们再进入mxcfb_probe这个函数分析
static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode, int di)
{
struct fb_info *fbi;
struct mxcfb_info *mxcfbi;
int ret = 0;

/*
* Initialize FB structures
*/
fbi = mxcfb_init_fbinfo();
if (!fbi) {
ret = -ENOMEM;
goto err0;
}
mxcfbi = (struct mxcfb_info *)fbi->par;

if (!g_dp_in_use) {
mxcfbi->ipu_ch = MEM_BG_SYNC;
mxcfbi->blank = FB_BLANK_UNBLANK;
} else {
mxcfbi->ipu_ch = MEM_DC_SYNC;
mxcfbi->blank = FB_BLANK_POWERDOWN;
}

mxcfbi->ipu_di = di;

ipu_disp_set_global_alpha(mxcfbi->ipu_ch, 1, 0x80);
ipu_disp_set_color_key(mxcfbi->ipu_ch, 0, 0);
strcpy(fbi->fix.id, "DISP3 BG");

g_dp_in_use = 1;

mxcfb_info[mxcfbi->ipu_di] = fbi;

/* Need dummy values until real panel is configured */
fbi->var.xres = 640;
fbi->var.yres = 480;
fbi->var.bits_per_pixel = 16;

发现在这个地方RGB24被赋值给了mxcfbi->ipu_di_pix_fmt,我们再来分析mxcfbi这个函数

mxcfbi->ipu_di_pix_fmt = interface_pix_fmt;//RGB24
fb_videomode_to_var(&fbi->var, mode);

mxcfb_check_var(&fbi->var, fbi);

/* Default Y virtual size is 2x panel size */
fbi->var.yres_virtual = fbi->var.yres * 2;

mxcfb_set_fix(fbi);

/* alocate fb first */
if (mxcfb_map_video_memory(fbi) < 0)
return -ENOMEM;

mxcfb_set_par(fbi);

/* Setting panel_info for lcd */
panel_info.vl_col = fbi->var.xres;
panel_info.vl_row = fbi->var.yres;
panel_info.vl_bpix = LCD_BPP;

lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;

debug("MXC IPUV3 configured\n"
"XRES = %d YRES = %d BitsXpixel = %d\n",
panel_info.vl_col,
panel_info.vl_row,
panel_info.vl_bpix);

ipu_dump_registers();

return 0;

err0:
return ret;
}

我们在mxc_ipuv3_fb.c这个文件中发现了mxcfbi的定义

struct mxcfb_info {
int blank;
ipu_channel_t ipu_ch;
int ipu_di;
u32 ipu_di_pix_fmt;
unsigned char overlay;
unsigned char alpha_chan_en;
dma_addr_t alpha_phy_addr0;
dma_addr_t alpha_phy_addr1;
void *alpha_virt_addr0;
void *alpha_virt_addr1;
uint32_t alpha_mem_len;
uint32_t cur_ipu_buf;
uint32_t cur_ipu_alpha_buf;

u32 pseudo_palette[16];
};

struct fb_info {

struct fb_var_screeninfo var; /* Current var */
unsigned long smem_start; /* Start of frame buffer mem */
/* (physical address) */
unsigned int smem_len; /* Length of frame buffer mem */
unsigned int type; /* see FB_TYPE_* */
unsigned int line_length; /* length of a line in bytes */

char *screen_base;
unsigned long screen_size;
int logo_height;
unsigned int logo_size;
};

uboot-imx RGB24分析的更多相关文章

  1. u-boot源码分析之C语言段

    题外话: 最近一直在学习u-boot的源代码,从代码量到代码风格,都让我认识到什么才是真正的程序.以往我所学到的C语言知识和u-boot的源代码相比,实在不值一提.说到底,机器都是0和1控制的.感觉这 ...

  2. imx6 u-boot.bin 和 u-boot.imx

    有些MFG TOOL烧录工具使用了u-boot.imx,而不是原来的u-boot.bin文件进行烧录. 这两个镜像的区别是,u-boot.bin文件编译后,会在u-boot.bin的开头添加一个大小为 ...

  3. u-boot启动流程分析(2)_板级(board)部分

    转自:http://www.wowotech.net/u-boot/boot_flow_2.html 目录: 1. 前言 2. Generic Board 3. _main 4. global dat ...

  4. [国嵌笔记][030][U-Boot工作流程分析]

    uboot工作流程分析 程序入口 1.打开顶层目录的Makefile,找到目标smdk2440_config的命令中的第三项(smdk2440) 2.进入目录board/samsung/smdk244 ...

  5. 基于335X的UBOOT网口驱动分析

    基于335X的UBOOT网口驱动分析 一.软硬件平台资料 1.  开发板:创龙AM3359核心板,网口采用RMII形式 2.  UBOOT版本:U-Boot-2016.05,采用FDT和DM. 参考链 ...

  6. u-boot源码分析

    Uboot源码分析 源码以u-boot-1.3.4为基准,主芯片采用at91sam9260,主要介绍uboot执行流程. uboot官网:http://www.denx.de/wiki/U-Boot/ ...

  7. Xilinx Uboot网卡驱动分析

    1.MAC控制器.网卡.PHY.MDIO.mii.gmii.rgmii概念扫盲 网卡在功能上包含OSI模型的两个层,数据链路层和物理层.物理层定义了数据传送与接收所需要的电与光信号.线路状态.时钟基准 ...

  8. uboot makefile构建分析-续

    前言 这篇博文是 uboot makefile构建分析的续篇,继续分析uboot构建u-boot.bin的过程 构建u-boot.bin过程分析 makefile一开始,就是确定链接脚本.在构建ubo ...

  9. uboot主Makefile分析(t配置和编译过程详解)

    1.编译uboot前需要三次make make distcleanmake x210_sd_configmake -j4 make distclean为清楚dist文件. make x210_sd_c ...

  10. uboot主Makefile分析

    VERSION = 1 PATCHLEVEL = 3 SUBLEVEL = 4 EXTRAVERSION = U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(S ...

随机推荐

  1. flask_context

    定义全局的钩子函数 有的时候在处理请求之前和之后,执行某些特定的代码是很有用的,这就用到了请求钩子 例如在请求之前创建数据库连接或者redis连接:或者是系统里面用户请求处理之前先验证用户的身份,是否 ...

  2. tensorflow:实战Google深度学习框架第四章02神经网络优化(学习率,避免过拟合,滑动平均模型)

    1.学习率的设置既不能太小,又不能太大,解决方法:使用指数衰减法 例如: 假设我们要最小化函数 y=x2y=x2, 选择初始点 x0=5x0=5  1. 学习率为1的时候,x在5和-5之间震荡. im ...

  3. HDU 1028 Ignatius and the Princess III dp整数划分

    http://acm.hdu.edu.cn/showproblem.php?pid=1028 dp[i][j]表示数值为i,然后最小拆分的那个数是j的时候的总和. 1 = 1 2 = 1 + 1 . ...

  4. setTimeout的核心原理和巧用

    你所不了解的setTimeout 发表于 2015年11月23日 by 愚人码头 被浏览 14,756 次 分享到: 0 小编推荐:掘金是一个高质量的技术社区,从 ECMAScript 6 到 Vue ...

  5. 对于HDMI设备连接状态的监听

    对与最近主要做的是电视机盒子端的开发,其中涉及到设备的状态监听比较繁琐,所以对HDMI的连接状态的监听方法做个记录,方便后续查看. 主要通过两种方式: (1)比较常用的广播监听 注册一个动态广播来获取 ...

  6. url各部分组成分解

    url各部分组成分解介绍:关于url可能大家都不陌生,第一印象就是网址.但是深究起来,不少朋友并明白里面的一些细节,下面就来进行一下分解.scheme://host:port/path?query#f ...

  7. css绝对定位元素实现居中的几个方法

    一:CSS绝对定位元素left设为50%实现水平居中 绝对定位的元素left设为50%时,是已左上角为原点的,所以只要再使用margin属性添加负值补偿回来即可.示例:[css]代码如下: #boar ...

  8. uvm_reg_item——寄存器模型(五)

    uvm_reg_item 扩展自uvm_sequence_item,也就说寄存器模型定义了transaction item. adapter 的作用是把这uvm_reg_item转换成uvm_sequ ...

  9. SQL中的动态语句执行--exec(@sqlstr)

    begin drop table #tmptable declare @money ut_money set @money=1.2345 create table #tmptable ( je ut_ ...

  10. Android的Activity之间传对象的方法

    传值代码块 //Serializeable传递对象的方法 public void SerializeMethod(){ Person mPerson = new Person(); mPerson.s ...