Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1429721
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/16] vt: document vc_data by example |
| Date | 2016-06-23 13:50 +0200 |
| Message-ID | <rNbiW-YX-21@gated-at.bofh.it> (permalink) |
| References | <rNb9f-UY-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
All those members of vc_data are each explained in short. But it needs
an example for one to understand the whole picture.
So add an ascii art depicting the most important vc_data members.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
include/linux/console_struct.h | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index e329ee2667e1..5fa605c93428 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -21,6 +21,38 @@ struct uni_pagedir;
#define NPAR 16
+/*
+ * Example: vc_data of a console that was scrolled 3 lines down.
+ *
+ * Console buffer
+ * vc_screenbuf ---------> +----------------------+-.
+ * | initializing W | \
+ * | initializing X | |
+ * | initializing Y | > scroll-back area
+ * | initializing Z | |
+ * | | /
+ * vc_visible_origin ---> ^+----------------------+-:
+ * (changes by scroll) || Welcome to linux | \
+ * || | |
+ * vc_rows --->< | login: root | | visible on console
+ * || password: | > (vc_screenbuf_size is
+ * vc_origin -----------> || | | vc_size_row * vc_rows)
+ * (start when no scroll) || Last login: 12:28 | /
+ * v+----------------------+-:
+ * | Have a lot of fun... | \
+ * vc_pos -----------------|--------v | > scroll-front area
+ * | ~ # cat_ | /
+ * vc_scr_end -----------> +----------------------+-:
+ * (vc_origin + | | \ EMPTY, to be filled by
+ * vc_screenbuf_size) | | / vc_video_erase_char
+ * +----------------------+-'
+ * <---- 2 * vc_cols ----->
+ * <---- vc_size_row ----->
+ *
+ * Note that every character in the console buffer is accompanied with an
+ * attribute in the buffer right after the character. This is not depicted
+ * in the figure.
+ */
struct vc_data {
struct tty_port port; /* Upper level data */
--
2.9.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 01/16] tty: 8250, remove shadow and unused variables Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 03/16] vt: document vc_data by example Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 06/16] tty: vt, consw->con_set_palette cleanup Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 10/16] tty: vt, separate T.416 high colors handler Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 16/16] tty: vt, remove unused vc_deccolm Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 13/16] tty: vt, whitespace cleanup in csi_m Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 08/16] tty: vt, drop VT_BUF_VRAM_ONLY Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200 [PATCH 14/16] tty: vt, convert more macros to functions Jiri Slaby <jslaby@suse.cz> - 2016-06-23 13:50 +0200
csiph-web