Commit f1a1247d authored by Simon Glass's avatar Simon Glass
Browse files

video: Name consoles by their number

We must use the console name in the 'stdout' variable to select the one
we want. At present the name is formed from the driver name with a suffix
indicating the rotation value.

It seems better to name them sequentially since this can be controlled by
driver order. So adjust the code to use 'vidconsole' for the first,
'vidconsole1' for the second, etc.
Signed-off-by: default avatarSimon Glass <>
parent 66280e82
......@@ -161,7 +161,12 @@ static int vidconsole_post_probe(struct udevice *dev)
struct stdio_dev *sdev = &priv->sdev;
int ret;
strlcpy(sdev->name, dev->name, sizeof(sdev->name));
if (dev->seq) {
snprintf(sdev->name, sizeof(sdev->name), "vidconsole%d",
} else {
strcpy(sdev->name, "vidconsole");
sdev->flags = DEV_FLAGS_OUTPUT;
sdev->putc = vidconsole_putc;
sdev->puts = vidconsole_puts;
......@@ -169,12 +169,12 @@
#define SANDBOX_SERIAL_SETTINGS "stdin=serial,cros-ec-keyb,usbkbd\0" \
"stdout=serial,lcd.vidconsole\0" \
"stdout=serial,vidconsole\0" \
#define SANDBOX_SERIAL_SETTINGS "stdin=serial\0" \
"stdout=serial,lcd.vidconsole\0" \
"stdout=serial,vidconsole\0" \
#define SANDBOX_ETH_SETTINGS "ethaddr=00:00:11:22:33:44\0" \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment