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
161161 unsigned int flags; /* KD_FONT_FLAG_* */
162162 unsigned int width, height; /* font size */
163163 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+ */
165167 };
166168
167169 struct console_font {
168170 unsigned int width, height; /* font size */
169171 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+ */
171175 };
172176
173177 #define KD_FONT_OP_SET 0 /* Set font */
174178 #define KD_FONT_OP_GET 1 /* Get font */
175179 #define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */
176180 #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 */
177183
178184 #define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */
179185

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