genodelabs / genode-allwinner

Allwinner SoC support for the Genode OS framework
Other
13 stars 10 forks source link

framebuffer/de: use vblank interrupt #23

Open cnuke opened 1 year ago

cnuke commented 1 year ago

The following proof-of-concept commit replaces the timer-based capturing of screen data with using the VBLANK interrupt to trigger the update. It patches the a64_linux kernel to never disable the interrupt and adds a specific _lxemul function (lX_emul_framebuffer_vblank()) that is executed in the interrupt handler. The handler is called every ~26ms.

This was also reproduced with the pc_intel_fb_drv where the interrupt occurred every ~16ms when only one display was used and at varying intervals when multiple displays were connected.

So for less invasive (and properly accounting for mutiple displays) vblank handling we could look at how to profit from the drm_crtc_handle_vblank() call and how to enable the interrupt from the user's side of things.

cnuke commented 1 month ago

@nfeske this issue contains the PoC commit for A64 - as I cannot find the corresponding intel_fb commit I assume I reiterated the same approach there as well (and did not deem it worthy for committing).