summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci_rom.c1
-rw-r--r--drivers/video/video-uclass.c4
-rw-r--r--drivers/video/video_bmp.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index eaacd4066e..7d9b75c2c4 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -331,6 +331,7 @@ int vbe_setup_video_priv(struct vesa_mode_info *vesa,
return log_msg_ret("No x resolution", -ENXIO);
uc_priv->xsize = vesa->x_resolution;
uc_priv->ysize = vesa->y_resolution;
+ uc_priv->line_length = vesa->bytes_per_scanline;
switch (vesa->bits_per_pixel) {
case 32:
case 24:
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index b6551b69d3..f307cf243b 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -226,7 +226,9 @@ static int video_post_probe(struct udevice *dev)
/* Set up the line and display size */
priv->fb = map_sysmem(plat->base, plat->size);
- priv->line_length = priv->xsize * VNBYTES(priv->bpix);
+ if (!priv->line_length)
+ priv->line_length = priv->xsize * VNBYTES(priv->bpix);
+
priv->fb_size = priv->line_length * priv->ysize;
/* Set up colors */
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 1377e19081..2898b0b55d 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -7,6 +7,7 @@
#include <bmp_layout.h>
#include <dm.h>
#include <mapmem.h>
+#include <splash.h>
#include <video.h>
#include <watchdog.h>
#include <asm/unaligned.h>
@@ -140,8 +141,6 @@ __weak void fb_put_word(uchar **fb, uchar **from)
}
#endif /* CONFIG_BMP_16BPP */
-#define BMP_ALIGN_CENTER 0x7fff
-
/**
* video_splash_align_axis() - Align a single coordinate
*