[PATCH 10/13] fb: Accept overlay framebuffers without modes
Sascha Hauer
s.hauer at pengutronix.de
Thu Sep 26 06:15:08 PDT 2024
This adds a pointer to the base framebuffer to struct fb_info
in case the framebuffer is an overlay. As overlays do not have modes,
accept them in fb_enable() even when it doesn't have a mode.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/video/fb.c | 2 +-
include/fb.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index a752c114e2..3677c63e07 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -138,7 +138,7 @@ static int fb_enable_set(struct param_d *param, void *priv)
{
struct fb_info *info = priv;
- if (!info->mode)
+ if (!info->mode && !info->base)
return -EINVAL;
if (info->p_enable)
diff --git a/include/fb.h b/include/fb.h
index 574a66a396..b08ff1675d 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -175,6 +175,8 @@ struct fb_info {
* be created.
*/
int shadowfb;
+
+ struct fb_info *base;
};
int of_get_display_timing(const struct device_node *np, const char *name,
--
2.39.5
More information about the barebox
mailing list