Page MenuHomeFreeBSD

Add a delayed VT attachment for ofwfb
Needs ReviewPublic

Authored by jhibbits on Jun 15 2018, 3:57 AM.

Details

Reviewers
nwhitehorn
Summary

In some cases, /chosen/stdout is not the VGA console. In this case there may still be a viable console. This adds a device node under vgapci* if it's a viable OFW device tree node.

Test Plan

Still need to test that I didn't break direct attachment.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 17316
Build 17151: arc lint + arc unit

Event Timeline

jhibbits created this revision.Jun 15 2018, 3:57 AM
nwhitehorn added inline comments.Jun 15 2018, 6:37 PM
sys/dev/vt/hw/ofwfb/ofwfb.c
90

No way for these to be the same driver?

522

It seems a bit weird to have a newbus device appear only if it's *not* the console.

525

How does this interact with drm consoles? I guess the probe bits compete later on? How about module loading of drm consoles?

551

"Open Firmware" usually has a space in it.

jhibbits marked an inline comment as done.Jun 15 2018, 7:15 PM
jhibbits added inline comments.
sys/dev/vt/hw/ofwfb/ofwfb.c
90

I think they could be the same. I mentioned this on IRC just a few minutes ago. If I move the /chosen handling code into the ofwfb_probe function instead, that might suffice, so that it's not looking for /chosen properties in the ofwfb_init().

522

If it's not the system console, but has all the makings of a video console.

525

Not sure. I don't have anything that can really use drm console right now. Maybe 'fb' device name is wrong for this.

551

Oops. I'll blame my chrome keyboard's tendency to forget I hit space.

jhibbits updated this revision to Diff 43850.Jun 15 2018, 9:11 PM
jhibbits marked an inline comment as done.

Reduce the diff, by sharing the same VT driver between the early attach and delayed attach. This required moving some config setting into the probe routine, but that should be fine.

nwhitehorn added inline comments.Jun 15 2018, 9:41 PM
sys/dev/vt/hw/ofwfb/ofwfb.c
116

Is this tested on Apple hardware?

522

So? Don't you always want a newbus device, even if it is the console (like uart)?