Paz Zcharya has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86566?usp=email )
Change subject: refactor: Consolidate bmp_logo_filename() logic
......................................................................
refactor: Consolidate bmp_logo_filename() logic
Function bmp_logo_filename() is intended to be the sole method for
selecting which logo will be displayed. Currently, however, this
logic is distributed across two locations: bmp_load_logo() and
bmp_logo_filename(). Consolidate all logo selection logic into
bmp_logo_filename() exclusively.
Furthermore, the inclusion of <fsp/api.h> is specific to the FSP
environment and compromises cross-compatibility. Therefore, add
conditional compilation directives to ensure that this header is
only included when appropriate.
Change-Id: Ifd91af411aff6ccd6f5974a0b6c849794b9a2794
Signed-off-by: Paz Zcharya <pazz(a)google.com>
---
M src/lib/bmp_logo.c
M src/vendorcode/google/chromeos/splash.c
2 files changed, 9 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/86566/1
diff --git a/src/lib/bmp_logo.c b/src/lib/bmp_logo.c
index 5a5adaa..26fbe5b 100644
--- a/src/lib/bmp_logo.c
+++ b/src/lib/bmp_logo.c
@@ -4,7 +4,6 @@
#include <bootsplash.h>
#include <cbfs.h>
#include <cbmem.h>
-#include <fsp/api.h>
#include <stdint.h>
#include <vendorcode/google/chromeos/chromeos.h>
@@ -20,7 +19,7 @@
void *bmp_load_logo(size_t *logo_size)
{
void *logo_buffer;
- const char *logo_name;
+ const char *logo_name = bmp_logo_filename();
/* CBMEM is locked for S3 resume path. */
if (acpi_is_wakeup_s3())
@@ -34,11 +33,6 @@
if (!logo_buffer)
return NULL;
- if (platform_is_low_battery_shutdown_needed())
- logo_name = "low_battery.bmp";
- else
- logo_name = bmp_logo_filename();
-
*logo_size = cbfs_load(logo_name, logo_buffer, 1 * MiB);
if (*logo_size == 0)
return NULL;
diff --git a/src/vendorcode/google/chromeos/splash.c b/src/vendorcode/google/chromeos/splash.c
index f63f526..6da6bba 100644
--- a/src/vendorcode/google/chromeos/splash.c
+++ b/src/vendorcode/google/chromeos/splash.c
@@ -3,8 +3,16 @@
#include <bootsplash.h>
#include <vendorcode/google/chromeos/chromeos.h>
+#if CONFIG(PLATFORM_HAS_LOW_BATTERY_INDICATOR)
+#include <fsp/api.h>
+#endif
+
const char *bmp_logo_filename(void)
{
+#if CONFIG(PLATFORM_HAS_LOW_BATTERY_INDICATOR)
+ if (platform_is_low_battery_shutdown_needed())
+ return "low_battery.bmp";
+#endif
if (chromeos_device_branded_plus_hard())
return "cb_plus_logo.bmp";
else if (chromeos_device_branded_plus_soft())
--
To view, visit https://review.coreboot.org/c/coreboot/+/86566?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ifd91af411aff6ccd6f5974a0b6c849794b9a2794
Gerrit-Change-Number: 86566
Gerrit-PatchSet: 1
Gerrit-Owner: Paz Zcharya <pazz(a)google.com>
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/86564?usp=email )
Change subject: mb/starlabs/byte_adl: Disconnect WLAN Sleep GPIO
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/86564?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4b3421f1ab676599ffec6b2f46429ce937704e40
Gerrit-Change-Number: 86564
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Sun, 23 Feb 2025 21:04:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/86565?usp=email )
Change subject: mb/starlabs/byte_adl: Reconfigure the vGPIO's for CNVi BT
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/86565?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7d6007e40b2edbadeb5611f6cd67df0c1e6ee8a6
Gerrit-Change-Number: 86565
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Sun, 23 Feb 2025 21:04:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Matt DeVillier.
Sean Rhodes has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/86564?usp=email )
Change subject: mb/starlabs/byte_adl: Disconnect WLAN Sleep GPIO
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/86564?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4b3421f1ab676599ffec6b2f46429ce937704e40
Gerrit-Change-Number: 86564
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Comment-Date: Sun, 23 Feb 2025 20:53:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Sean Rhodes has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/86565?usp=email )
Change subject: mb/starlabs/byte_adl: Reconfigure the vGPIO's for CNVi BT
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/86565?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7d6007e40b2edbadeb5611f6cd67df0c1e6ee8a6
Gerrit-Change-Number: 86565
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 23 Feb 2025 20:53:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No