Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1041516pxb; Fri, 1 Apr 2022 03:02:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ItkAJ5ba7eU8AkvgvlFLvHPqwjS3nfKRAZdPQRp4QBgcgd5kGd7hm8cB8Oz1q+qzwy9Z X-Received: by 2002:a05:6638:d95:b0:321:2654:5ab3 with SMTP id l21-20020a0566380d9500b0032126545ab3mr4772364jaj.194.1648807368977; Fri, 01 Apr 2022 03:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648807368; cv=none; d=google.com; s=arc-20160816; b=iRck7cRVAPW3FeiaJDI5lR8Es2cyZHYoW9kUPnRi6vIm/zZsnV14jyKs4mNIvdSGp+ auBcAiztxZq655VILDw5WeW5yq0AGAf3RPnztKEJT3geJjm13QvBvg4Yqryg8Xu1tTaI b0H3bt60f/3fWkskxo6iun7op1W8FFCFyAlouf8iHfWl1PZXJ+pG2b70JF10lHvYmgGo UICcDMPK/nkWu2eBtyzrBMpdSNz4a93t1r/jdLoKq7yAEZAR5nmyCawusavSmxn4tlOg zvcF+2iJZb/6ve7pIEAQKGEqrvUI4KyBzVZwyk+tYaaDD7Tg/d7c+4Gxpcgaq1mED2Ir 007g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IPP8uuYDPXb48qWRHziPArEn8JYy9KQQTM4nwgdi2Z4=; b=kFwTK7z59TYdoHMC5V7jz7eIKXrlBoLRH9xUF9x/LOgPLXlj2YsrB8mWlU5myFqCsp bSV9NAl517+WLsK6v1fStB6nV9OcaAAXCf2U1pt0Ki8e5TDpKGxVpiO3J56lcrxeD1Ez sWlCoA5jHKwqhtLSMH8f8fqZ5/EZVvmik+x1VDNMRwFgFHsVDjOKtysczpEFToFsFH7v 7YMWamB6PDO624jZSPQpoZq7vhRwl5Aup9RTs6lB2zHc/zZ0ZhoRNX+2gg+xYdrgoro5 wm9KW9aAY7p34qXItb92Ubwm7QZFATk7KDjj6Iod1sB4NFCfGKPQ15Usx6x5g4ncwDUs I0kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P8JxZJhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a928748000000b002c7f51ab864si1181668ilm.46.2022.04.01.03.02.36; Fri, 01 Apr 2022 03:02:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P8JxZJhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240814AbiCaTjf (ORCPT + 99 others); Thu, 31 Mar 2022 15:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240780AbiCaTj2 (ORCPT ); Thu, 31 Mar 2022 15:39:28 -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 EE4351F160C; Thu, 31 Mar 2022 12:37:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id E0A2B1F4724B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648755456; bh=RzISFmgzdgSdtW0+/gjxICIzsCqQWUTem2X0Qdl07rI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8JxZJhCDdx9Qxk6/3g0ArBQAL6zq/4nDv4o4se2D/r8x9FqDSTG1Gmclg/ipJvOd QVlZiS09IZSS6knovbP88HF2IV7HrZE1F3rhavI2rX4E0451TzvLMBrUwygzg1GjGI irNuFE3v7ose8uwUbKL2ZQSLKbjzcElTY/HxaeP2BDXzjK85i+gTlt8+YOVA47lGj6 7d+S7kJOkvLXM5m7rWGukhvKJ9TAGX/mCC6sFzvZCD+1PsYD2j/I2gdHM/oH4ueAsy aKVOeo7LNLz2HOR4LEw51uhN5GKXsZa77yUZ14AZ1Bgg11PvsIE/kVhKqYEApsz9Cg DE6LjQf5fnoCw== From: Nicolas Dufresne To: Mauro Carvalho Chehab Cc: kernel@collabora.com, Sebastian Fricke , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/23] media: v4l2-mem2mem: Trace on implicit un-hold Date: Thu, 31 Mar 2022 15:37:04 -0400 Message-Id: <20220331193726.289559-3-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220331193726.289559-1-nicolas.dufresne@collabora.com> References: <20220331193726.289559-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the timestamp of the src buffer differs from the timestamp of a held dst buffer, the held buffer is implicitly removed and marked as done. Add a trace to help debugging if someone hits that case. Signed-off-by: Nicolas Dufresne Reviewed-by: Sebastian Fricke --- drivers/media/v4l2-core/v4l2-mem2mem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 675e22895ebe..fbcd79763e8f 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -336,6 +336,7 @@ static void __v4l2_m2m_try_queue(struct v4l2_m2m_dev *m2m_dev, if (src && dst && dst->is_held && dst->vb2_buf.copied_timestamp && dst->vb2_buf.timestamp != src->vb2_buf.timestamp) { + dprintk("src and dst timestamp mismatch, removing held capture buffer.\n"); dst->is_held = false; v4l2_m2m_dst_buf_remove(m2m_ctx); v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); -- 2.34.1