Message ID | 20231109163512.179524-28-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 q9csp559939vqs; Thu, 9 Nov 2023 08:40:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpMXu/3G7ZFhGYpYj9soj3eyg3sTKovtaGLHby8LWGoNn2CQGBAYggyQ+EWhFpoXJoqWtr X-Received: by 2002:a92:ca45:0:b0:359:cb8d:c761 with SMTP id q5-20020a92ca45000000b00359cb8dc761mr5751056ilo.30.1699548039939; Thu, 09 Nov 2023 08:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699548039; cv=none; d=google.com; s=arc-20160816; b=Yl0Sh5flOtGnoQ7VFCriCOLLnB6Qf9uEYLdrV+7DGcqBqdXWaGDrL0mfWCSd2Rf2QT tRotAK58x0jjOi/yjvMd2wfdaDabdpHOswPmmwLKzsi5ed1hKL7Nq9uSst7WSBdDDPRY 8ll9VR2bSvU16K0UftHjTj9DutM7m1zooX0p5Kzjwuc6CAYAwjp6Qp/Kr+4uVu2TzA+t SfnGZ7TJEFgtnNwQUzahu4dnoi38MeECO82c7qYTvkjLS61Wn0OC1GDMseLlLBUBvfNk 9rwAxSp/gNllVvyyo1zePW5XBTFV7f1aVfDyIF3SonxFURyrl+yOhKg90RzunQOn8ntp 5xug== 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=OtwFMtFsAJkcWS//8NxueCc5P90IFZi9cvXzmg1aF+E=; fh=t4h1l+tS8anPNnwyX0PglXAWKg/D9M9NAbc0AP3vdGI=; b=ArbOEPvSO6pFlx4OPTFj8DJg18+CBNHKLhRiNqeRA6WHjQT1mU09S6hTSFWToIcOLz H8n9f9dj3tipO5+zkh/jqPJ1adktq3qzupQH1GiG+PhGbMLci98YHLHnALqxWyuQ6pdX djrGnv61+kEBR2GCn8YbLGYjlaRKLTi7nP6i8kOvRrqW/4lkKel53fXxipWkbWSeQzi1 JDxSoP8umO0XLMEdOMRQAXCXF0xzDT49wHIWkdLGxBtsPvXZwHeYr2VmA65rl9AZ4ajp bgbnFKlgvVlE9ms5L55hreSM+tK6tY4oGgx+pNpQYdmdyv5/OPPL8oHIuHq29tfZGqFH wPog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YSvyJrJB; 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 g23-20020a632017000000b0056f8fdb4430si7370267pgg.893.2023.11.09.08.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 08:40:39 -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=YSvyJrJB; 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 4AC3082A569A; Thu, 9 Nov 2023 08:39:55 -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 S1344717AbjKIQit (ORCPT <rfc822;lhua1029@gmail.com> + 31 others); Thu, 9 Nov 2023 11:38:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344719AbjKIQiP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 11:38:15 -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 808663C02; Thu, 9 Nov 2023 08:38:03 -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 6464F66076A9; Thu, 9 Nov 2023 16:38:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1699547882; bh=PqahRgMbKZ6nKhhhFOL42EbYbzODXom24RYDHww9X2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YSvyJrJBvpacWgTAfqjHItn58l+/ToKTC+WxAq3tUbxdxiiRlSgH2QGm2POvbNWmy 9r56IyfTZD17giY+3NUnS37RF4JMF4lNxAWSSdPSnXv2zKQp0dqt9D6Es8vympuw3n xdju0f9Hk6MeJiSlbROvTmlbts4FfalqvHnH8NeBX4f+V2dbzWijNeHzCNx2ebixHJ kNbN2q3e85A6qTv/CYdUtisczI/fbHT5T8Khe4tOSYFPH2zxE8MKR/oIYGmZuhjtEp CLsVElm1xxlYiYxGVRyenhHd1Tn4jc2d+Fv1gkauUPFh+vPPzdCk7a5m+QK2AEa0ju 7UxAb9aoIUAng== 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> Subject: [PATCH v15 27/56] media: coda: Stop direct calls to queue num_buffers field Date: Thu, 9 Nov 2023 17:34:43 +0100 Message-Id: <20231109163512.179524-28-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:39:55 -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: 1782105285693217671 X-GMAIL-MSGID: 1782105285693217671 |
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: Philipp Zabel <p.zabel@pengutronix.de> --- drivers/media/platform/chips-media/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c index cc4892129aaf..f1d85758f6dd 100644 --- a/drivers/media/platform/chips-media/coda-common.c +++ b/drivers/media/platform/chips-media/coda-common.c @@ -794,7 +794,7 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f, if (vb2_is_busy(vq)) { v4l2_err(&ctx->dev->v4l2_dev, "%s: %s queue busy: %d\n", - __func__, v4l2_type_names[f->type], vq->num_buffers); + __func__, v4l2_type_names[f->type], vb2_get_num_buffers(vq)); return -EBUSY; }