summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-11-19 13:23:56 -0700
committerAnatolij Gustschin <agust@denx.de>2021-12-26 23:02:19 +0100
commitecb8b4f8f3896330ecc5b9b25a8663d00de59b9a (patch)
treed5a69d554f9fb53c772d7b7cd4a49820f9c5ec9a /drivers/video
parent646e169aa0e6e699aa9aa861a0b2ad6705031cba (diff)
video: Drop the uclass colour map
We don't need this anymore since we use the BMP palette directly. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/video-uclass.c23
-rw-r--r--drivers/video/video_bmp.c22
2 files changed, 0 insertions, 45 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index bab2a035a3..a52b5d9323 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -319,27 +319,6 @@ int video_sync_copy_all(struct udevice *dev)
#endif
-/* Set up the colour map */
-static int video_pre_probe(struct udevice *dev)
-{
- struct video_priv *priv = dev_get_uclass_priv(dev);
-
- priv->cmap = calloc(256, sizeof(ushort));
- if (!priv->cmap)
- return -ENOMEM;
-
- return 0;
-}
-
-static int video_pre_remove(struct udevice *dev)
-{
- struct video_priv *priv = dev_get_uclass_priv(dev);
-
- free(priv->cmap);
-
- return 0;
-}
-
/* Set up the display ready for use */
static int video_post_probe(struct udevice *dev)
{
@@ -447,9 +426,7 @@ UCLASS_DRIVER(video) = {
.name = "video",
.flags = DM_UC_FLAG_SEQ_ALIAS,
.post_bind = video_post_bind,
- .pre_probe = video_pre_probe,
.post_probe = video_post_probe,
- .pre_remove = video_pre_remove,
.priv_auto = sizeof(struct video_uc_priv),
.per_device_auto = sizeof(struct video_priv),
.per_device_plat_auto = sizeof(struct video_uc_plat),
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 2a3536c790..466c0f5436 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -214,28 +214,10 @@ static void video_splash_align_axis(int *axis, unsigned long panel_size,
*axis = max(0, (int)axis_alignment);
}
-static void video_set_cmap(struct udevice *dev,
- struct bmp_color_table_entry *cte, unsigned colours)
-{
- struct video_priv *priv = dev_get_uclass_priv(dev);
- int i;
- ushort *cmap = priv->cmap;
-
- debug("%s: colours=%d\n", __func__, colours);
- for (i = 0; i < colours; ++i) {
- *cmap = ((cte->red << 8) & 0xf800) |
- ((cte->green << 3) & 0x07e0) |
- ((cte->blue >> 3) & 0x001f);
- cmap++;
- cte++;
- }
-}
-
int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
bool align)
{
struct video_priv *priv = dev_get_uclass_priv(dev);
- ushort *cmap_base = NULL;
int i, j;
uchar *start, *fb;
struct bmp_image *bmp = map_sysmem(bmp_image, 0);
@@ -291,9 +273,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
debug("Display-bmp: %d x %d with %d colours, display %d\n",
(int)width, (int)height, (int)colours, 1 << bpix);
- if (bmp_bpix == 8)
- video_set_cmap(dev, palette, colours);
-
padded_width = (width & 0x3 ? (width & ~0x3) + 4 : width);
if (align) {
@@ -316,7 +295,6 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
switch (bmp_bpix) {
case 1:
case 8: {
- cmap_base = priv->cmap;
#ifdef CONFIG_VIDEO_BMP_RLE8
u32 compression = get_unaligned_le32(&bmp->header.compression);
debug("compressed %d %d\n", compression, BMP_BI_RLE8);