在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. [JSOI2009]密码

    Description Input Output Sample Input 10 2 hello world Sample Output 2 helloworld worldhello HINT 一看 ...

  2. 解决thymeleaf严格html5校验的方法

    用的是springboot加thyemleaf做静态模板. 然后会有个很烦的东西,就这个静态模板对html的格式非常严格,导致很多框架的格式都用不了,然后这里有个解除的方法: 1.在pom中添加依赖: ...

  3. Memcached 未授权访问漏洞及加固

    memcached是一套分布式的高速缓存系统.它以Key-Value(键值对)形式将数据存储在内存中,这些数据通常是应用读取频繁的.正因为内存中数据的读取远远大于硬盘,因此可以用来加速应用的访问. 漏 ...

  4. 图像分类丨ILSVRC历届冠军网络「从AlexNet到SENet」

    前言 深度卷积网络极大地推进深度学习各领域的发展,ILSVRC作为最具影响力的竞赛功不可没,促使了许多经典工作.我梳理了ILSVRC分类任务的各届冠军和亚军网络,简单介绍了它们的核心思想.网络架构及其 ...

  5. android开发学习 ------- android studio 同时用svn和git 进行代码管理 出现的问题

    svn和git的工作机制:  SVN 是集中式或者有中心式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是自己的电脑,所以首先要从中央服务器哪里得到最新的版本,然后干活,干完后,需要 ...

  6. myBati初学

    创建数据库(y2165) MyBatis环境搭建1.在pom.xml引入依赖2.得替换build节点,为了让程序编译在main中所有子包下的配置文件3.构建大配置,位于resources<?xm ...

  7. Aop第一节

    什么是AOP AOP(Aspect-OrientedProgramming,面向方面编程),可以说是OOP(Object-Oriented Programing,面向对象编程)的补充和完善.OOP引入 ...

  8. I/O————数据流

    如何将一个long类型的数据写入文件中? 转字符串 → 通过 getbytes() 写进去,费劲,而且在此过程中 long 类型的数需要不断地转换. 现在,Java 中的数据流能够很好的解决这个问题( ...

  9. 涉及到弹出层的opacity样式问题

    最近遇到一个弹出层在Chrome中重复的问题,观察发现是opacity引起的以下是代码及现象<!DOCTYPE html><html> <head>         ...

  10. centos笔记记录

    1. mac链接远程centos系统的时候,出现的问题: ssh 10.1**.4*.**:36** 会出现ssh: Could not resolve hostname 10.1**.4*.**:3 ...