Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp184607lqb; Thu, 14 Mar 2024 08:33:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwJEFai3uBU8fYvYC2w4jaQl91Jtrr42+cAdgpmEXNXC5BDPJ/G4dcpRfDdD32Fm4WFg+hWhlMcfnMqKkXoT4GB4ZVFCLBk8ewFHChrg== X-Google-Smtp-Source: AGHT+IG3i/53lt3szxosJVPhDTqlbwh25t/GvlZNIQyIVYQlo5Z4XXa1nfY+L1kFgkPNHYXRh+Xw X-Received: by 2002:a17:906:680b:b0:a46:1cd4:cb49 with SMTP id k11-20020a170906680b00b00a461cd4cb49mr249841ejr.48.1710430395643; Thu, 14 Mar 2024 08:33:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710430395; cv=pass; d=google.com; s=arc-20160816; b=cIMcKLeWcee67WqwrjfYRXPDElubCf7IunsxjdexKaFLtgUgvdH6ePQuVMsiUHzKpG Glibnsu7j+DIgtAvUDd4Hg/l84vlEDQM9eaMLefMFybWlH13DrkqhsZz9Y6EtemAeeAk ts6ZCINFskXei7qLksWgkDfq2AGVKuVB+tEdtOPEFbNVGsz4oimsgsbDos9cmkGEAEz2 r6UBhZ+RnsZvmcuO47sdJehxzZLEZhDvjlYGuepolX+HwjhuI95/SxyTr32BiGJIiiUP AlwOcrYEW2UFJyE+/b17OBCnxE7QgQHNBzPgst7UDlar6QVNLkpfxhvM04AyJAQ8HnO3 Kfsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hU+42YMwPJJ0l/S2v/Ojw0WaAKKoj+rFoFJf35lO9RU=; fh=zOBpKhMTeRbrgfYir35sIvSkMQrxOs+orb+lNlEOd4k=; b=yAu02629oh+LKw4ZVlDaUEAJO6fTeCuMhkso5lyHDMm3YO9RTMUo2ri3HjJJaMov+b q8WCzAIzFfqzgpEREHQHRRzwdIKpFMpP09c3ZEbyTJl+Mv24/IZ7YXfT+iL/sHyitlAu zrX/dcLTvE+aXtbkgpyquEo3QfnS3LeksduuBdZBZxV2YfC5el+g5of/NpP87/f7X1FK XzBqRwPFiqryyqTYl/nDI11BqeMdj4nRfxiDBUP32b8IzIafWJGU/ZA9juU9FPXqSuyC C5LNjPai1tcsKiUuY+A88e1LqYcsqzP8goCM5L1YAlStfxxoxZD+EjNwbkxrN87Al51F Z69g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=skQ3eSMA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-103500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bw9-20020a170906c1c900b00a44a9139b09si831317ejb.299.2024.03.14.08.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 08:33:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=skQ3eSMA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-103500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 61A071F22B77 for ; Thu, 14 Mar 2024 15:33:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BC0173523; Thu, 14 Mar 2024 15:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="skQ3eSMA" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 009AE71B3D; Thu, 14 Mar 2024 15:32:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710430358; cv=none; b=JoTaZb751EYHCfgs9z96WRlRhLsKxF539Ql2Q23R7nCqXWDS4XChtAa6aYNf/V+Nh9Fv7Z2JyLhuSYzib0JsOGm7B4u6rGEIY328NP17LtzCDensnDtTir5cO/YvLJpDYkaNqt1eSUdv72r8bXKslkDOJltXUWu4B0NbCjqs7Xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710430358; c=relaxed/simple; bh=qivh6TydDKfcZbVPYc7spMw2cRqVCzEb9YVNhr43HUY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=liMxT0q8YIodmiyv96FtjsvAbDRNHjpFnRfzeREV8YS0b+vnC+UeolvOcMWGgQ8G/ZLU9zUZ38aFlXO6iia/t3cwawZcmh7Noj9FkJeURTu26x3TQBT7ZF+V/y4GpLtrzc74iCDHo9hFUlin86oTYeDN+HOWQjwSm4fxBXQQlfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=skQ3eSMA; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1710430355; bh=qivh6TydDKfcZbVPYc7spMw2cRqVCzEb9YVNhr43HUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=skQ3eSMAXzuXhHKCUz0EJJybjE9cehdLr00xV0RTimHvr10PXRK1D4ZWbNlaWilKV 9P1raRucv9swWQ9KoPju8oAPf/sAw4/9/bEQllpueFb58McYx8CgMjPUiJBJMJjmBp tYXGT4xi6JcGM/0lmwapjepEqOdgOihd0qGKMgnqtu01TMeJahhVXqEC+6/jNnE4Rv v2dtiG7N0786AElgrzhESIQ+ktAVVtfqX1J1wR8n5IMxsEB54Io/28vZWPU2qzoBwp zXZo1Ttpr7gFIB31az/955kYixHy9o/Kk6/bnV5Y3X0VMkgyTRUOWRcfD8bErcpw9k bw9x+OgOvq8/A== 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 madrid.collaboradmins.com (Postfix) with ESMTPSA id C613337820F8; Thu, 14 Mar 2024 15:32:34 +0000 (UTC) From: Benjamin Gaignard To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, hverkuil-cisco@xs4all.nl, nicolas@ndufresne.ca Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v21 3/9] media: test-drivers: Set REQBUFS minimum number of buffers Date: Thu, 14 Mar 2024 16:32:20 +0100 Message-Id: <20240314153226.197445-4-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240314153226.197445-1-benjamin.gaignard@collabora.com> References: <20240314153226.197445-1-benjamin.gaignard@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Instead of using 'min_queued_buffers' field to specify the minimum number of buffers to be allocated when calling REQBUF use 'min_reqbufs_allocation' field which is dedicated to this purpose. While at it rename vivid_create_queue() parameter. Signed-off-by: Benjamin Gaignard --- drivers/media/test-drivers/vimc/vimc-capture.c | 2 +- drivers/media/test-drivers/vivid/vivid-core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c index 2a2d19d23bab..97693561f1e4 100644 --- a/drivers/media/test-drivers/vimc/vimc-capture.c +++ b/drivers/media/test-drivers/vimc/vimc-capture.c @@ -432,7 +432,7 @@ static struct vimc_ent_device *vimc_capture_add(struct vimc_device *vimc, q->mem_ops = vimc_allocator == VIMC_ALLOCATOR_DMA_CONTIG ? &vb2_dma_contig_memops : &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_queued_buffers = 2; + q->min_reqbufs_allocation = 2; q->lock = &vcapture->lock; q->dev = v4l2_dev->dev; diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c index 159c72cbb5bf..11b8520d9f57 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.c +++ b/drivers/media/test-drivers/vivid/vivid-core.c @@ -861,7 +861,7 @@ static const struct media_device_ops vivid_media_ops = { static int vivid_create_queue(struct vivid_dev *dev, struct vb2_queue *q, u32 buf_type, - unsigned int min_queued_buffers, + unsigned int min_reqbufs_allocation, const struct vb2_ops *ops) { if (buf_type == V4L2_BUF_TYPE_VIDEO_CAPTURE && dev->multiplanar) @@ -898,7 +898,7 @@ static int vivid_create_queue(struct vivid_dev *dev, q->mem_ops = allocators[dev->inst] == 1 ? &vb2_dma_contig_memops : &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_queued_buffers = supports_requests[dev->inst] ? 0 : min_queued_buffers; + q->min_reqbufs_allocation = min_reqbufs_allocation; q->lock = &dev->mutex; q->dev = dev->v4l2_dev.dev; q->supports_requests = supports_requests[dev->inst]; -- 2.40.1