Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2701568rdb; Mon, 4 Dec 2023 05:23:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkemjHLkbzznq5yg7YdWx+o7sMy9uZy8RFNCE+bkVs0DX8DVCxMZVmqcC+c1LzMsszaF8F X-Received: by 2002:a17:903:32c5:b0:1d0:6ffe:1e7a with SMTP id i5-20020a17090332c500b001d06ffe1e7amr2505155plr.93.1701696229228; Mon, 04 Dec 2023 05:23:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701696229; cv=none; d=google.com; s=arc-20160816; b=gcuGhM/OmrgjLlGlBo82YOG2FBFrT9zs8hfIykzu9eyHLJyi4zZQ9Pl2WEV5DxDQMX VHoZyM/nHoJPHYhkCxI3QBs+740umJ6Hp7z1Dd0hOk+8p24nPc3J62uH5im5D5VxTmvY pZxoo02n3PtkWI8Zq0NhDcD4U1Z9xOGuZc3iMY/WzUL9hDh3XwagtwzElraGsjiJfFJg wxpqZQhxGsQNAdAVpQMMjyEgg64QtATJnqHsBnzzSSMSmv84JUJDK73SVh6Jujm0+FtV hQ4JCp+4tN0LqhXCjTYh6hHV3uRh51JuYSjrxShlxtJwA3nx4Qw7kyjRg69K62ns1/t1 4i4w== 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=XouuEd+2GFPIP1IHGZk/w6mj37frSOH+AhJZNPNyexU=; fh=nikTID0PJ6NwkGNufN11Ag6f/xC6mcRAltiCDIW3jKo=; b=JdVl+wKoHDF8MN50H96J0MP59mOTyrAsE9p1nl4Z8mbtollUnvI35jhbnujtUgimL3 cch22BjFtMKM1hZ6NcFWPT0ZJeE9kdTS/3Hsa1g2V3LYIJPWw4bfjLDM/vdEkQIThxPK UjsT/VbGP1N3stwNd9XvFfzO1sLrcXpu6QeW86l+k5RF8quQeJqmy1cBG6PnbNh7Bsww lbhJuP/+uhtDDYCaaNgEqU9xm6sLHhqwmFLObJgHQBvHSQCvLDVP0osDjUT9b4o7cOFH DpPKe2zsPdBQSeIDjJW6y0IClD1fNB9GQdRRR3SD8bvj2DWXB0y+SrWBuFuXpeSMas8l ZyqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LGuCyNM5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n7-20020a170902d2c700b001cfb6a76794si8211046plc.397.2023.12.04.05.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:23:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LGuCyNM5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EB6518067A7E; Mon, 4 Dec 2023 05:23:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344205AbjLDNXb (ORCPT + 99 others); Mon, 4 Dec 2023 08:23:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233691AbjLDNXa (ORCPT ); Mon, 4 Dec 2023 08:23:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9758295; Mon, 4 Dec 2023 05:23:36 -0800 (PST) Received: from benjamin-XPS-13-9310.. (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id E91DF6605835; Mon, 4 Dec 2023 13:23:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701696215; bh=/jXOJsw0p75OXpH12qRqf2mFFTImN471wSEgNYwBmG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LGuCyNM5hcxzCsRTiYNtAcnlFtm2LTROFeLGFP+16aozE/clXAf370U6xBkhRtOhe uSGmSVWUvaRyW4Bil7+Jh5PX2e9pny6Is9oMmv1FoS0skDmPZXX+6srUwjZni61EeU Y9j+C0RIicWsyX0uQCVCWj3DEi8dFOC2LlHjv2nRMfioCdoTSpRYI3M6GHKuvpPpVG O9G9QhUfr8v6o6LkctQt9NPED5klHsOVoGbB6HysCFy5Z4/Ae7aPM3J/tZKHEERrsY bQf0WWOelyNfruoqU3vMI4M9TxoEnszzW5QCT6RzlBW9HgHoIeO0+2ENgTi5kNqmnu yWShit1oxBLUQ== From: Benjamin Gaignard To: hverkuil@xs4all.nl, mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, matt.ranostay@konsulko.com Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v2 01/36] media: usb: cx231xx: Remove useless setting of min_buffers_needed Date: Mon, 4 Dec 2023 14:22:48 +0100 Message-Id: <20231204132323.22811-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204132323.22811-1-benjamin.gaignard@collabora.com> References: <20231204132323.22811-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:23:47 -0800 (PST) This driver uses min_buffers_needed which vb2 uses to ensure start_streaming is called when at least 'min_buffers_needed' buffers are queued. However, this driver doesn't need this, it can stream fine without any buffers queued. Just drop this unnecessary restriction. Signed-off-by: Benjamin Gaignard --- drivers/media/usb/cx231xx/cx231xx-417.c | 1 - drivers/media/usb/cx231xx/cx231xx-video.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index 45973fe690b2..24c94cfb5268 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c @@ -1782,7 +1782,6 @@ int cx231xx_417_register(struct cx231xx *dev) q->ops = &cx231xx_video_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; q->lock = &dev->lock; err = vb2_queue_init(q); if (err) diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index c8eb4222319d..ce44114e2188 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -1811,7 +1811,6 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) q->ops = &cx231xx_video_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; q->lock = &dev->lock; ret = vb2_queue_init(q); if (ret) @@ -1871,7 +1870,6 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) q->ops = &cx231xx_vbi_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; q->lock = &dev->lock; ret = vb2_queue_init(q); if (ret) -- 2.39.2