[Concept,01/14] video: Add empty vidconsole_ctx struct
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Add a new struct vidconsole_ctx to hold per-client state for video
consoles. Add some driver-specific structs as well, so that each driver
can build on the common context fields.
This is preparation for supporting multiple clients with their own
context.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
drivers/video/console_normal.c | 9 +++++++++
drivers/video/console_truetype.c | 9 +++++++++
include/video_console.h | 9 +++++++++
3 files changed, 27 insertions(+)
@@ -14,6 +14,15 @@
#include <video_font.h> /* Get font data, width and height */
#include "vidconsole_internal.h"
+/**
+ * struct console_ctx - context for the normal console
+ *
+ * @com: Common fields from the vidconsole uclass
+ */
+struct console_ctx {
+ struct vidconsole_ctx com;
+};
+
struct console_store {
int xpos_frac;
int ypos;
@@ -203,6 +203,15 @@ struct console_tt_metrics {
double scale;
};
+/**
+ * struct console_tt_ctx - Per-client context for this driver
+ *
+ * @com: Common fields from the vidconsole uclass
+ */
+struct console_tt_ctx {
+ struct vidconsole_ctx com;
+};
+
/**
* struct console_tt_priv - Private data for this driver
*
@@ -73,6 +73,15 @@ struct vidconsole_cursor {
uint index;
};
+/**
+ * struct vidconsole_ctx - per-client context for a video console
+ *
+ * This holds per-client state for video consoles. It can be used by clients
+ * to maintain separate contexts for different text-entry operations.
+ */
+struct vidconsole_ctx {
+};
+
/**
* struct vidconsole_priv - uclass-private data about a console device
*