summaryrefslogtreecommitdiff
path: root/src/lib/bootsplash.c
diff options
context:
space:
mode:
authorJohanna Schander <coreboot@mimoja.de>2019-07-28 08:48:36 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-08-21 09:27:00 +0000
commit7fc006f7452ff944184e2091d670a647b96f9aac (patch)
tree67e5ec963d09fe10a07582f612168466a5d28c0e /src/lib/bootsplash.c
parent7e8eb6bdbe83c31d961e76ac2be6118de5831070 (diff)
downloadcoreboot-7fc006f7452ff944184e2091d670a647b96f9aac.tar.xz
lib/bootsplash: Log bootsplash dimensions and framebuffer dimensions
The bootsplash.jpg needs to match the framebuffer resolution. Configuration errors are more visible if they can be compared easily. Changed message to be always printed: "Setting up bootsplash in ${FRAMEBUFFER_RESOLUTION}" Added message: "Bootsplash image resolution: ${IMAGE_RESOLUTION}" Change-Id: Ib4a06d53c0134b99d3e9e6d3eda9fa30fca9ef7d Signed-off-by: Johanna Schander <coreboot@mimoja.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34598 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/bootsplash.c')
-rw-r--r--src/lib/bootsplash.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/bootsplash.c b/src/lib/bootsplash.c
index 5527b233f5..ee14b9261e 100644
--- a/src/lib/bootsplash.c
+++ b/src/lib/bootsplash.c
@@ -25,7 +25,6 @@ void set_vesa_bootsplash(void)
{
const vbe_mode_info_t *mode_info = vbe_mode_info();
if (mode_info != NULL) {
- printk(BIOS_INFO, "Setting up bootsplash\n");
unsigned int x_resolution = le16_to_cpu(mode_info->vesa.x_resolution);
unsigned int y_resolution = le16_to_cpu(mode_info->vesa.y_resolution);
unsigned int fb_resolution = mode_info->vesa.bits_per_pixel;
@@ -42,6 +41,8 @@ void set_vesa_bootsplash(void)
void set_bootsplash(unsigned char *framebuffer, unsigned int x_resolution,
unsigned int y_resolution, unsigned int fb_resolution)
{
+ printk(BIOS_INFO, "Setting up bootsplash in %dx%d@%d\n", x_resolution, y_resolution,
+ fb_resolution);
struct jpeg_decdata *decdata;
unsigned char *jpeg =
cbfs_boot_map_with_leak("bootsplash.jpg", CBFS_TYPE_BOOTSPLASH, NULL);
@@ -50,6 +51,11 @@ void set_bootsplash(unsigned char *framebuffer, unsigned int x_resolution,
return;
}
+ int image_width, image_height;
+ jpeg_fetch_size(jpeg, &image_width, &image_height);
+
+ printk(BIOS_DEBUG, "Bootsplash image resolution: %dx%d\n", image_width, image_height);
+
decdata = malloc(sizeof(*decdata));
int ret = jpeg_decode(jpeg, framebuffer, x_resolution, y_resolution, fb_resolution,
decdata);