From 817e02c0c85380376df0530b4745bea61fd622f7 Mon Sep 17 00:00:00 2001 From: jianglianfang Date: Thu, 28 Sep 2023 16:31:55 +0800 Subject: [PATCH] video/fb: move wdog from fb_chardev_s to fb_paninfo_s every pan_info should have it own wdog Signed-off-by: jianglianfang --- drivers/video/fb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/fb.c b/drivers/video/fb.c index 9c04f4f2be..5dcb9b4164 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -72,6 +72,8 @@ struct fb_paninfo_s { FAR struct circbuf_s buf; /* Pan buffer queued list */ + struct wdog_s wdog; /* VSync offset timer */ + FAR struct fb_chardev_s *dev; }; @@ -86,7 +88,6 @@ struct fb_chardev_s FAR struct fb_vtable_s *vtable; /* Framebuffer interface */ uint8_t plane; /* Video plan number */ clock_t vsyncoffset; /* VSync offset ticks */ - struct wdog_s wdog; /* VSync offset timer */ FAR struct fb_priv_s *head; FAR struct fb_paninfo_s *paninfo; /* Pan info array */ size_t paninfo_count; /* Pan info count */ @@ -1311,7 +1312,7 @@ static void fb_pollnotify(FAR struct fb_chardev_s *fb, int overlay) if (fb->vsyncoffset > 0) { - wd_start(&fb->wdog, fb->vsyncoffset, fb_do_pollnotify, + wd_start(&fb->paninfo[id].wdog, fb->vsyncoffset, fb_do_pollnotify, (wdparm_t)(&fb->paninfo[id])); } else