Historically generic framebuffer support code was tightly integrated
with drm subsystem and was built as part of it. Recent work decoupled
FB support from drm code thus it can be compiled separately.
This change imports following slightly refactored files from drm-kmod:
- linux/fb.h
- linux_fb.c
- vt_drmfb.c
Most meaningfull improvements as compared to current code are:
- All remaining references to drm headers were deleted.
- fictitious page registration was moved back to generic framebuffer support code. The drm driver now has to fill aperture_base and aperture_size fields of struct drm_device rather than call vm_phys_fictitious_reg_range() directly.
- Framebuffer attachment interface has been switched from direct calls to vt_allocate/vt_deallocate to fbd/vt_fb compatible newbus device_attach/device_detach. That allows to choose FreeBSD framebuffer driver at runtime. Traditional fbd/vt_fb can be enabled with setting of loader tunable kern.vt.disable_drmfb to 1
- vd_init, vd_fini, vd_postswitch, vd_suspend, and vd_resume methods implementation was dropped. vt_fb one is used instead as it is almost identical. The only visible difference is extra vd_postswitch call during vd_init in vt_fb code that should not do any harm.
Commit by commit log can be found here:
https://github.com/wulf7/drm-kmod/commits/linux-fb/
drm-kmod MR: https://github.com/freebsd/drm-kmod/pull/342
Currently existing branches with integrated framebuffer support do not
require any patching as all exportable symbols has changed their names.