MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / hdmi_fb_init

Function hdmi_fb_init

bsp/raspberry-pi/raspi3-64/driver/drv_fb.c:293–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293int hdmi_fb_init(void)
294{
295 _hdmi.fb = (rt_uint8_t *)bcm283x_mbox_fb_alloc(LCD_WIDTH, LCD_HEIGHT, LCD_BPP, 1);
296 bcm283x_mbox_fb_setoffset(0, 0);
297 bcm283x_mbox_fb_set_porder(0);
298 _hdmi.width = LCD_WIDTH;
299 _hdmi.height = LCD_HEIGHT;
300 _hdmi.depth = LCD_DEPTH;
301 _hdmi.pitch = 0;
302 _hdmi.pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB888;
303
304 // rt_hw_mmu_map(&mmu_info, (unsigned long)_hdmi.fb, (void *)0x200000, DEVICE_MEM);
305
306 rt_hw_cpu_dcache_invalidate((unsigned long)_hdmi.fb,LCD_WIDTH * LCD_HEIGHT * 3);
307
308 //rt_kprintf("_hdmi.fb is %p\n", _hdmi.fb);
309 rt_hdmi_fb_device_init(&_hdmi, "lcd");
310
311 return 0;
312}
313
314INIT_DEVICE_EXPORT(hdmi_fb_init);

Callers

nothing calls this directly

Calls 5

bcm283x_mbox_fb_allocFunction · 0.85
rt_hdmi_fb_device_initFunction · 0.70

Tested by

no test coverage detected