video/fb: move wdog from fb_chardev_s to fb_paninfo_s

every pan_info should have it own wdog

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
This commit is contained in:
jianglianfang 2023-09-28 16:31:55 +08:00 committed by Xiang Xiao
parent 10991cf5f4
commit 817e02c0c8

View File

@ -72,6 +72,8 @@ struct fb_paninfo_s
{ {
FAR struct circbuf_s buf; /* Pan buffer queued list */ FAR struct circbuf_s buf; /* Pan buffer queued list */
struct wdog_s wdog; /* VSync offset timer */
FAR struct fb_chardev_s *dev; FAR struct fb_chardev_s *dev;
}; };
@ -86,7 +88,6 @@ struct fb_chardev_s
FAR struct fb_vtable_s *vtable; /* Framebuffer interface */ FAR struct fb_vtable_s *vtable; /* Framebuffer interface */
uint8_t plane; /* Video plan number */ uint8_t plane; /* Video plan number */
clock_t vsyncoffset; /* VSync offset ticks */ clock_t vsyncoffset; /* VSync offset ticks */
struct wdog_s wdog; /* VSync offset timer */
FAR struct fb_priv_s *head; FAR struct fb_priv_s *head;
FAR struct fb_paninfo_s *paninfo; /* Pan info array */ FAR struct fb_paninfo_s *paninfo; /* Pan info array */
size_t paninfo_count; /* Pan info count */ 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) 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])); (wdparm_t)(&fb->paninfo[id]));
} }
else else