Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3224438rdh; Mon, 27 Nov 2023 08:59:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGmu7YeZT7litfXmlu23twzTNDeMNwYMrHorfDx+fepmnnPLid838am5n8uksXBas8ZLN1 X-Received: by 2002:a05:6a20:7fa0:b0:187:449d:a4cd with SMTP id d32-20020a056a207fa000b00187449da4cdmr16519501pzj.27.1701104395032; Mon, 27 Nov 2023 08:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104395; cv=none; d=google.com; s=arc-20160816; b=pcG6sDnq6ADrMSw0a7lOEqpDLpnZpvVP1hjV/lNwUf6CLePEHilDgsHUNyrwbOwv7b joW1Ao1b9NmhSH6FDyWEcNNhOqw8tDRWHLY8wYpLT75VbjL9XCB19YRGg5YahOJ8xKuQ R6URdwUb6TRtZoBZrwZab9omKRMKbYom2qHd15SlvFI9/iiJDEwp1k4tVYslp30+G80z vBH8s8tMHjAFPSc7k6bIdOw6tVhZbUBJTgnpCGF4tpinypvBl7CRXHIoEhWO7qI0Scno HkiYL7rgHIuobRDb/HoOGQyeREE+wxoz+W74qqkVXrQgctpZ6U4gAnKJ9CV/m9XqkJos G41w== 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=6MA3XuoAbK1fFx1fIpuYlxk5KQcuLoSgERJxBhgki0Q=; fh=tcpY0snEudFdfBF84P+i33x62st2u4N2Rdd73EYhUeo=; b=pmwFJvqaI84ciB2rFaSBZceYY7y16M5wpQXFlh+m+p222jt2fk+kqz6PWw+Vfd5YWf wx60nheBSlgAgnho7zHn/w5y3mZWhahUrgdtjim/xno4D9Bh4SEHrUoV0mOwhAkfg+Zg jJVVdrV2holQfJb9C6QLujqxopecd3EyGQFi9yL5ZzKMJ3/NR/PtcZ/AJs2C/bGsaZIg TMF77nt3O0yX/ekf6S8ijzfYDEP44lFMMzOqJeb9+N3QuEwIykabgMJU52scwByWoDwv rlSEN6rQ9SFse/t85kbXX6DbSTrb+d5aIxm/AFWkIduOxrQ3FoCWtzsa3095yoiXwJ9p 6NuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MINNiUeo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g10-20020a056a0023ca00b00690f8063627si10369762pfc.38.2023.11.27.08.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:59:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MINNiUeo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id E88C380DD6A3; Mon, 27 Nov 2023 08:59:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234802AbjK0Q7e (ORCPT + 99 others); Mon, 27 Nov 2023 11:59:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234777AbjK0Q6d (ORCPT ); Mon, 27 Nov 2023 11:58:33 -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 5C2B430C7; Mon, 27 Nov 2023 08:55:49 -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 AA5E4660742B; Mon, 27 Nov 2023 16:55:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104147; bh=yC3FV0N0XOijdcBv3yWO8BmzCgseS3Y6Nq1H8uXjYec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MINNiUeoz/GUMUqWdqXdfQ65v0Ab6vh2Hp0YWf072N/P008c+syLugxYV7eNvXefT 18oTjv9H7wIv3zOWAGkBSiwmn1HFWBMl5HbDwqcX5zBCfUTqx+izbQab3L6f8vOAli MYW1XuK5bpjjK4wgGAO5lVPyoQY6iT2LkcBIAbRM0wmj7+MzZtZJ1yqF0F93nlGClx 9kX5ZUKfPeyvqmeqH5dftIOshujd1EFKrCs9p/V1lI95/hTIjrUNNNEcaaaDTsOW2W Nh45ooSVSyWMEPANbvxmdkzKT2WY6luoZSeZTu3CsqVl4yg7MS/VfVFqYTcIk9Mec6 0mOYES0sV/9IQ== 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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Greg Kroah-Hartman , linux-amlogic@lists.infradead.org Subject: [PATCH 54/55] media: meson: vdec: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:53 +0100 Message-Id: <20231127165454.166373-55-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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:59:52 -0800 (PST) vdec driver use a firmware and comments said that a minimum number of buffers need to be present before start streaming. That is 'min_dma_buffers_needed' purpose so use it instead of 'min_buffers_needed' field. Signed-off-by: Benjamin Gaignard CC: Neil Armstrong CC: Kevin Hilman CC: Jerome Brunet CC: Martin Blumenstingl CC: Greg Kroah-Hartman CC: linux-amlogic@lists.infradead.org --- drivers/staging/media/meson/vdec/vdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c index 1e2369f104c8..6c2e3e5c6e6f 100644 --- a/drivers/staging/media/meson/vdec/vdec.c +++ b/drivers/staging/media/meson/vdec/vdec.c @@ -184,7 +184,7 @@ static void process_num_buffers(struct vb2_queue *q, * we need all of them to be queued into the driver */ sess->num_dst_bufs = q_num_bufs + *num_buffers; - q->min_buffers_needed = max(fmt_out->min_buffers, sess->num_dst_bufs); + q->min_dma_buffers_needed = max(fmt_out->min_buffers, sess->num_dst_bufs); } static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers, @@ -825,7 +825,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->drv_priv = sess; src_vq->buf_struct_size = sizeof(struct dummy_buf); - src_vq->min_buffers_needed = 1; + src_vq->min_dma_buffers_needed = 1; src_vq->dev = sess->core->dev; src_vq->lock = &sess->lock; ret = vb2_queue_init(src_vq); @@ -839,7 +839,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->drv_priv = sess; dst_vq->buf_struct_size = sizeof(struct dummy_buf); - dst_vq->min_buffers_needed = 1; + dst_vq->min_dma_buffers_needed = 1; dst_vq->dev = sess->core->dev; dst_vq->lock = &sess->lock; return vb2_queue_init(dst_vq); -- 2.39.2