Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3222413rdh; Mon, 27 Nov 2023 08:56:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvrN9jCXtqfiohC+kdNYunEGCnXcvVSyVkFTIqfUPlK7gqg+SZOX/RtQ6J0IloAY7DnvTB X-Received: by 2002:a17:903:24c:b0:1ce:5b93:1596 with SMTP id j12-20020a170903024c00b001ce5b931596mr13824674plh.5.1701104214638; Mon, 27 Nov 2023 08:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104214; cv=none; d=google.com; s=arc-20160816; b=Ib5eggjZ9ighLu1Az+IjyXVSi2kGf1l2/1MeB9cF0UIVCIKuvx/jInecBMiE4V8TAl GCLryrnx49+HvLMAfJb6warcCE8ymdjj3DaKLoPPqoQsMINeeHysoPq5hz7Gsqh0HX7o TOWJ1tlv3G+f2MZA2fl093PGFwNPGw0of51CvJjaW9RJS9gKWPI6SYjLtgOt+65Kqeim VdbDw25h6KnKTToHYzikG3Rom6Thj6zntDJh6RZe42mBksgIz9OypGWJM9EYPN5CtYAc TSL3L73hpmQgnyXHfo9kMtRQmRDA4m9c2rd0PccTU6O7Eg28Dk17YvajeMvoop9l5gl8 LGuQ== 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=nGEr44Ox3/2KTPUcZhg1cjZDaQOT/GtVTY8AjlhDSrE=; fh=1G14ja0N/gmjq+ba9Y73sDvqtNnP4Tgplds/+tu011I=; b=P+yjHN+Cy/2psCvf/213qlT9aAJyUs2l7CtTiYL2PeuYv8IFDwzC9LV2N6pILTKCIr e8kTRlBtJ3a1bxFcfOpJ9YvAaS2E20VsH9yKcPb6gkOFgxdlD3B8JROMhzquVU5ZBnN/ aBXkm8LZ8cOnxAlw/SJ7NZS6Uw2MbiXDAIRhGLRPRhscjZK2ySzJ+bi40BMWeUNB0vTe gfUTyX8rZRjQwXS4gjSVnxlG10/1CMk7o32uRDijTdlKF4h5QNYIbJ/t1BqTVH+e7O4V RhXp6e0zVk4c3ruIHa9vc8QwtZi11OJ/qzRLZEKD84q5gJOaPs1gZV4HqPjYVkLerrYB 2ARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JVjLCLb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id u8-20020a170902e5c800b001cfde84f92esi878240plf.82.2023.11.27.08.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:56:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=JVjLCLb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 E1655807A59A; Mon, 27 Nov 2023 08:56:51 -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 S234686AbjK0Q4L (ORCPT + 99 others); Mon, 27 Nov 2023 11:56:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234251AbjK0Qzc (ORCPT ); Mon, 27 Nov 2023 11:55:32 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2967319AA; Mon, 27 Nov 2023 08:55:21 -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 43B9A66072E7; Mon, 27 Nov 2023 16:55:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104119; bh=afrMqjrALFOXIhCz1raNZ7/QwbGBSwKlzOWAk681eQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVjLCLb0nBrqf5glep/h0Gt7uYvwjMeFCskphJUITTXCYwGL9BJgBStqLGhM40DBN bJ46yJCcPRrBnrXHH24IZcU0XoMmgldhzmsLSFvW89QCcdhJFlJdozppNr9xFZ2XDg 0OoqOroKpaAndWzVFd9lSZ4d3csC8eagUTBnDIq57bZ6B4Qre+pvm/qGMbkvz9eUro /8ZhwaeVIqD2MBqMq3WFUb5inmNy/Rz9yg+0UI4vMwYd7uRfW/qzV6N3EkEur50PsW tYZ2IQZ6KWjSX7mnsw2HQGww2zq8drPlRitnQWvze6CcSOCllSJjE9E+8b2AWMgnsB iFA/1RJFRAPrw== 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 , Chen-Yu Tsai , Samuel Holland Subject: [PATCH 18/55] media: sunxi: sun8i-di: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:17 +0100 Message-Id: <20231127165454.166373-19-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231127165454.166373-1-benjamin.gaignard@collabora.com> References: <20231127165454.166373-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, 27 Nov 2023 08:56:52 -0800 (PST) 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun8i-di driver doesn't use DMA engine and just want to specify the minimum number of buffers to allocate when calling VIDIOC_REQBUFS. That 'min_reqbufs_allocation' field purpose so use it. Signed-off-by: Benjamin Gaignard CC: Chen-Yu Tsai CC: Samuel Holland --- drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index 90ab1d77b6a5..d0f4f1f98bf0 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -673,7 +673,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->io_modes = VB2_MMAP | VB2_DMABUF; src_vq->drv_priv = ctx; src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->ops = &deinterlace_qops; src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; @@ -688,7 +688,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; dst_vq->drv_priv = ctx; dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - dst_vq->min_buffers_needed = 2; + dst_vq->min_reqbufs_allocation = 2; dst_vq->ops = &deinterlace_qops; dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; -- 2.39.2