Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3222306rdh; Mon, 27 Nov 2023 08:56:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGX2MtomSG6WrK4f/fCBzoHZFOi3v01PadkShumBhTRMMMPoYdYIFvJ0K/YY7QGiSZ+3a5 X-Received: by 2002:a17:902:868a:b0:1cf:e100:a96b with SMTP id g10-20020a170902868a00b001cfe100a96bmr1298533plo.9.1701104205270; Mon, 27 Nov 2023 08:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104205; cv=none; d=google.com; s=arc-20160816; b=cQqm/Mqm8njvF6nYgNj9LNIZuh2DnrqV82kVFSpAqBBeoEmriCC8N0yZ3SRX6IHe/d 4Ig3nNX1stuibjni42o2L9JQC//LlBMmlsmEm1AEemM0ym2k7Pv2BD7zTT9v8t7lS3/+ ONYAJI3YaK1hko4ILKtDEWHmU75pwTh6pZI/BkdpsnGdN4+yDsR5Tpyk/RWKcHBC9hQd 5+9Gd+8lss4bWix6+ZIy7i95CtXyThFYlIaXEb9dMaNn6Dp4eMzsC69XCRhnFjlDKxqQ C7X4bqOycrbg1mYD6WtI63NEI+35+HeNWoOfXH0T+H3bcbrf5LanwWA+zXSyocKRveK6 Zp7g== 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=PQJwEtmOmV1WWnAc4EjHXMpTePpnZokIAEbYo6DAeY8=; fh=Q2+fBkTJFlOmvn/gakNfgOGMSuLeah3jspZE8+tcJ+8=; b=tT9Awui1+xQH4/lgKHMTfop6oS7LF+HJXYD88uzyhjsEQMU0D2JM5w2lFqGobhKuhq vdQI98qUUg3ztuvSE8wvdDIaHUWLem5+0qIGlWE5VkavzQd+XoRjYMWYl6fudlqLcYHx XgUu7Er+Z3TGAe9HlqAsUU1EGisVCu+2mKijoqDmqh4xkb5fZR1UsiAcRiH8konXuOep ehUfqSIea2W3C+5DIUhM6wpNVFPQbcQnDdrL6PkIAg0sA1rjLjzX4a7MMqQIP5MaqBJV J6x5P5gaLXrK9PvJQYGEZ48mbuztHpvPHCxyUAWWmsrCwxkcYFaCeRvZ/3x7Vi5oYNzj Nr8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EJ2rDmOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b11-20020a170902d50b00b001cf647a0c3fsi10277454plg.530.2023.11.27.08.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:56:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EJ2rDmOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 6A4868092216; Mon, 27 Nov 2023 08:56:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234034AbjK0Qzd (ORCPT + 99 others); Mon, 27 Nov 2023 11:55:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234336AbjK0Qz0 (ORCPT ); Mon, 27 Nov 2023 11:55:26 -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 5CB93D5B; Mon, 27 Nov 2023 08:55:15 -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 8AD836607323; Mon, 27 Nov 2023 16:55:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104114; bh=q+PBOieh7TUOZfOTD/eax3kPGizf1naDWVCgdVzk/Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EJ2rDmOHuYC+RuIZhYXo8DzC0Rkky/qSkpSFNsGMMVKLXohgncgJ1VcjJ74ikJGtf pY+o9OAvZ02fx9XYYChpfQcBnLpuhwM0fXK8/MYElMkedofzaOuGcYCgGIGgD9L3/t Qfqaciz57Axsq9LOu5/sBoxUQbbYMlFof/CVjj1OHKZnXjIhLO2lhxnpDDLE9KhY1q rCMIlMoSpiJy5nHB+B5Qpfv51KH3hA8Y28gS7RQFBGvGvtaHEvY8HKUFMR2m21KaLd qDYw4OTcBnjIUkRd6LlPfmV7RjT1KDoCeaKCHbUzFubxnZFKp5UK+/Ug0zAxL588t3 o9asdDeXrRa9A== 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 , Jean-Christophe Trotin Subject: [PATCH 11/55] media: sti: hva: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:10 +0100 Message-Id: <20231127165454.166373-12-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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:56:36 -0800 (PST) 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. hva 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: Jean-Christophe Trotin --- drivers/media/platform/st/sti/hva/hva-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/st/sti/hva/hva-v4l2.c b/drivers/media/platform/st/sti/hva/hva-v4l2.c index cfe83e9dc01b..d7bc25b0d69e 100644 --- a/drivers/media/platform/st/sti/hva/hva-v4l2.c +++ b/drivers/media/platform/st/sti/hva/hva-v4l2.c @@ -1142,7 +1142,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; src_vq->buf_struct_size = sizeof(struct hva_frame); - src_vq->min_buffers_needed = MIN_FRAMES; + src_vq->min_reqbufs_allocation = MIN_FRAMES; src_vq->dev = ctx->hva_dev->dev; ret = queue_init(ctx, src_vq); @@ -1151,7 +1151,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; dst_vq->buf_struct_size = sizeof(struct hva_stream); - dst_vq->min_buffers_needed = MIN_STREAMS; + dst_vq->min_reqbufs_allocation = MIN_STREAMS; dst_vq->dev = ctx->hva_dev->dev; return queue_init(ctx, dst_vq); -- 2.39.2