kernel-4.4/drivers/misc/brand/video/product/videox/mtkfb.c
.compatible = "brand,MTKFB",
unsigned int lcd_fps = 6000;
mtkfb_probe
//分配物理、虚拟地址
disp_hal_allocate_framebuffer(fb_base, (fb_base + vramsize - 1),(unsigned long *)(&fbdev->fb_va_base), &fb_pa);
fbdev->fb_pa_base = fb_base;
primary_display_set_frame_buffer_address((unsigned long)(fbdev->fb_va_base), fb_pa);//pgc->framebuffer_va = fbdev->fb_va_base;pgc->framebuffer_mva = fbdev->fb_pa_base;
primary_display_init(mtkfb_find_lcm_driver(), lcd_fps, is_lcm_inited);//mtkfb_find_lcm_driver:nt35521_hd_dsi_vdo_truly_nt50358_drv
return pgc->plcm->params->physical_width;
mtkfb_fbinfo_init //填充fb_info结构体
static struct fb_ops mtkfb_ops = {
.owner = THIS_MODULE,
.fb_open = mtkfb_open,
.fb_release = mtkfb_release,
.fb_setcolreg = mtkfb_setcolreg,
.fb_pan_display = mtkfb_pan_display_proxy,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = mtkfb_soft_cursor,
.fb_check_var = mtkfb_check_var,
.fb_set_par = mtkfb_set_par,
.fb_ioctl = mtkfb_ioctl,
#ifdef CONFIG_COMPAT
.fb_compat_ioctl = mtkfb_compat_ioctl,
#endif
#if defined(CONFIG_PM_AUTOSLEEP)
.fb_blank = mtkfb_blank,
#endif
};
chosen {
bootargs = "console=tty0 console=ttyMT0,921600n1 root=/dev/ram initrd=0x44000000,\
0x1000000 loglevel=8 androidboot.selinux=permissive androidboot.hardware=product initcall_debug=1"