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
The following commit(s) were added to refs/heads/master by this push:
new 94733dd17e1 golfish_gpu_fb: clear fb when initialization
94733dd17e1 is described below
commit 94733dd17e174945ef3b27554afe64ab5df397e1
Author: jianglianfang <[email protected]>
AuthorDate: Thu Nov 21 15:03:07 2024 +0800
golfish_gpu_fb: clear fb when initialization
Commit an initial blank frame during goldfish_gpu_fb_register() to
avoid rendering a stale frame from the emulator after reboot.
Signed-off-by: jianglianfang <[email protected]>
---
drivers/video/goldfish_gpu_fb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/video/goldfish_gpu_fb.c b/drivers/video/goldfish_gpu_fb.c
index b6149b163e2..193d0bab8f3 100644
--- a/drivers/video/goldfish_gpu_fb.c
+++ b/drivers/video/goldfish_gpu_fb.c
@@ -576,6 +576,10 @@ int goldfish_gpu_fb_register(int display)
fb->vtable.getplaneinfo = goldfish_gpu_fb_getplaneinfo;
fb->vtable.getvideoinfo = goldfish_gpu_fb_getvideoinfo;
+ /* Clear goldfish_gpu_fb */
+
+ goldfish_gpu_fb_commit(fb, fb->planeinfo.fbmem);
+
/* Create the vsync thread */
snprintf(arg1, 32, "%p", fb);