Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5608630imu; Mon, 26 Nov 2018 02:57:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xr3x1t0g/R86bVYMeoyUO76bURRTh2uyoQijQtUES0OXKJwOVJxNIrV0Zm++lG9t4VBkQo X-Received: by 2002:a17:902:96a:: with SMTP id 97mr13426717plm.45.1543229850149; Mon, 26 Nov 2018 02:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229850; cv=none; d=google.com; s=arc-20160816; b=nXEIk/ginWileduMrOTTwSEfdBLXg+mvT5gXguWI/BY/kmEHEaUgwPMQSyi+A1mykH QnkdD70yC5EYwfG/NodIzzBIQrVccE2MmQNm4Etk/897aTJFbVqwZXsIYXYTKcotQXZE e2fUt+AtQkJIShzz7ekC5k8NNd9TQY0H/+OuIOxb4gXo49vAw50xk0GpLlzdZ+tmx1E+ zV+OcEqb7/05H4FRudpgKamjLWTOwA86n0jGfSJjsz/O9eyIwgwQEa2SPA+KUVj/pRQn lr+881mrvovc6SzzLwIBlL/utv3TdqeyPF/GNxlNoeLpkC7iiJc6OLy5e96KDuuX/2Aw IEMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pHYpbEevntBvB6IdeSQsGC3OhVQUMXk+tAp0aLeX3tw=; b=ie9rf1X0hqmHPv9/0lzIWHuOXFk8iNgfpP2OvqIYDBjZNPlvaUuiKsqgLg16G5LGze N/WIPig31IaPQt69fXQFzVhNUWhvNTw0BYMbB5qpSWcqCU9bixr6NW76S76+JtX7JJjL OYUt6kCc4kj3rnOxgrJevlxLJEns0bJTa3kq6azYirg9p5bPTO+U8i7eEHjjyC8zKpNE BH+3b/r5FLIrG4kKC59TGjyNB02j9R8l1Idf2AunUNzsKURa/VawdcbiTtVQrO2Y52yn rB320i9VlrUEPPFX1W29quxR0d3qYJtHLXC1TaEqK69WnRkZl2phhuZnSmwz+pRrTmfQ lzMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K1JYOkOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r34si42911041pga.242.2018.11.26.02.57.15; Mon, 26 Nov 2018 02:57:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K1JYOkOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728127AbeKZVtc (ORCPT + 99 others); Mon, 26 Nov 2018 16:49:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:58482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbeKZVtb (ORCPT ); Mon, 26 Nov 2018 16:49:31 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DCBCF2089F; Mon, 26 Nov 2018 10:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229747; bh=4LP4I4eVwA9ejoTXH/pLokbqMBggnqwzDfHWuXQxFzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1JYOkOm7T/izxu+VcLNgMAlUEE6CWmQKd2uCGDg51FVjd6ejeAWfUwOMwH5BH6Dz cgTwFs1e75cjvMQ0f7F4kVVKt0nWfcCqbaHUg/cxeEQ7MS7dEvJLC/zZWklNlr7PMM 6DP77MHouWwd3tltpxgau4bn8F57WTmeFcEmFyIE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans Verkuil , Sasha Levin Subject: [PATCH 4.4 58/70] Revert "media: videobuf2-core: dont call memop finish when queueing" Date: Mon, 26 Nov 2018 11:51:13 +0100 Message-Id: <20181126105052.330739066@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ This reverts commit 46431d9c28f6859f8e568ac7db92137f1da31100. This commit fixes a bug in upstream commit a136f59c0a1f ("vb2: Move buffer cache synchronisation to prepare from queue") which isn't present in 4.4. So as a result you get an UNBALANCED message in the kernel log if this patch is applied: vb2: counters for queue ffffffc0f3687478, buffer 3: UNBALANCED! vb2: buf_init: 1 buf_cleanup: 1 buf_prepare: 805 buf_finish: 805 vb2: buf_queue: 806 buf_done: 806 vb2: alloc: 0 put: 0 prepare: 806 finish: 805 mmap: 0 vb2: get_userptr: 0 put_userptr: 0 vb2: attach_dmabuf: 1 detach_dmabuf: 1 map_dmabuf: 805 unmap_dmabuf: 805 vb2: get_dmabuf: 0 num_users: 1609 vaddr: 0 cookie: 805 Reverting this patch solves this regression. Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/v4l2-core/videobuf2-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 1c37d5a78822..8ce9c63dfc59 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -870,12 +870,9 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state) dprintk(4, "done processing on buffer %d, state: %d\n", vb->index, state); - if (state != VB2_BUF_STATE_QUEUED && - state != VB2_BUF_STATE_REQUEUEING) { - /* sync buffers */ - for (plane = 0; plane < vb->num_planes; ++plane) - call_void_memop(vb, finish, vb->planes[plane].mem_priv); - } + /* sync buffers */ + for (plane = 0; plane < vb->num_planes; ++plane) + call_void_memop(vb, finish, vb->planes[plane].mem_priv); spin_lock_irqsave(&q->done_lock, flags); if (state == VB2_BUF_STATE_QUEUED || -- 2.17.1