vpp: Modify vframe epoll event [1/1]
authorqiyao.zhou <qiyao.zhou@amlogic.com>
Wed, 22 May 2019 11:23:10 +0000 (19:23 +0800)
committerQiyao Zhou <qiyao.zhou@amlogic.com>
Wed, 22 May 2019 12:25:57 +0000 (05:25 -0700)
PD#SWPL-8850

Problem:
too many print when channel change.

Solution:
Modify vframe epoll event flow to avoid same event.

Verify:
verify on marconi.

Change-Id: Iefbd190c0280276bf941c48bf99706a0f2573df1
Signed-off-by: qiyao.zhou <qiyao.zhou@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index de19c244630577742ce93f31d8fbd0c431d8ff1a..862a3e95a5d7d6c7a8dbb0472e1c6bddbee7749c 100644 (file)
@@ -4059,8 +4059,9 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
                int iret;
 
                last_process_3d_type = process_3d_type;
-               if ((cur_dispbuf->width != vf->width) ||
-                       (cur_dispbuf->height != vf->height)) {
+               if (!cur_dispbuf ||
+                   ((cur_dispbuf->width != vf->width) ||
+                   (cur_dispbuf->height != vf->height))) {
                        atomic_inc(&video_sizechange);
                        wake_up_interruptible(&amvideo_sizechange_wait);
                }