Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3222701rdh; Mon, 27 Nov 2023 08:57:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+pcrq8sXEDDa83C6z8iKmmkeTknPIwZINHEMuR07laVy/EtiNkY4cKvtoik298qK7mR8y X-Received: by 2002:a05:6a21:6da8:b0:17e:8dfa:f37f with SMTP id wl40-20020a056a216da800b0017e8dfaf37fmr21783395pzb.18.1701104236766; Mon, 27 Nov 2023 08:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104236; cv=none; d=google.com; s=arc-20160816; b=i5eL33D9JPPqRf1z+vQ3GkI8kPghBDh3diJDPavvBfu4kkRCjinVzO2SeJG3bEe4CQ 7pDz4P5+BWORKn3e44H/jLtHAXoNHD4lQXUsmHGTP2Ov9UPxMNb3nOh2bwmtOdkR2o2c jDsidDltZ3LDkGdGqAvhwp0o+kb1YBpoti6XhdUPe/V86RqNRt1qrYf4JIebGCKwHoHX YeYBiZT4efLphcOSjT7z64/9FNUt2h1P4AmSZFA/H5X+db5c88VnrUMgVBpj2a15UDqs O31msn6z+mf30yuTpsD20VZPtVDJU/9WjXiVC609KCApwo6OrjSrFfpXmm2bKIc4USng WXKw== 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=R7bdYxuHqrrYQldMBFTm0qNzsvoyKPpqKObAkfho0O4=; fh=H7hC7LKnmTWoFTtZMGJeAZcVR0zPF+9hBqhRytmaYvE=; b=JStMNjk1ZnhcBGXWGzKKz4UhxjBLkALVSxRatg9iNV/g55Qz+lHGk6UGo212TD0/Mt t27yUrPnsbjscb4ZHR/beHa1oYY4DGwZ/Y+WNzv3is3pF0mPlPS57TumKzJWUCoJ8PPD p8TNpcUe7xVwIrpsU8U+o077c14ukozO910+f9PsYiEWp8M76FI2BaO5NzazlagkidEO gDD1IW62s5fO5V8JRQ5Qz8XBgEJvVdGSqEZ7ebieSAeRA47wRjcqBW2UEo8ISI6JCahX 78e4BHXFW6N/QcMRFO/cN2sVrgKnU8Qr/XjRaUUmSB7/65SEfGkwXAiHpvnut3BDIIpK XqKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BP2Op9YS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id p1-20020a634f41000000b005b95ee3edc6si10149791pgl.628.2023.11.27.08.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:57:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BP2Op9YS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 34714805648D; Mon, 27 Nov 2023 08:57:15 -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 S234468AbjK0Q5C (ORCPT + 99 others); Mon, 27 Nov 2023 11:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234369AbjK0Qza (ORCPT ); Mon, 27 Nov 2023 11:55:30 -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 809D710FB; Mon, 27 Nov 2023 08:55:19 -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 7D8A1660734C; Mon, 27 Nov 2023 16:55:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104118; bh=8LPqvsmi32imvr5cq2qE0KlaUGmcLFqSO7T1NPpNe9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BP2Op9YS0D8zLzDXZkBB+NgHH/TGXZ9MorD82JkaLJ8ymyq/aAeU1PGiVadVfOBiA 1+WGnqLY2BHPT7t4KhKldiPUXMfophLaLmMPAChEVA/ei9A651k94l9phh08tA3SOh qAJxS/c3gArbOcmxMyTvvx1Obrx7zye7CwIqzmiYYEx26zMeywQWaDAhYb3C//Hn8C SuDCPunz4rsbACg5kCbGwGDKMBQftENynMkA8e+5hY35H0nLMy+chzScrgXvoZ38w6 p9Ayl4MAGbt6lN16Nvtgxxa+3Y9MWta+UDsJnpouNuY3QKxQ6aNf4qiHQRpMEV06G8 WTXTL8vHf24Dg== 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 , Stanimir Varbanov , Vikash Garodia , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org Subject: [PATCH 16/55] media: qcom: venus: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:15 +0100 Message-Id: <20231127165454.166373-17-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:57:15 -0800 (PST) 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. venus 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: Stanimir Varbanov (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER) CC: Vikash Garodia (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER) CC: "Bryan O'Donoghue" (reviewer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER) CC: Andy Gross (maintainer:ARM/QUALCOMM SUPPORT) CC: Bjorn Andersson (maintainer:ARM/QUALCOMM SUPPORT) CC: Konrad Dybcio (maintainer:ARM/QUALCOMM SUPPORT) CC: linux-arm-msm@vger.kernel.org --- drivers/media/platform/qcom/venus/vdec.c | 4 ++-- drivers/media/platform/qcom/venus/venc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index dbf305cec120..16b8d0dde10d 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1641,7 +1641,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->drv_priv = inst; src_vq->buf_struct_size = sizeof(struct venus_buffer); src_vq->allow_zero_bytesused = 1; - src_vq->min_buffers_needed = 0; + src_vq->min_reqbufs_allocation = 0; src_vq->dev = inst->core->dev; src_vq->lock = &inst->ctx_q_lock; ret = vb2_queue_init(src_vq); @@ -1656,7 +1656,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->drv_priv = inst; dst_vq->buf_struct_size = sizeof(struct venus_buffer); dst_vq->allow_zero_bytesused = 1; - dst_vq->min_buffers_needed = 0; + dst_vq->min_reqbufs_allocation = 0; dst_vq->dev = inst->core->dev; dst_vq->lock = &inst->ctx_q_lock; return vb2_queue_init(dst_vq); diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 44b13696cf82..e399d01c208c 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1398,7 +1398,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->drv_priv = inst; src_vq->buf_struct_size = sizeof(struct venus_buffer); src_vq->allow_zero_bytesused = 1; - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->dev = inst->core->dev; src_vq->lock = &inst->ctx_q_lock; if (inst->core->res->hfi_version == HFI_VERSION_1XX) @@ -1415,7 +1415,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->drv_priv = inst; dst_vq->buf_struct_size = sizeof(struct venus_buffer); dst_vq->allow_zero_bytesused = 1; - dst_vq->min_buffers_needed = 1; + dst_vq->min_reqbufs_allocation = 1; dst_vq->dev = inst->core->dev; dst_vq->lock = &inst->ctx_q_lock; return vb2_queue_init(dst_vq); -- 2.39.2