History

VT: Add KD_FONT_OP_SET/GET_TALL operations

The KD_FONT_OP_SET/GET operations hardcode vpitch to be 32 pixels, which only dates from the old VGA hardware which as asserting this. Drivers such as fbcon however do not have such limitation, so this introduces KD_FONT_OP_SET/GET_TALL operations, which userland can try to use to avoid this limitation, thus opening the patch to >32 pixels font height.

Samuel Thibault committed 3 years ago

Commit 24d69381 parent ffc1e082 files · +18 −6Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/kd.h+8−2
@@ -161,19 +161,25 @@ struct console_font_op { · 160 unmodified lines
161 unsigned int flags; /* KD_FONT_FLAG_* */161 unsigned int flags; /* KD_FONT_FLAG_* */
162 unsigned int width, height; /* font size */162 unsigned int width, height; /* font size */
163 unsigned int charcount;163 unsigned int charcount;
164 unsigned char __user *data; /* font data with height fixed to 32 */164 unsigned char __user *data; /* font data with vpitch fixed to 32 for
165 * KD_FONT_OP_SET/GET
166 */
165};167};
166 168
167struct console_font {169struct console_font {
168 unsigned int width, height; /* font size */170 unsigned int width, height; /* font size */
169 unsigned int charcount;171 unsigned int charcount;
170 unsigned char *data; /* font data with height fixed to 32 */172 unsigned char *data; /* font data with vpitch fixed to 32 for
173 * KD_FONT_OP_SET/GET
174 */
171};175};
172 176
173#define KD_FONT_OP_SET 0 /* Set font */177#define KD_FONT_OP_SET 0 /* Set font */
174#define KD_FONT_OP_GET 1 /* Get font */178#define KD_FONT_OP_GET 1 /* Get font */
175#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */179#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */
176#define KD_FONT_OP_COPY 3 /* Obsolete, do not use */180#define KD_FONT_OP_COPY 3 /* Obsolete, do not use */
181#define KD_FONT_OP_SET_TALL 4 /* Set font with vpitch = height */
182#define KD_FONT_OP_GET_TALL 5 /* Get font with vpitch = height */
177 183
178#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */184#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */
179 185

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t