Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3052850pxk; Mon, 28 Sep 2020 07:16:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/19KrWzPtMapjHORK2FDmMDAB2fL6Y9C4/H67N3v6RlDelD4Xpa0EpVHku4uO9ddumvsy X-Received: by 2002:a05:6402:22b4:: with SMTP id cx20mr1973225edb.372.1601302595161; Mon, 28 Sep 2020 07:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601302595; cv=none; d=google.com; s=arc-20160816; b=wqlNXTu0ys4hMWQeB6z3xpGdZvwhTmHWRxlrcSUKhohKUHpajKeBcB24O0RPbzf8dm 9nVoNhyRx3dyouu37emtDoj/77XzNZHKAW7lNl7M2ZMvvXFRjTD91/oVoqkVYokO/+be 4TZrXmWJ4ZtnNxca4cJFSjcmdLTnEoX25qebCuyghsgbbourOgJRWpkaGZlYVObJE8jY vcRSJJbZRz09b5QjxVEKhC4QTvN8lOScUyuhUGFC7QJESP57q+xEgOhRc6TRVVIbl34l lnFNWuZI41W+6Ma4o2cr6WHeD8R2hACQ/sdFwOJljDoslM4xIoAEWUg5VT8OkQaPvrfR d8ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=yh+aM22q9/5CecOW74HgKdqznu3/8l2C30tUWV8y4DA=; b=h6w1+keawaLOTRC+BjVlvnRzjQpkf0YzSvJ9EHP2s6VW7eKDlkYnPjRRnHaDCFzCyg Cr40L3UPW2s7g4ip9rr4qThkX4U5HkpOzJacw0wjL9MdSsjXG8VAo6KhJmOC03OvsD+w FCJtvsv4Q0nQnwn3xt/duLAf7FTW5KRL38gKsQUkBne31tuTkWdrpVW/T0zKr6gHsoMP ai6P5ajYJfBPRASAd43798x5LPpQtq/mxM9Mjt2gABbGJiWubEkyzSM1bSx8erwIYptQ MOUIGEKcdiV6opsy82hl4EUR4FYQdO9n96nvKnjxu0hJhpqjJH/39cK78a0g5Bo1xh1L 3YAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si653108edr.336.2020.09.28.07.16.11; Mon, 28 Sep 2020 07:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbgI1OMh (ORCPT + 99 others); Mon, 28 Sep 2020 10:12:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgI1OMh (ORCPT ); Mon, 28 Sep 2020 10:12:37 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A7E7C061755; Mon, 28 Sep 2020 07:12:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id E2F0C2997F7 From: Adrian Ratiu To: Ezequiel Garcia , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Hans Verkuil Subject: Re: [PATCH] media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done In-Reply-To: <20200928140334.19070-1-ezequiel@collabora.com> References: <20200814071202.25067-9-xia.jiang@mediatek.com> <20200928140334.19070-1-ezequiel@collabora.com> Date: Mon, 28 Sep 2020 17:13:52 +0300 Message-ID: <87imby3s67.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thank you Ezequiel, Tested-by: Adrian Ratiu On Mon, 28 Sep 2020, Ezequiel Garcia wrote: > A seemingly bad rebase introduced a spurious v4l2_m2m_buf_done, > which releases a buffer twice and therefore triggers a > noisy warning on each job: > > WARNING: CPU: 0 PID: 0 at drivers/media/common/videobuf2/videobuf2-core.c:986 vb2_buffer_done+0x208/0x2a0 > > Fix it by removing the spurious v4l2_m2m_buf_done. > > Reported-by: Adrian Ratiu > Fixes: 911ea8ec42dea ("media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume") > Signed-off-by: Ezequiel Garcia > --- > drivers/media/v4l2-core/v4l2-mem2mem.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c > index f626ba5ee3d9..b221b4e438a1 100644 > --- a/drivers/media/v4l2-core/v4l2-mem2mem.c > +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c > @@ -516,7 +516,6 @@ void v4l2_m2m_buf_done_and_job_finish(struct v4l2_m2m_dev *m2m_dev, > > if (WARN_ON(!src_buf || !dst_buf)) > goto unlock; > - v4l2_m2m_buf_done(src_buf, state); > dst_buf->is_held = src_buf->flags & V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF; > if (!dst_buf->is_held) { > v4l2_m2m_dst_buf_remove(m2m_ctx); > -- > 2.27.0