在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. 23 在java中使用groovy类

    1       在java中使用groovy类 1.1  直接调用groovy类 在java中调用Groovy类,需要增加Groovy运行时到java的classpath中. pom.xml < ...

  2. 转 11g Grid Control: Overview of the EMCTL Options Available for Managing the Agent

    1.概念: The Enterprise Manager DBConsole consists of the following components: - A Standalone OC4J Man ...

  3. BZOJ3073: [Pa2011]Journeys(线段树优化建图 Dijkstra)

    题意 \(n\)个点的无向图,构造\(m\)次边,求\(p\)到任意点的最短路. 每次给出\(a, b, c, d\) 对于任意\((x_{a \leqslant x \leqslant b}, y_ ...

  4. JS基础1 — 代码要注意的一些问题

    1.在一对  <script></script>  标签中,有错的js代码,那么该错误代码后面的代码不会执行. 例子:<script> alert("He ...

  5. ReactiveCocoa 响应式函数编程

    简介 ReactiveCocoa(简称为RAC),RAC具有函数响应式编程特性,由Matt Diephouse开源的一个应用于iOS和OS X的新框架. 为什么使用RAC? 因为RAC具有高聚合低耦合 ...

  6. sysdig安装和使用介绍

    安装步骤1)安装资源库rpm --import https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.publiccurl -s -o ...

  7. strongSwan大坑一直重启(ubuntu)

    报错 Starting strongSwan 5.3.2 IPsec [starter]... charon (20533) started after 40 ms charon stopped af ...

  8. cannot load such file -- bundler/setup解决

    sudo gem install bundler bundle update celluloid

  9. 设置windows status bar隐藏

    info.plist View controller-based status bar appearance 为 NO CGContextSaveGState: invalid context 0x0 ...

  10. Codeforces Round #316 (Div. 2) C Replacement 扫描法

    先扫描一遍得到每个位置向后连续的'.'的长度,包含自身,然后在扫一遍求出初始的合并次数. 对于询问,只要对应位置判断一下是不是'.',以及周围的情况. #include<bits/stdc++. ...