From 01c76f1a64ba8cb3da9b26be481e289ee16960f0 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 3 Aug 2023 17:32:41 +0800 Subject: video: vidconsole: Fix null dereference of ops->measure At present vidconsole_measure() tests ops->select_font before calling ops->measure, which would result in a null dereference when the console driver provides no ops for measure. Fixes: b828ed7d7929 ("console: Allow measuring the bounding box of text") Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/video/vidconsole-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 05f93047809..b5b3b662590 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -603,7 +603,7 @@ int vidconsole_measure(struct udevice *dev, const char *name, uint size, struct vidconsole_ops *ops = vidconsole_get_ops(dev); int ret; - if (ops->select_font) { + if (ops->measure) { ret = ops->measure(dev, name, size, text, bbox); if (ret != -ENOSYS) return ret; -- cgit v1.3.1 From aba6776a71d3ccbbaf9452271c440364a5640ce3 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 3 Aug 2023 18:40:08 +0800 Subject: video: kconfig: Fix a typo in SPL_VIDEO_REMOVE Add one space between 'before' and 'loading'. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 2a37d026bc2..69f4809cf4a 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1115,7 +1115,7 @@ config SPL_VIDEO_REMOVE bool "Remove video driver after SPL stage" help if this option is enabled video driver will be removed at the end of - SPL stage, beforeloading the next stage. + SPL stage, before loading the next stage. if SPL_SPLASH_SCREEN -- cgit v1.3.1 From 28cd244e847c9a3becc954b5d911a7e67f34b14a Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Wed, 26 Jul 2023 10:42:34 +0800 Subject: bcm2835: Add simiple-framebuffer for use with fkms When the fkms dtb overlay is used only the simple-framebuffer is presented as a usable video display. So, add "simple-framebuffer" compatible to enable video driver bcm2835. Signed-off-by: Jason Wessel Signed-off-by: Meng Li --- drivers/video/bcm2835.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c index c2962932c97..14942526f19 100644 --- a/drivers/video/bcm2835.c +++ b/drivers/video/bcm2835.c @@ -54,6 +54,9 @@ static const struct udevice_id bcm2835_video_ids[] = { { .compatible = "brcm,bcm2835-hdmi" }, { .compatible = "brcm,bcm2711-hdmi0" }, { .compatible = "brcm,bcm2708-fb" }, +#if !IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB) + { .compatible = "simple-framebuffer" }, +#endif { } }; -- cgit v1.3.1