aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini2020-02-10 12:08:51 -0500
committerTom Rini2020-02-10 12:08:51 -0500
commit5f2fe7d4617bbddc45b6a0cbf21cd468c57f4eba (patch)
treed60a2625ae9fcf1abf015517568da2353801769f
parentc998cbea872f7ff9cc0a4887658112abe007bf94 (diff)
parent8382b1019283d2c1e9ba09cf0a10205deaf32fe1 (diff)
Merge tag 'fixes-for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-video
- fix Coverity CID 280902 issue in vid_console_color() - fix vid_console_color() build warning - fix for mxsfb to ensure correct Linux logo position
-rw-r--r--drivers/video/mxsfb.c2
-rw-r--r--drivers/video/vidconsole-uclass.c20
2 files changed, 13 insertions, 9 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index c52981053e9..c097682d00a 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -429,6 +429,6 @@ U_BOOT_DRIVER(mxs_video) = {
.bind = mxs_video_bind,
.probe = mxs_video_probe,
.remove = mxs_video_remove,
- .flags = DM_FLAG_PRE_RELOC,
+ .flags = DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
};
#endif /* ifndef CONFIG_DM_VIDEO */
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 75c7e25095d..8e0fc7f3ecf 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -144,22 +144,26 @@ u32 vid_console_color(struct video_priv *priv, unsigned int idx)
((colors[idx].g >> 2) << 5) |
((colors[idx].b >> 3) << 0);
}
+ break;
case VIDEO_BPP32:
if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
return (colors[idx].r << 16) |
(colors[idx].g << 8) |
(colors[idx].b << 0);
}
+ break;
default:
- /*
- * For unknown bit arrangements just support
- * black and white.
- */
- if (idx)
- return 0xffffff; /* white */
- else
- return 0x000000; /* black */
+ break;
}
+
+ /*
+ * For unknown bit arrangements just support
+ * black and white.
+ */
+ if (idx)
+ return 0xffffff; /* white */
+
+ return 0x000000; /* black */
}
static char *parsenum(char *s, int *num)