This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d162e4e366334050b07455b477a5de0f878d2b31
Author: buxiasen <[email protected]>
AuthorDate: Tue Mar 31 12:48:38 2026 +0800

    video/goldfish: add empty updatearea for CONFIG_FB_UPDATE
    
    Add stub updatearea implementations to goldfish_fb and
    goldfish_gpu_fb drivers so that LVGL's FBIO_UPDATE ioctl
    does not fail when CONFIG_FB_UPDATE is enabled.
    
    Signed-off-by: buxiasen <[email protected]>
---
 drivers/video/goldfish_fb.c     | 15 +++++++++++++++
 drivers/video/goldfish_gpu_fb.c | 16 ++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/drivers/video/goldfish_fb.c b/drivers/video/goldfish_fb.c
index b030a3bc853..b3094e98af7 100644
--- a/drivers/video/goldfish_fb.c
+++ b/drivers/video/goldfish_fb.c
@@ -224,6 +224,18 @@ static int goldfish_getplaneinfo(FAR struct fb_vtable_s 
*vtable, int planeno,
   return -EINVAL;
 }
 
+#ifdef CONFIG_FB_UPDATE
+/****************************************************************************
+ * Name: goldfish_fb_updatearea
+ ****************************************************************************/
+
+static int goldfish_fb_updatearea(FAR struct fb_vtable_s *vtable,
+                                  FAR const struct fb_area_s *area)
+{
+  return OK;
+}
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -290,6 +302,9 @@ int goldfish_fb_register(int display, FAR void *regs, int 
irq)
 
   fb->vtable.getplaneinfo = goldfish_getplaneinfo;
   fb->vtable.getvideoinfo = goldfish_getvideoinfo;
+#ifdef CONFIG_FB_UPDATE
+  fb->vtable.updatearea   = goldfish_fb_updatearea;
+#endif
 
   ret = irq_attach(fb->irq, goldfish_fb_interrupt, fb);
   if (ret < 0)
diff --git a/drivers/video/goldfish_gpu_fb.c b/drivers/video/goldfish_gpu_fb.c
index 193d0bab8f3..9ce70ad1c45 100644
--- a/drivers/video/goldfish_gpu_fb.c
+++ b/drivers/video/goldfish_gpu_fb.c
@@ -29,6 +29,7 @@
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
+#include <nuttx/config.h>
 #include <nuttx/kthread.h>
 #include <nuttx/video/fb.h>
 #include <nuttx/irq.h>
@@ -480,6 +481,18 @@ static int goldfish_gpu_fb_vsync_thread(int argc, FAR 
char** argv)
   return OK;
 }
 
+#ifdef CONFIG_FB_UPDATE
+/****************************************************************************
+ * Name: goldfish_gpu_fb_updatearea
+ ****************************************************************************/
+
+static int goldfish_gpu_fb_updatearea(FAR struct fb_vtable_s *vtable,
+                                      FAR const struct fb_area_s *area)
+{
+  return OK;
+}
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -575,6 +588,9 @@ int goldfish_gpu_fb_register(int display)
 
   fb->vtable.getplaneinfo = goldfish_gpu_fb_getplaneinfo;
   fb->vtable.getvideoinfo = goldfish_gpu_fb_getvideoinfo;
+#ifdef CONFIG_FB_UPDATE
+  fb->vtable.updatearea   = goldfish_gpu_fb_updatearea;
+#endif
 
   /* Clear goldfish_gpu_fb */
 

Reply via email to