From 658ce77bf512d8248995d3f9920db3e295f19e2b Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 11 Jun 2015 20:23:53 +0200 Subject: [PATCH] kernel/syscons: Allow to turn off scaling by setting kern.kms_columns <0. Submitted-by: Rimvydas Jasinskas --- share/man/man4/syscons.4 | 6 +++++- sys/dev/misc/syscons/scvidctl.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/share/man/man4/syscons.4 b/share/man/man4/syscons.4 index 02598292ec..9ff0d9c312 100644 --- a/share/man/man4/syscons.4 +++ b/share/man/man4/syscons.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: src/share/man/man4/syscons.4,v 1.10.2.14 2003/04/25 21:21:36 brueffer Exp $ .\" -.Dd June 10, 2015 +.Dd June 11, 2015 .Dt SYSCONS 4 .Os .Sh NAME @@ -267,12 +267,16 @@ The number of columns to use in conjunction with the and .Xr radeonkms 4 drivers. +The font size is scaled to match the requested number of columns. This requires .Va kern.kms_console to be set to 1. By default, .Nm tries to find a more or less pleasant looking default. +Setting +.Va kern.kms_columns +to a negative value turns off scaling. .El .Ss Kernel Configuration Options The following kernel configuration options control the diff --git a/sys/dev/misc/syscons/scvidctl.c b/sys/dev/misc/syscons/scvidctl.c index 3ee3714ffb..58dfcb3f0d 100644 --- a/sys/dev/misc/syscons/scvidctl.c +++ b/sys/dev/misc/syscons/scvidctl.c @@ -814,7 +814,8 @@ sc_update_render(scr_stat *scp) /* * If columns not specified in /boot/loader.conf then * calculate a non-fractional scaling that yields a - * reasonable number of rows and columns. + * reasonable number of rows and columns. If it is <0, + * don't scale at all. */ if (desired_cols == 0) { int nomag = 1; @@ -825,6 +826,8 @@ sc_update_render(scr_stat *scp) if (nomag > 1) --nomag; desired_cols = scp->xpixel / (scp->font_width * nomag); + } else if (desired_cols < 0) { + desired_cols = scp->xpixel / scp->font_width; } scp->blk_width = scp->xpixel / desired_cols; scp->blk_height = scp->blk_width * scp->font_height / -- 2.11.4.GIT