1. framebuffer 框架
2 frambuffer流程
- acrn-kernel/drivers/video/fbdev/core/fbmem.c
subsys_initcall(fbmem_init);-->
proc_create_seq("fb", 0, NULL, &proc_fb_seq_ops)
ret = register_chrdev(FB_MAJOR, "fb", &fb_fops);
fb_class = class_create(THIS_MODULE, "graphics");
fb_console_init();
- 设备的注册
/acrn-kernel/drivers/video/fbdev/simplefb.c
platform_driver_register(&simplefb_driver)-->
static struct platform_driver simplefb_driver = {
.driver = {
.name = "simple-framebuffer",
.of_match_table = simplefb_of_match,
},
.probe = simplefb_probe, @---->
.remove = simplefb_remove,
};
@---->register_framebuffer(info)
- 设备匹配的获取
由于设备是走platform总线 所以查找该总线上的设备
acrn-kernel/arch/x86/kernel/sysfb_simplefb.c
device_initcall(sysfb_init)---->
------------------------------------------------
设备创建比较重要的结构体从代码中可以看出是从boot传参数进来的
是从bios里面回去具体的参数
struct screen_info *si = &screen_info
----------------------------------------------
create_simplefb(si, &mode);
pd = platform_device_register_resndata(NULL, name, 0,
NULL, 0, si, sizeof(*si));
- 一个填充图