Message ID | 20231109163512.179524-37-benjamin.gaignard@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp560320vqs; Thu, 9 Nov 2023 08:41:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBTYtPQhasEwk7Xz59n2XFiH0/75zd0m3n8jDkjlmRu8ASRWIlpbxrmf1yM2KrUbxXK+tp X-Received: by 2002:a17:903:234e:b0:1cc:50f6:7fcc with SMTP id c14-20020a170903234e00b001cc50f67fccmr6512827plh.55.1699548081551; Thu, 09 Nov 2023 08:41:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699548081; cv=none; d=google.com; s=arc-20160816; b=tTB7anLDrUh66MyV1gXNKAXtxGdqqdeG+cods9Ab28eBoRVKV/PvpbZwAHjmbBBJHN GnE7/bcJ1B4VoDqlof9LxWzy8kbpAbeQO0bgBIod5JR0fYeU2J+teC4hYgmUxMNkIk/v +zpRmhXup11QH7wj3GplHus6vETh8bPnDlu7KHQYBRQmLohP6hedGHiiFyvhfQ6ZgSHl 0GV4jX5J3gvbdlJGTW8ZAtcbpUoTMc86yBL7NUkg+doVk2mguXRc9Q5kbCBsMSX5TQEH BeozSFY/HkX8iB+E6e6zF4ADTP5LCiLEPAcMQAGbgrlKCWu6+GMvTX6S4mi5k+6guZN0 mv0w== 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=RS9+eso5eatmsSQyFaoEUuc46h6DvsfGkSyoBWRUTzw=; fh=WFxYisUueDWazJwO9WTweX3SUu1g63bDsaCqyFQ7IaA=; b=mF8e5wxs0YTlHzuAo1krINMFTjLYq19pvBCWs142myoWWRLi472I0asbuTxrl+kYSB NPpMoFiWsOldd3UqHxVylEo3qWx/zuoKR7ixcF9U2VXXEr7PlUyDi6ah1Eataw1CxnAH ISdeDGGYnVZeVZbivh90PovNHWRbgiOyYMbB9NmVaCCRY0S5X1UGXhKH6wBciPUYzEzn WO2oL4VYKrrqAFDyS/n8/Jet51hQhZ6DL01+pCVNLUOcxgFZSTEoeWvW60YKxK+k+HjH l0okYN3faMwwlptj3xUR1UuTXs1EwBSOXydkFOhPw1NDw8uprbGCxIwg7hwVRLNjOC3D e1cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U40cbzs9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l11-20020a170903120b00b001c3b4cb8c88si5858367plh.338.2023.11.09.08.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 08:41:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U40cbzs9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 4F0C782A56A5; Thu, 9 Nov 2023 08:41:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344767AbjKIQj0 (ORCPT <rfc822;lhua1029@gmail.com> + 31 others); Thu, 9 Nov 2023 11:39:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343866AbjKIQiv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 11:38:51 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A794237; Thu, 9 Nov 2023 08:38:19 -0800 (PST) Received: from benjamin-XPS-13-9310.. (cola.collaboradmins.com [195.201.22.229]) (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 72BC966076B6; Thu, 9 Nov 2023 16:38:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1699547898; bh=icIEMzQ+RwB59Jl10kDC7CgLWypuqx+VfcABRr9QKPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U40cbzs9hNmHZkWxyQlsq/09wxgfgR/YTwDNOt+AgX02GYgF2NMwzxzYDQ15RZFfi YL5LqnoVzitubdhD8xWZVo6H3p1waYq2GTusxC+4b2kMX+4LmqNSJYuIjbPbfYuias hjLofx75zEoyYl00J2afyFnUUikv6wwSylZ+G/zCccmsda297EkgBL/5Fl/Wee4737 Ln/XlJY1YlNvy+fLvqtP005Qpvxegvfs6PGe4JPbRya2XL8VxtheUZNb8swA3XtoQv KAPgDbdshNYo8hFwOD8BnRQNIPx3hx6pT7w1rfMPCGj+1Ern9zeJ6p9OIR5TD69CDc 0rEqslto7iViA== From: Benjamin Gaignard <benjamin.gaignard@collabora.com> To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard <benjamin.gaignard@collabora.com>, Andrzej Pietrasiewicz <andrzej.p@collabora.com>, Joseph Liu <kwliu@nuvoton.com>, Marvin Lin <kflin@nuvoton.com> Subject: [PATCH v15 36/56] media: nuvoton: Stop direct calls to queue num_buffers field Date: Thu, 9 Nov 2023 17:34:52 +0100 Message-Id: <20231109163512.179524-37-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231109163512.179524-14-benjamin.gaignard@collabora.com> References: <20231109163512.179524-14-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 09 Nov 2023 08:41:09 -0800 (PST) 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 lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782105329030125409 X-GMAIL-MSGID: 1782105329030125409 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Nov. 9, 2023, 4:34 p.m. UTC
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> CC: Joseph Liu <kwliu@nuvoton.com> CC: Marvin Lin <kflin@nuvoton.com> --- drivers/media/platform/nuvoton/npcm-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c index b9e6782f59b4..f9b4e36a5175 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -393,7 +393,7 @@ static void npcm_video_free_diff_table(struct npcm_video *video) struct rect_list *tmp; unsigned int i; - for (i = 0; i < video->queue.num_buffers; i++) { + for (i = 0; i < vb2_get_num_buffers(&video->queue); i++) { head = &video->list[i]; list_for_each_safe(pos, nx, head) { tmp = list_entry(pos, struct rect_list, list);