Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1211215pxb; Fri, 1 Apr 2022 07:30:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkzJ+TLGqjtm5f9yAzF+iXrbn3dQtO2JxV8g5tgTXxlQU5mPqmlcsQ8NNwU/v6dWeZkEDK X-Received: by 2002:a65:4141:0:b0:382:2b0c:2bf with SMTP id x1-20020a654141000000b003822b0c02bfmr15267905pgp.522.1648823403941; Fri, 01 Apr 2022 07:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648823403; cv=none; d=google.com; s=arc-20160816; b=FimlXXkE95a5k9pfOKA3KP44CqmEA/frQ1icgaBlZ0V8kbTt1KAbg8vCozJ1kyM/Rt tcZXw2KYs2Pshlm31HaKVaZSCZUfbPTPPXrG0edgsnnEPnjG4UUDO4xclGph34NA4e8e 8taEfM3oXRPHaFb3mak7vIlpJQe/U/RzbRQkhy8W6QwkNm+ymsChER1lLLUAgV7tz0Q/ PmKEB/hH5yTQ55iJjFxgFTy/5b4SQJ8Ft+0P1T21P4SnfHa+n7uHxEMq5WPcy+ztrn8e Dp4YV/AJM6Jyw6boXYD3cupdmGcaAu2/6W3SUnEDA/yieAY9JP+4B8m1QJ/UQHf8Q/Lb uQhQ== 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=NzuvQM61IaKsPfh8XFNmyj/dpMqR8BjPgTwqZ//5UMg=; b=mHLePEnFBeI08BIBlAaj7aCo6B0t3m5cN9AmUZRNeDPHVU/1AbMqaOd+/pccbWSOLd LjB3RltZ3NR6W+reMuSRezwWU+FM5+4l3+HCI8bzmnyCR66zyg1p0x3l1id+HMEamer0 ccKTYoDiQJX8Y8OFxstByReXWBu8Ng84eAw5kAS/qwHXcEURCO5484NBi1Ub+lKJpMlT ylPU0il/A22u8R4di/ys3WoS/EEY40piOVI9Q82AcwkxhViePgukYo3mf08E0gSyJRy4 HYS9Jwi5AKFAbOes+GCP6W3UgRSirABLYyIN/Vn6I06IqNHs7/k9gWPWvERGEmXgtxmF WbUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Zi8EIAxP; 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 e21-20020a170902f11500b001541b329c33si1959905plb.608.2022.04.01.07.29.49; Fri, 01 Apr 2022 07:30:03 -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=Zi8EIAxP; 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 S240822AbiCaTjj (ORCPT + 99 others); Thu, 31 Mar 2022 15:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240779AbiCaTj2 (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 43D9B2102AA; Thu, 31 Mar 2022 12:37:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id 300941F4724D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648755458; bh=RrVHdlTOtkGYblUxkaOs8WkHp5+WDfAbFJ5ZboXk3tI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zi8EIAxPwcX4aRMfL7d91NXXfjHGmzyE7d5YlfyJFimNZvfte0AFF3kdVetq7/jQ8 SHDzIqgSlp2U00OIVmZUryvMOarEIl6hNXGTTe2rsUlfHFyKM/TNiv83qUAwxYWitU e0LshldRfnvfBzvDTNH2D6HtkKqnSlgfIkvieLX9ue+aomb27kFQtzbw5J2A5nc5rm 6zWLF3OsMNlBEw0g17XjwClK2DV1qlRv98JTZ8JLxGM78tky9EN9A94slez3cccAIf gZCq/VpQ35UM2JUiwA+BLBZDMqCGulg1UDpMOd+2bXLBVmefG71lYvC/ycd8+j/5x7 cIjSRNUvOnj3w== From: Nicolas Dufresne To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab Cc: kernel@collabora.com, Sebastian Fricke , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/23] media: videobuf2-v4l2: Warn on holding buffers without support Date: Thu, 31 Mar 2022 15:37:05 -0400 Message-Id: <20220331193726.289559-4-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 From: Sebastian Fricke Using V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag without specifying the subsystem flag VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF, results in silently ignoring it. Warn the user via a debug print when the flag is requested but ignored by the videobuf2 framework. Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c index 6edf4508c636..812c8d1962e0 100644 --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c @@ -329,8 +329,13 @@ static int vb2_fill_vb2_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b */ vbuf->flags &= ~V4L2_BUF_FLAG_TIMECODE; vbuf->field = b->field; - if (!(q->subsystem_flags & VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF)) + if (!(q->subsystem_flags & VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF)) { + if (vbuf->flags & V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF) + dprintk(q, 1, + "Request holding buffer (%d), unsupported on output queue\n", + b->index); vbuf->flags &= ~V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF; + } } else { /* Zero any output buffer flags as this is a capture buffer */ vbuf->flags &= ~V4L2_BUFFER_OUT_FLAGS; -- 2.34.1