From 52e166c021a76e34092fb2bd171df5991e7e4a5c Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Thu, 2 Nov 2017 11:29:42 +0800 Subject: [PATCH] PD#150542: stream_input: use msecs_to_jiffies to replace magic number Change-Id: Id9dd93f82896f68f4f510fdb935a534d53ec718d Signed-off-by: Nanxin Qin --- .../amlogic/media_modules/stream_input/parser/streambuf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media_modules/stream_input/parser/streambuf.c b/drivers/amlogic/media_modules/stream_input/parser/streambuf.c index c321d84bd344..567e0ab52da0 100644 --- a/drivers/amlogic/media_modules/stream_input/parser/streambuf.c +++ b/drivers/amlogic/media_modules/stream_input/parser/streambuf.c @@ -385,7 +385,7 @@ void stbuf_vdec2_init(struct stream_buf_s *buf) s32 stbuf_wait_space(struct stream_buf_s *stream_buf, size_t count) { struct stream_buf_s *p = stream_buf; - long time_out = 20; + long time_out = 200; p->wcnt = count; @@ -394,7 +394,8 @@ s32 stbuf_wait_space(struct stream_buf_s *stream_buf, size_t count) mod_timer(&p->timer, jiffies + STBUF_WAIT_INTERVAL); if (wait_event_interruptible_timeout - (p->wq, stbuf_space(p) >= count, time_out) == 0) { + (p->wq, stbuf_space(p) >= count, + msecs_to_jiffies(time_out)) == 0) { del_timer_sync(&p->timer); return -EAGAIN;