在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. 洛谷 P3957 跳房子

    https://www.luogu.org/problemnew/show/P3957 错误记录:1.没开longlong 2. -inf不够小 #include<cstdio> #inc ...

  2. Codeforces Round #202 (Div. 1) A. Mafia 推公式 + 二分答案

    http://codeforces.com/problemset/problem/348/A A. Mafia time limit per test 2 seconds memory limit p ...

  3. elastcisearch中文分词器各个版本

    地址 https://github.com/medcl/elasticsearch-analysis-ik/releases?after=v6.0.1

  4. Y2分班考试 笔试题总结

    1. 此题编译错误  base无法点出methodB()方法 2. 第二题选C 3.此题选D:正确的输出级别为fatal>error>warn>info>debug 4. 此题 ...

  5. Aop第一节

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

  6. SQL Server 2008 转换为 SQL 2005 数据库 脚本生成

    Tips: 本文讨论如何把数据库从SQL Server 2008版本降低到2005,因为在本地开发是以SQL Server 2008 Express Edition版本进行的,而主机提供商现在提供的M ...

  7. java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/xxx/lib/arm/liblame.so: has text relocations

    最近在写本地录音转码过程中引入了liblame.so,我这边用了不同系统版本的手机测试本地录音都没有出现问题,但是有一天,同事在测试的时候,出现了以下错误: 09-13 17:32:29.140 26 ...

  8. sublime前端插件以及常用快捷键

    29个常用 Sublime Text 插件推荐 来源:互联网 作者:佚名 时间:06-18 09:27:55 [大 中 小] Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,P ...

  9. Azure 项目构建 – 部署 Drupal 网站

    通过完整流程详细介绍了如何通过 Azure Web 应用. MySQL DB on Azure 等服务在 Azure 平台上快速搭建 Drupal 服务器,并将其连接到 MySQL 数据库. 此系列的 ...

  10. 新萝卜家园GHOST WIN7系统3专业装机版

    系统来自系统妈:http://www.xitongma.com/ 系统概述 萝卜家园GHOST win7 64位装机旗舰版加快“网上邻居”共享速度:取消不需要的网络服务组件,系统支持Windows安装 ...