driver/fb:remove overlay from fb_notify_vsync

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
This commit is contained in:
jianglianfang 2023-12-08 15:18:25 +08:00 committed by Xiang Xiao
parent 468617096e
commit 1e29b8de1d
4 changed files with 22 additions and 27 deletions

View File

@ -426,7 +426,7 @@ void sim_x11loop(void)
if (now - last >= MSEC2TICK(16))
{
last = now;
fb_notify_vsync(&g_fbobject, FB_NO_OVERLAY);
fb_notify_vsync(&g_fbobject);
if (fb_paninfo_count(&g_fbobject, FB_NO_OVERLAY) > 1)
{
fb_remove_paninfo(&g_fbobject, FB_NO_OVERLAY);

View File

@ -1223,14 +1223,17 @@ static int fb_get_planeinfo(FAR struct fb_chardev_s *fb,
}
/****************************************************************************
* Name: fb_notify_paninfo
* Name: fb_do_pollnotify
****************************************************************************/
static void fb_notify_paninfo(FAR struct fb_paninfo_s *paninfo,
pollevent_t events, int overlay)
static void fb_do_pollnotify(wdparm_t arg)
{
FAR struct fb_paninfo_s *paninfo = (FAR struct fb_paninfo_s *)arg;
FAR struct fb_priv_s * priv;
irqstate_t flags;
int overlay;
overlay = paninfo - paninfo->dev->paninfo - 1;
flags = enter_critical_section();
for (priv = paninfo->dev->head; priv; priv = priv->flink)
@ -1242,26 +1245,12 @@ static void fb_notify_paninfo(FAR struct fb_paninfo_s *paninfo,
/* Notify framebuffer is writable. */
poll_notify(priv->fds, CONFIG_VIDEO_FB_NPOLLWAITERS, events);
poll_notify(priv->fds, CONFIG_VIDEO_FB_NPOLLWAITERS, POLLOUT);
}
leave_critical_section(flags);
}
/****************************************************************************
* Name: fb_do_pollnotify
****************************************************************************/
static void fb_do_pollnotify(wdparm_t arg)
{
FAR struct fb_paninfo_s *paninfo = (FAR struct fb_paninfo_s *)arg;
int overlay;
overlay = paninfo - paninfo->dev->paninfo - 1;
fb_notify_paninfo(paninfo, POLLOUT, overlay);
}
#ifdef CONFIG_FB_SYNC
/****************************************************************************
* Name: fb_sem_wait
@ -1373,20 +1362,27 @@ static void fb_pollnotify(FAR struct fb_chardev_s *fb, int overlay)
*
* Input Parameters:
* vtable - Pointer to framebuffer's virtual table.
* overlay - Overlay index.
*
****************************************************************************/
void fb_notify_vsync(FAR struct fb_vtable_s *vtable, int overlay)
void fb_notify_vsync(FAR struct fb_vtable_s *vtable)
{
FAR struct fb_chardev_s *fb;
FAR struct fb_paninfo_s *paninfo;
FAR struct fb_priv_s * priv;
irqstate_t flags;
fb = vtable->priv;
if (fb != NULL)
{
paninfo = &fb->paninfo[overlay + 1];
fb_notify_paninfo(paninfo, POLLPRI, overlay);
flags = enter_critical_section();
for (priv = fb->head; priv; priv = priv->flink)
{
/* Notify that the vsync comes. */
poll_notify(priv->fds, CONFIG_VIDEO_FB_NPOLLWAITERS, POLLPRI);
}
leave_critical_section(flags);
}
}

View File

@ -126,7 +126,7 @@ static void goldfish_fb_vsync_irq(FAR struct goldfish_fb_s *fb)
}
#endif
fb_notify_vsync(&fb->vtable, FB_NO_OVERLAY);
fb_notify_vsync(&fb->vtable);
if (fb_peek_paninfo(&fb->vtable, &info, FB_NO_OVERLAY) == OK)
{

View File

@ -1015,11 +1015,10 @@ void up_fbuninitialize(int display);
*
* Input Parameters:
* vtable - Pointer to framebuffer's virtual table.
* overlay - Overlay index.
*
****************************************************************************/
void fb_notify_vsync(FAR struct fb_vtable_s *vtable, int overlay);
void fb_notify_vsync(FAR struct fb_vtable_s *vtable);
/****************************************************************************
* Name: fb_peek_paninfo