From patchwork Tue Sep 16 00:10:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 4913901 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C2203BEEA5 for ; Tue, 16 Sep 2014 00:11:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B8C8201BF for ; Tue, 16 Sep 2014 00:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B59E820220 for ; Tue, 16 Sep 2014 00:11:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754993AbaIPALQ (ORCPT ); Mon, 15 Sep 2014 20:11:16 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:41308 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676AbaIPALP (ORCPT ); Mon, 15 Sep 2014 20:11:15 -0400 Received: from [187.57.188.150] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTgMR-00017P-CM; Tue, 16 Sep 2014 00:11:11 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1XTgMD-0000XI-Si; Mon, 15 Sep 2014 21:10:57 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Pawel Osciak , Nicolas Dufresne Subject: [PATCH] [media] BZ#84401: Revert "[media] v4l: vb2: Don't return POLLERR during transient buffer underruns" Date: Mon, 15 Sep 2014 21:10:55 -0300 Message-Id: <1410826255-2025-1-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.9.3 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 9241650d62f79a3da01f1d5e8ebd195083330b75. The commit 9241650d62f7 was meant to solve an issue with Gstreamer version 0.10 with libv4l 1.2, where a fixup patch for DQBUF exposed a bad behavior ag Gstreamer. It does that by returning POLERR if VB2 is not streaming. However, it broke VBI userspace support on alevt and mtt (and maybe other VBI apps), as they rely on the old behavior. Due to that, we need to roll back and restore the previous behavior. It means that there are still some potential regressions by reverting it, but those are known to occur only if: - libv4l is version 1.2 or upper (due to DQBUF fixup); - Gstreamer version 1.2 or before are being used, as this bug got fixed on Gstreamer 1.4. As both libv4l 1.2 and Gstreamer version 1.4 were released about the same time, and the fix went only on Kernel 3.16 and were not backported to stable, it is very unlikely that reverting it would cause much harm. For more details, see: https://bugzilla.kernel.org/show_bug.cgi?id=84401 Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Pawel Osciak Cc: Nicolas Dufresne Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/videobuf2-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7e6aff673a5a..7387821e7c72 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -2583,10 +2583,10 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait) } /* - * There is nothing to wait for if no buffer has been queued and the - * queue isn't streaming, or if the error flag is set. + * There is nothing to wait for if no buffer has been queued + * or if the error flag is set. */ - if ((list_empty(&q->queued_list) && !vb2_is_streaming(q)) || q->error) + if ((list_empty(&q->queued_list) || q->error) return res | POLLERR; /*