Page MenuHomeFreeBSD

vt(4): Document the new kern.vt.fb.* tunables
ClosedPublic

Authored by dumbbell on Nov 3 2014, 11:36 AM.
Tags
None
Referenced Files
F107532951: D1098.id2247.diff
Wed, Jan 15, 12:54 PM
Unknown Object (File)
Dec 3 2024, 12:03 PM
Unknown Object (File)
Nov 25 2024, 12:52 PM
Unknown Object (File)
Nov 25 2024, 12:52 PM
Unknown Object (File)
Nov 25 2024, 12:52 PM
Unknown Object (File)
Nov 25 2024, 12:52 PM
Unknown Object (File)
Nov 25 2024, 12:52 PM
Unknown Object (File)
Nov 25 2024, 12:25 PM
Subscribers
None

Details

Summary

The new tunables allow the user to override the video mode picked for vt(4), when using a KMS driver.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dumbbell retitled this revision from to vt(4): Document the new kern.vt.fb.* tunables.
dumbbell updated this object.
dumbbell edited the test plan for this revision. (Show Details)
dumbbell added reviewers: emaste, ray, kwm, ak.

Maybe also add example for the connector specific mode set?

share/man/man4/vt.4
220

to the specificed output connector

share/man/man4/vt.4
229

It's not your mistake, but please add .El before ".Sh KEYBOARD SYSCTL TUNABLES".

comment from Avengence on IRC:
when updating vt(4) please correct the expansion of KMS (kernel mode switching -> kernel mode setting)

dumbbell edited edge metadata.

Changes in this new patch:

  • Add examples
  • Add missing .El
  • Fix "Kernel Mode Setting" (was: "Kernel Mode Switching")
share/man/man4/vt.4
220

There's a variable name following this text, so the rendered page says:

This mode is applied to the output connector connector_name only.

Thank you.

We should also add some reference to methods for finding the available connectors and modes.

emaste edited edge metadata.
This revision is now accepted and ready to land.Nov 3 2014, 1:54 PM
In D1098#9, @emaste wrote:

We should also add some reference to methods for finding the available connectors and modes.

I agree, but there's no tool that I know of to list them. And the names used by xrandr(1) don't match the expected syntax.

For Radeon users, connectors are listed in dmesg(8):

info: [drm] Radeon Display Connectors
info: [drm] Connector 0:
info: [drm]   LVDS-1
...
info: [drm] Connector 1:
info: [drm]   HDMI-A-1
...

For i915 users, nothing is logged. Perhaps they would be listed if hw.dri.debug was set, but this is only a sysctl, not a tunable. Therefore it's too late when a user can set it (I need to fix this).

For the record, here's what xrandr(1) lists on the same Radeon computer:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
LVDS connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
...
HDMI-0 disconnected (normal left inverted right x axis y axis)
...

And I found this out only when testing my patch, because xrandr(1) names were not working...

I believe the most useful tunable is the global one (kern.vt.fb.default_mode). But should I mention that there's no tool to list the connectors yet?

Or I simply add a log in drm2.ko for all connectors :-)

ak edited edge metadata.

I would commit this now while we work on a suitable approach for enumerating connectors and modes.

Here's the result:

info: [drm] Connector LVDS-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.LVDS-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] Connector VGA-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.VGA-1
info: [drm]   - kern.vt.fb.default_mode

When a mode is set, DRM already tells what it found:

info: [drm] Connector LVDS-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.LVDS-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] cmdline mode for connector LVDS-1 1024x768@60Hz
info: [drm] Connector VGA-1: get mode from tunables:
...
dumbbell edited edge metadata.

Changes in this new patch:

  • Document how to find the connectors list
  • Remove the ".Pq Kernel Mode Setting" line, because this is already explained earlier
dumbbell updated this revision to Diff 2252.

Closed by commit rS274050 (authored by @dumbbell).

head/share/man/man4/vt.4
222 ↗(On Diff #2252)

This should be "To discover" or "To find". But perhaps

The names of available connector names can be found in
.Xr dmesg 8
after loading the KMS driver.

225 ↗(On Diff #2252)

avoid contraction

Thanks, I committed the corrections in rS274051.