Skip to content

WIP: move Linux frame buffer support to base system#342

Open
wulf7 wants to merge 19 commits intofreebsd:masterfrom
wulf7:linux-fb
Open

WIP: move Linux frame buffer support to base system#342
wulf7 wants to merge 19 commits intofreebsd:masterfrom
wulf7:linux-fb

Conversation

@wulf7
Copy link
Copy Markdown
Contributor

@wulf7 wulf7 commented Feb 21, 2025

On Linux, framebuffer code is not a part of drm and can be used with non-drm drivers.
The aim is to move linux_fb.c vt_drmfb.c to linuxkpi_video module and import to base system after than.
The changes clashes with ongoing drm-kmod 6.xx import doing by @dumbbell. That should be resolved in future.
Still WIP

@wulf7 wulf7 requested review from dumbbell and evadot February 21, 2025 10:09
@emaste
Copy link
Copy Markdown
Member

emaste commented Mar 12, 2025

The aim is to move linux_fb.c vt_drmfb.c to linuxkpi_video module and import to base system after than.

Would be good to also indicate why they should be in the base system

@wulf7
Copy link
Copy Markdown
Contributor Author

wulf7 commented Mar 13, 2025

We a going to make drm.ko to be a part of base system

@Conan-Kudo
Copy link
Copy Markdown

On Linux, framebuffer code is not a part of drm and can be used with non-drm drivers.

This isn't completely true anymore, now that SimpleDRM is a thing and distros have largely replaced the traditional framebuffer with the DRM backed one.

wulf7 added 19 commits February 21, 2026 14:04
Generic framebufer driver is a lower layer than drm framebufer.
It should not depend on later.
The only usage of passing `struct drm_fb_helper` to vt_drmfb was using
it as a container of reference to parent BSD device.
Pass device directly from drm to vt_drmfb to not depend on drm.

Sponsored by:	Future Crew LLC
as vt_drmfb is the only user of skip_ddb. Keep skip_ddb sysctl
declarations in drm as they are children of drm sysctl nodes.

Sponsored by:	Future Crew LLC
support code to consolidate it in one place. This done with adding of
FreeBSD-specific fields to drm_driver structure to pass aperture
parametrs from drm drivers to framebufer support code.

Also remove struct apertures_struct from fb_info to follow upstream.

Sponsored by:	Future Crew LLC
Remove references to now unused headers, functions and kernel modules.

Sponsored by:	Future Crew LLC
and move them to BSD-licensed linux/fb.h

Sponsored by:	Future Crew LLC
While here move cfb_ declarations to BSD linux/fb.h too and
remove extraneous extern keywords.

Sponsored by:	Future Crew LLC
They do not depend on drm internals.
Add -DDEVELOPER to make options to compile linux_video.ko
Rename it to linuxkpi_skip_ddb as it is public symbol now.
To prevent name clashing with older drm-kmods.
This structure is used only in LKPI so no reasons to convert members
to native types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants