From patchwork Mon Oct 14 22:31:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1997102 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=UCze7ALA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XSBnF3wP8z1xsc for ; Tue, 15 Oct 2024 09:32:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4CD089228; Tue, 15 Oct 2024 00:32:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="UCze7ALA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5872C88703; Tue, 15 Oct 2024 00:32:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D5F8891AA for ; Tue, 15 Oct 2024 00:32:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-835393376e1so295078939f.1 for ; Mon, 14 Oct 2024 15:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1728945137; x=1729549937; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yFEx0c0sJB1E97HMSZgPHLAAiSR/v3dkcFGFSL2x0+4=; b=UCze7ALAgp/Mg/vXQ9xPhCwSnYrI4SDEf4NDUpIHih8KLbL+/JZbmhHdHA0CC94kMi j9PK+UlK63xsukCHqyHpiJXFWwFSg09ZRTmJqzLf5yLroRkyJc3/pO352xkDBsuPoCwJ bgk44eWjC4/0MwgQRmX9d0FLDCq1ItI3Ybaug= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728945137; x=1729549937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yFEx0c0sJB1E97HMSZgPHLAAiSR/v3dkcFGFSL2x0+4=; b=lDmR28Y5sXn6ZZbwWrIetFBYbusciz/U+oloTmLepTEq0Fws8bOe6FlzBuCiFmydQF Zf122OsIrCQYtxjOf85C9mwDV6lahegewZ4MMfheJXpnZOPPzZf0Y+3QYQKwOUpMbqM4 /s7pzmp7tyNzMhUiB5dUqfFe4bnL8Oq6GnnxhYcEAAU8giY0ZDE8JGOPMqsVLdVRmqDP 2JVm7p4vYQW00h/2D+0KteBv3U5aqnBNE+uJd1tjvxodmPekqHHXuDx3/wJiLlE7NqVY QF+iZxPe9wUUQ+2RlxaOmqQ23geJlsCxWf7ynTcEKZluDc7SVqKmn2XxWGjQgjJhxo/i ZhTQ== X-Gm-Message-State: AOJu0YxIlhhaevn4uIMZCxwnhTHscXbUpPoyzbQxzZ2TA/fbj/aB4UhQ GiKgEyEN8eAB5qYhfYnc6WzsoRmWYhHAIv/De81swfVcRXd1hODdG0LyaW7x2wfh/31H+2zYm/P LMg== X-Google-Smtp-Source: AGHT+IEUgBGo03TEXjxuJYUl//XIc/OM7Sjx+/mew8+rhy1TRZNpa0L7+ro7kFFR7NKXjG+8VFuCdg== X-Received: by 2002:a05:6e02:2185:b0:3a0:bd91:3842 with SMTP id e9e14a558f8ab-3a3bce0b188mr84614385ab.24.1728945136989; Mon, 14 Oct 2024 15:32:16 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4dbecc4924dsm14847173.153.2024.10.14.15.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 15:32:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Anatolij Gustschin , Simon Glass , Bin Meng , Devarsh Thakkar , Nikhil M Jain , Peter Robinson , Sughosh Ganu Subject: [PATCH v3 01/20] video: Add a dark-grey console colour Date: Mon, 14 Oct 2024 16:31:53 -0600 Message-Id: <20241014223212.2212442-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014223212.2212442-1-sjg@chromium.org> References: <20241014223212.2212442-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This is useful for highlighting something with a black background, as is needed with cedit when using a white-on-black console. Add this as a new colour. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- (no changes since v1) boot/scene.c | 2 +- drivers/video/video-uclass.c | 3 +++ include/video.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/boot/scene.c b/boot/scene.c index 270c9c67233..0135287cfcb 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -339,7 +339,7 @@ static void scene_render_background(struct scene_obj *obj, bool box_only) /* draw a background for the object */ if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) { - fore = VID_BLACK; + fore = VID_DARK_GREY; back = VID_WHITE; } else { fore = VID_LIGHT_GRAY; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 9823673f817..a5b3e898066 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -294,6 +294,9 @@ static const struct vid_rgb colours[VID_COLOUR_COUNT] = { { 0xff, 0x00, 0xff }, /* bright magenta */ { 0x00, 0xff, 0xff }, /* bright cyan */ { 0xff, 0xff, 0xff }, /* white */ + + /* an extra one for menus */ + { 0x40, 0x40, 0x40 }, /* dark gray */ }; u32 video_index_to_colour(struct video_priv *priv, enum colour_idx idx) diff --git a/include/video.h b/include/video.h index 606c8a37fb8..fd19723b1d2 100644 --- a/include/video.h +++ b/include/video.h @@ -181,6 +181,7 @@ enum colour_idx { VID_LIGHT_MAGENTA, VID_LIGHT_CYAN, VID_WHITE, + VID_DARK_GREY, VID_COLOUR_COUNT };