From patchwork Mon Nov 27 16:54:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747981 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="mZH1E01j" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60DBE19D; Mon, 27 Nov 2023 08:55:07 -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 7F2CC66022D7; Mon, 27 Nov 2023 16:55:05 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104106; bh=7RGpb9eXUi6lQdxW/1vzQwvC1+GPAwIhQ8xVVzZPHxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZH1E01jZ/S5Hq899zWgoDmRG3t+rsfwswbnQ3j9cmRv8JM0v38MqPuPY5/2B40iD 1WRWKwwnTEOngzDCfrIk5/KqBhzjaIaXbQmp2tUux612pDmybPPKjAHh1mpC+j4eei cl+3OBHY/39B/Mde6CvN9xUD5YU+UPJn+COl/YdBjjnUX16/q+HSJLxS/ke7/2JawY BRb1K8WbapOpUdL5zN9Gbc+cZqKhHXu9b1TwtlKT7gAnr/Dhww53zxW8b64YXq16bE ARZQfGTzdGRO1ny4wbMK7kJRhXuvgz8C757X0smbHbyN9LedmbhV+rGFpzWjwr1k2r 6D2TV0Ov0syGA== 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 Subject: [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Date: Mon, 27 Nov 2023 17:54:00 +0100 Message-Id: <20231127165454.166373-2-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add 'min_reqbufs_allocation' field in vb2_queue structure so drivers can specificy the minimum number of buffers to allocate when calling VIDIOC_REQBUFS. Later that will help to distinguish the minimum number of buffers needed to start streaming versus the minimum allocation requirement. Signed-off-by: Benjamin Gaignard --- drivers/media/common/videobuf2/videobuf2-core.c | 1 + include/media/videobuf2-core.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index 8c1df829745b..c224d13b3105 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -866,6 +866,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, * Make sure the requested values and current defaults are sane. */ num_buffers = max_t(unsigned int, *count, q->min_buffers_needed); + num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation); num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers); memset(q->alloc_devs, 0, sizeof(q->alloc_devs)); /* diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 5557d78b6f20..17cacd696ab4 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -550,6 +550,9 @@ struct vb2_buf_ops { * @start_streaming can be called. Used when a DMA engine * cannot be started unless at least this number of buffers * have been queued into the driver. + * @min_reqbufs_allocation: the minimum number of buffers allocated when + * calling VIDIOC_REQBUFS. Used when drivers need a to + * specify a minimum buffers allocation before setup a queue. */ /* * Private elements (won't appear at the uAPI book): @@ -615,6 +618,7 @@ struct vb2_queue { u32 timestamp_flags; gfp_t gfp_flags; u32 min_buffers_needed; + u32 min_reqbufs_allocation; struct device *alloc_devs[VB2_MAX_PLANES]; From patchwork Mon Nov 27 16:54:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747980 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="DJ8DWfOA" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEDA1A7; Mon, 27 Nov 2023 08:55:08 -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 380146602F1C; Mon, 27 Nov 2023 16:55:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104106; bh=hMnzJg8JCOvJEFop4t5B+/fXIKwF/ZeHN2PahVubUo0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DJ8DWfOAk5ZVh/lWQNcvxt16s7JqWogG64T70sEsSIqXisXkPcvlUZAkjQ5VUJd4i g/Z5xBXkwIfF4RaswUK/Ms7ils5VoQA85dZ1nLrgLKDgnTRv8sWq7jlurIviWw4CAC x5O34NILjMdCFnuLMBU+AGZrEpyxoL6YB2j/6rQVfMNk9K4ai+6I75mvpYaTLzbh1m DnmQ2liuBcE6Uribks/5sdCzb+pB9bsL/WGU7nkR1RbKo+zex11ZFDAQtPI8W4NTxP ze2B8xXv7It9VlEdl0EvAr5+cSku9MDSL1tg1fU3jjIJIF+GxGs8tAxVDv0paCFzQe vAgIUsNUjvs3Q== 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 , Shuah Khan , Kieran Bingham Subject: [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:01 +0100 Message-Id: <20231127165454.166373-3-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. Obvious test-drivers don'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. While at it rename function parameter. Signed-off-by: Benjamin Gaignard CC: Shuah Khan CC: Kieran Bingham --- 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 aa944270e716..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_buffers_needed = 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 353f035fcd19..b4e888ac6016 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_buffers_needed, + 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_buffers_needed = supports_requests[dev->inst] ? 0 : min_buffers_needed; + q->min_reqbufs_allocation = supports_requests[dev->inst] ? 0 : min_reqbufs_allocation; q->lock = &dev->mutex; q->dev = dev->v4l2_dev.dev; q->supports_requests = supports_requests[dev->inst]; From patchwork Mon Nov 27 16:54:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747725 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="h6HUoXxA" 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 A81371B5; Mon, 27 Nov 2023 08:55:08 -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 0450966071A9; Mon, 27 Nov 2023 16:55:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104107; bh=RQZKjikW6Ece6fRgXGbXCqiDnEcXizem8w9dbLVAl84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h6HUoXxAS1RaL+324Vn+8xbiV+Lrc6tIB616nDIi1Bub1y5qVeNdc0RS27ndLvP4A pGhpZhy6/Fqzlu7mAHYip/0Uz6aOMChuuHMzQTnbNTI3yTuDV4KcuRWWgqcbovk4jD MgYnYbWeAeXOBIu4NSATm8wEf0IOdyfT8ltNcz8FrSOQl6x4bGrH5ouLTjHK0hlbIV yGZflYB0oOw2UXATQS6pPpRmIgWJx7Wf6WTNq+U+GsnwoC60DW780Xv6IUtdWHQSBc M9i7fZN1QAB/yAOzvw4dhleXlTfl3qdwkmEZmxgyfPgrsstKehbQnWGRS8NnXQ1q+t ZFsITfwPpSeDg== 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 Subject: [PATCH 03/55] media: usb: cx231xx: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:02 +0100 Message-Id: <20231127165454.166373-4-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. cx231xx 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 --- drivers/media/usb/cx231xx/cx231xx-417.c | 2 +- drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index 45973fe690b2..66043ed50c8e 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c @@ -1782,7 +1782,7 @@ int cx231xx_417_register(struct cx231xx *dev) q->ops = &cx231xx_video_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->lock = &dev->lock; err = vb2_queue_init(q); if (err) diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index c8eb4222319d..df572c466bfb 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -1811,7 +1811,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) q->ops = &cx231xx_video_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->lock = &dev->lock; ret = vb2_queue_init(q); if (ret) @@ -1871,7 +1871,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) q->ops = &cx231xx_vbi_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->lock = &dev->lock; ret = vb2_queue_init(q); if (ret) From patchwork Mon Nov 27 16:54:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747979 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="WBbok1Zw" 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 77E2D192; Mon, 27 Nov 2023 08:55:09 -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 AD80466071EF; Mon, 27 Nov 2023 16:55:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104108; bh=nXea1hVd1CLJC4QjmTPo1Qmgjq3TpB25wTNYX2076fw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WBbok1ZwVmzcYZ6qijikokOfeNVx1QY8q/v6QMqMKEShjboAWMnVi1KcNOilv/t8u ZGA/Y5dZbaa/+i79WxGiAt2wbRQE6bOJvd0ao1gRx7SIQ1BDzCgi61+Ctc132LkxBk OsX5mifJ6HyfdcolBMSvdvawfw5+tN1BzsTKRNbodDmZd0wXooyb0bqBoq8fYyPmdC Q6O+EvfitG568RQT8EMQzzcm9kKBH2w7MJMt6RXJtUnosr5XO0wqZfo4ikFJgTmytD QaRkTe6R11Hb8saK91cMDMCEr55N+m3J0afxeTkWn2hIx05xBMfQhubNP2c+qySLux WxX7gsXCjBTLQ== 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 , Michael Krufky Subject: [PATCH 04/55] media: usb: dvb-usb: cxusb-analog: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:03 +0100 Message-Id: <20231127165454.166373-5-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. cxusb-analog 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: Michael Krufky --- drivers/media/usb/dvb-usb/cxusb-analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/cxusb-analog.c b/drivers/media/usb/dvb-usb/cxusb-analog.c index deba5224cb8d..a038d97dd62e 100644 --- a/drivers/media/usb/dvb-usb/cxusb-analog.c +++ b/drivers/media/usb/dvb-usb/cxusb-analog.c @@ -1632,7 +1632,7 @@ static int cxusb_medion_register_analog_video(struct dvb_usb_device *dvbdev) cxdev->videoqueue.buf_struct_size = sizeof(struct cxusb_medion_vbuffer); cxdev->videoqueue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - cxdev->videoqueue.min_buffers_needed = 6; + cxdev->videoqueue.min_reqbufs_allocation = 6; cxdev->videoqueue.lock = &cxdev->dev_lock; ret = vb2_queue_init(&cxdev->videoqueue); From patchwork Mon Nov 27 16:54:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747724 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="D7tOhGoZ" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1688819B; Mon, 27 Nov 2023 08:55:10 -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 6F1FE6607286; Mon, 27 Nov 2023 16:55:08 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104109; bh=cSCDQ8wlrHHxZIMdX6yERM4DP0+7F96unl/YfCpM+80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7tOhGoZPJaPsvWVJ8Atsd6mk6513xTTrg+4o38gsdrIl/awNv66gZx6u/lM7Mor5 oAj/uQLEdUP+btCuLOhWctSfo4Sgf3d3ylSPAPamYDjXGJYmxEiHmEKGI/5s66uG6C /ABdvLoH/nQunEo7/CoO0uArFNtKbtrPp4a0gRCYvXLeecADD5YVEE3VQ91CJ4Mnlo BX4UukdWNVV9zhGeqnuITExTYnjqBTnb7FuhrHLogkE/DTzdcd+P1zvysRrFq4UlrZ 0wxqEn63/UXygAX7ShNebkQyb1AtQRkzF4gajpJVeK5p24u3aeZHOka7GFPWY412DV rUFsMOW1ruqLA== 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 Subject: [PATCH 05/55] media: usb: gspca: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:04 +0100 Message-Id: <20231127165454.166373-6-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. gspca 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 --- drivers/media/usb/gspca/gspca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 770714c34295..7b701275f76d 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -1257,7 +1257,7 @@ static int vidioc_g_parm(struct file *filp, void *priv, { struct gspca_dev *gspca_dev = video_drvdata(filp); - parm->parm.capture.readbuffers = gspca_dev->queue.min_buffers_needed; + parm->parm.capture.readbuffers = gspca_dev->queue.min_reqbufs_allocation; if (!gspca_dev->sd_desc->get_streamparm) return 0; @@ -1273,7 +1273,7 @@ static int vidioc_s_parm(struct file *filp, void *priv, { struct gspca_dev *gspca_dev = video_drvdata(filp); - parm->parm.capture.readbuffers = gspca_dev->queue.min_buffers_needed; + parm->parm.capture.readbuffers = gspca_dev->queue.min_reqbufs_allocation; if (!gspca_dev->sd_desc->set_streamparm) { parm->parm.capture.capability = 0; @@ -1517,7 +1517,7 @@ int gspca_dev_probe2(struct usb_interface *intf, q->ops = &gspca_qops; q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_reqbufs_allocation = 2; q->lock = &gspca_dev->usb_lock; ret = vb2_queue_init(q); if (ret) From patchwork Mon Nov 27 16:54:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747723 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Vpjk+xeW" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6FA6198; Mon, 27 Nov 2023 08:55:10 -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 237A166072A7; Mon, 27 Nov 2023 16:55:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104109; bh=CXOqINnxnCzQ6XOL+VA2AacFLu6JKWe+Zb7RZAzp+MY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vpjk+xeWjjWP+R3N2SKM7woEQxBddVhXmlMwS3d0XkmMR9tHChI6HMPtT76eZVEGq KJjCRoykTj4IatyWsm9Z9aUQE4UWPj2h8ain2VdzOA7oHZMmej8UFS0YQuBTSvNial 2YdTFMo+0i2XSDZeogZXKs9/sVscCNm4SEmrQgNui+yp3QTAgFroSE73sHIg1TKVf/ NOzPbr8by7halFECH/emHR+T8pNaqeXCWfxrxXrlS3RPnPfAqHmv1vBUNl9VCrDXXV Vr1LE52EG94i4bmz9DywsOdMD45T5Sb53ELbT7JavhlUajhQimVCpnVLEkgfM5jLOr UjnbE5+ZuJxjg== 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 , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 06/55] media: atmel: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:05 +0100 Message-Id: <20231127165454.166373-7-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. atmel-isi 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: Eugen Hristev CC: Mauro Carvalho Chehab CC: Nicolas Ferre CC: Alexandre Belloni CC: Claudiu Beznea --- drivers/media/platform/atmel/atmel-isi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c index da58f33b6b0a..9c156771568a 100644 --- a/drivers/media/platform/atmel/atmel-isi.c +++ b/drivers/media/platform/atmel/atmel-isi.c @@ -1244,7 +1244,7 @@ static int atmel_isi_probe(struct platform_device *pdev) q->ops = &isi_video_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_reqbufs_allocation = 2; q->dev = &pdev->dev; ret = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747978 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="okc0FZ7T" 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 E6ADD1BB; Mon, 27 Nov 2023 08:55:11 -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 0396866072C1; Mon, 27 Nov 2023 16:55:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104110; bh=fG8KYI7BVcY4T+xVPe1Um4HGw++yjE8jKZBIAJBoZlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=okc0FZ7TcnIOKXeJLnL2uTUwCwKyTO6cS1aLjFdac1E4ZKrZwt3bTF/ighydvER8N ADY4RmMXQ8JqgohutdfrYL3oh7WEZuyVPzqQ1Q81My7g/TG3K0vB50IudIAJ/mEPeH dguTHusau2bnbf3UU85pnxkZanK+mhfD1IOHHtUENOzPfedaPJ4Y8bU5WzRgc3V12L yWAiBVsKZGBIMfTw+j3EUIwco2urZjuTWOty9AbSJx7iKfO3u9HRGRe8EP6f8CKNBc LwL/pozPg1KZV+PzopLCbBaOWH3Da9+PcPNcltYbTI4zvCpBPYhze/yyx0FB7yaCjK 1PykHWF9j1vfQ== 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 , Laurent Pinchart , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:06 +0100 Message-Id: <20231127165454.166373-8-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. imx8-isi 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: Laurent Pinchart CC: Mauro Carvalho Chehab CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c index 49bca2b01cc6..81673ff9084b 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe, q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct mxc_isi_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_reqbufs_allocation = 2; q->lock = &video->lock; q->dev = pipe->isi->dev; From patchwork Mon Nov 27 16:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747722 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="UyygRunY" 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 F313919B; Mon, 27 Nov 2023 08:55:12 -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 E9E7766072EC; Mon, 27 Nov 2023 16:55:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104111; bh=/omb2mE5oy70HH/kBxdqmwaLlWf6cHg+GYUl9K/Xqzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UyygRunYjRkADBLKm+WPF/uWjoPZcVap4oKYXcLdaRC88jMZmnDU+EfLGW7qTd5PE ymFjgeVJlgGiAt59YziOGCV821Io/7/yu4OJGU1nOEfM1ZSR6lPcRQrZBofG0xAPNR RloGvqNXRoGjpoYltJJjTGRAtwvYlE4QxeV4LuBYrfuZHzyrx0tFB8qlLsHOK/zfx4 4eWJByOcHtfS4j3e8OgsW2eHI/aeJMJG0wyasx+YcTt6eH2+YE3xejO5KPWkBBj2tX bxwCjvK2sJrjCcZg+0TxE8KqYmnHZwT+1oYFYFL3zb+V2DKWurp/PSI1g3bZVRB4wF ww/bxPqt7IzEQ== 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 , Rui Miguel Silva , Laurent Pinchart , Martin Kepplinger , Purism Kernel Team , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH 08/55] media: imx7-media-csi: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:07 +0100 Message-Id: <20231127165454.166373-9-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. imx7-media-csi 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: Rui Miguel Silva CC: Laurent Pinchart CC: Martin Kepplinger CC: Purism Kernel Team CC: Mauro Carvalho Chehab CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- drivers/media/platform/nxp/imx7-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 1d2464ca59b8..dcc8c54228e4 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1676,7 +1676,7 @@ static int imx7_csi_video_init(struct imx7_csi *csi) vq->mem_ops = &vb2_dma_contig_memops; vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; vq->lock = &csi->vdev_mutex; - vq->min_buffers_needed = 2; + vq->min_reqbufs_allocation = 2; vq->dev = csi->dev; ret = vb2_queue_init(vq); From patchwork Mon Nov 27 16:54:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747977 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Lqhg8KZo" 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 B0F7719D; Mon, 27 Nov 2023 08:55:13 -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 060E66607314; Mon, 27 Nov 2023 16:55:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104112; bh=bIx0yhKI+ScDV20M08uZHnsyThCdjj2x5yD228Iuuco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lqhg8KZokYkmmqeIECo9Ws1F/frc0ZzueihVGe0Indtr4/7hIh4Tu0gb+qxYqWhQo qntkHXlnmpN8OSJSXBXyk1gDKVE2yDegPQuhNR/1Nd1yCmJte94yWf74OKzvXoNfNb nTRbBSZ7zJ1PpL+90aSl3GwfrtEUQ1Mh+t5n8bdAFqmOGPQ4p2jnUsIyUCLxah2KQ3 ywygheN76NPjONpYpI5d+OgDzuMmigh6vPV6ZpY6g5uYJhFLKVyKLeKi3tvxuicqOs GL9HQOX9fgqOqWE6TEmn799ggdtawQWQkrxUYTDU5cGeJi3MBteQf9Owr6Ancu2+vu XgFhrD89nI40w== 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 , Philipp Zabel Subject: [PATCH 09/55] media: chips-media: coda: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:08 +0100 Message-Id: <20231127165454.166373-10-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. code 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: Philipp Zabel --- drivers/media/platform/chips-media/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c index f1d85758f6dd..2b535a31e017 100644 --- a/drivers/media/platform/chips-media/coda/coda-common.c +++ b/drivers/media/platform/chips-media/coda/coda-common.c @@ -2546,7 +2546,7 @@ static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq) * would need to be reflected in job_ready(). Currently we expect all * queues to have at least one buffer queued. */ - vq->min_buffers_needed = 1; + vq->min_reqbufs_allocation = 1; vq->dev = ctx->dev->dev; return vb2_queue_init(vq); From patchwork Mon Nov 27 16:54:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747721 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ahoEW6BE" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FCE4D41; Mon, 27 Nov 2023 08:55:14 -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 B752566072B4; Mon, 27 Nov 2023 16:55:12 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104113; bh=ayBhyvSUe+u4AtwC/rm89lTriRSE3ewHkfysyr3gsEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ahoEW6BEFCLYt8ukZWa9VOHDQ1+NdpPPSgLK/sNTfG2PMP2G6oYMPBqKgQF+emRS5 GQz5tkAX7r0tWaK9EFKT0dulFvaBrfAivz2AArXK6KnOYQ9TIC2l/Rz5pYtuYULIDi dTyOz9lX6ZJOQLNtvEdtnjAnm57y/J8N+W5kGGZRGAoq6KIMxbAipc8cW0UVMQF49g InY0zhL9GBg2M23GKowCPIUkCVUCLAvZW8G351rowpgw17YEnCQt1PBGYf2Jlg78/V vN8+WHGycSA/NUCvj/mBuLNCSe4h7+4d8ZyhXnxOhqHTVvJlZ935py1NV8Z+cxg0ap N2HnPImvB+bGA== 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 , Joseph Liu , Marvin Lin , openbmc@lists.ozlabs.org Subject: [PATCH 10/55] media: nuvoton: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:09 +0100 Message-Id: <20231127165454.166373-11-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. nuvoton 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: Joseph Liu CC: Marvin Lin CC: openbmc@lists.ozlabs.org --- 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 267e301f2b26..6c122508be1d 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1612,7 +1612,7 @@ static int npcm_video_setup_video(struct npcm_video *video) vbq->drv_priv = video; vbq->buf_struct_size = sizeof(struct npcm_video_buffer); vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vbq->min_buffers_needed = 3; + vbq->min_reqbufs_allocation = 3; rc = vb2_queue_init(vbq); if (rc) { From patchwork Mon Nov 27 16:54:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747720 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="EJ2rDmOH" 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 5CB93D5B; Mon, 27 Nov 2023 08:55:15 -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 8AD836607323; Mon, 27 Nov 2023 16:55:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104114; bh=q+PBOieh7TUOZfOTD/eax3kPGizf1naDWVCgdVzk/Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EJ2rDmOHuYC+RuIZhYXo8DzC0Rkky/qSkpSFNsGMMVKLXohgncgJ1VcjJ74ikJGtf pY+o9OAvZ02fx9XYYChpfQcBnLpuhwM0fXK8/MYElMkedofzaOuGcYCgGIGgD9L3/t Qfqaciz57Axsq9LOu5/sBoxUQbbYMlFof/CVjj1OHKZnXjIhLO2lhxnpDDLE9KhY1q rCMIlMoSpiJy5nHB+B5Qpfv51KH3hA8Y28gS7RQFBGvGvtaHEvY8HKUFMR2m21KaLd qDYw4OTcBnjIUkRd6LlPfmV7RjT1KDoCeaKCHbUzFubxnZFKp5UK+/Ug0zAxL588t3 o9asdDeXrRa9A== 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 , Jean-Christophe Trotin Subject: [PATCH 11/55] media: sti: hva: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:10 +0100 Message-Id: <20231127165454.166373-12-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. hva 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: Jean-Christophe Trotin --- drivers/media/platform/st/sti/hva/hva-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/st/sti/hva/hva-v4l2.c b/drivers/media/platform/st/sti/hva/hva-v4l2.c index cfe83e9dc01b..d7bc25b0d69e 100644 --- a/drivers/media/platform/st/sti/hva/hva-v4l2.c +++ b/drivers/media/platform/st/sti/hva/hva-v4l2.c @@ -1142,7 +1142,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; src_vq->buf_struct_size = sizeof(struct hva_frame); - src_vq->min_buffers_needed = MIN_FRAMES; + src_vq->min_reqbufs_allocation = MIN_FRAMES; src_vq->dev = ctx->hva_dev->dev; ret = queue_init(ctx, src_vq); @@ -1151,7 +1151,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; dst_vq->buf_struct_size = sizeof(struct hva_stream); - dst_vq->min_buffers_needed = MIN_STREAMS; + dst_vq->min_reqbufs_allocation = MIN_STREAMS; dst_vq->dev = ctx->hva_dev->dev; return queue_init(ctx, dst_vq); From patchwork Mon Nov 27 16:54:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747976 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Err5SscR" 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 40433D62; Mon, 27 Nov 2023 08:55:16 -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 4ABBA66072A4; Mon, 27 Nov 2023 16:55:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104114; bh=TyWnSNSrmM8e46vPb9QIHFcmc4e6SFgOyK7FFQxtbXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Err5SscROifk648ZJExh4TQcnejZoFk5VctUstRXFW7HD/aTCrbJQJX8ZSLDvvyRL MQLLvghzMeFsGURIpqImWeUvuqVd/eyR8Azsb4eHTgSWBKOUcyPuPWfFnhvWe/zshf a0DtV3EBKK37x+NgmCtrbbdsIevIEP65WtQyWnxpmnRZq9ZlZ3eemnDf+sWtBRIyCa rttpbZsQHyXxXKX2GYv69QEk3eyMnHYeAYyQp/VaT1vJJpl0TRoFihbCrCg1NzoNao rFxqDtpQmDWOg0mLYj8078e7FMg89rwT+n01VTwqP2Jy1V9cqPCCXEK006LM0k7fZN 5qi/QTyW5oC8w== 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 , Dafna Hirschfeld , Laurent Pinchart , linux-rockchip@lists.infradead.org Subject: [PATCH 12/55] media: rockchip: rkisp1: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:11 +0100 Message-Id: <20231127165454.166373-13-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. rkisp1 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: Dafna Hirschfeld (maintainer:ROCKCHIP ISP V1 DRIVER) CC: Laurent Pinchart (maintainer:ROCKCHIP ISP V1 DRIVER) CC: linux-rockchip@lists.infradead.org (open list:ROCKCHIP ISP V1 DRIVER) --- drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c index c6d7e01c8949..de3d89b1fac7 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c @@ -1431,7 +1431,7 @@ static int rkisp1_register_capture(struct rkisp1_capture *cap) q->ops = &rkisp1_vb2_ops; q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct rkisp1_buffer); - q->min_buffers_needed = RKISP1_MIN_BUFFERS_NEEDED; + q->min_reqbufs_allocation = RKISP1_MIN_BUFFERS_NEEDED; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &node->vlock; q->dev = cap->rkisp1->dev; From patchwork Mon Nov 27 16:54:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747975 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aK5Jnza1" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1975610C3; Mon, 27 Nov 2023 08:55:17 -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 1F6F46602F16; Mon, 27 Nov 2023 16:55:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104115; bh=aaWCiqdk39sHKKb5QCMsk+ktnGuP0FZaTGK54tWrHxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aK5Jnza1wx5sBNowajBeB5DX02ljyxjC4c27B+SImhywaxDxh9iCWLMyGA6/UTFrH HBZ4/iQONttHOownb4AKM+IHPs/4xfuQxikg3zgIwYVlxg04TAra+pMkvVpzbKpNWR iqxH2MQ7+vOr67hiT9DknWQebgDsWq6NEk9vRDN4zSygZkXgQThE1ES8F32RI4TScb 4NiwI1BHAodRWKJmi8XWytuFZ6QVBJUsYU64tamXX/goCVjX19CYKQGlXiav+HheR0 MxlIiIo1fwqnPjis8aD9W9KSfAUC8QxT+f4twZUoucK4OU9AzD2xVEQCvwk62b4+8A b7e83ngdHNcvg== 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 , Eddie James , Joel Stanley , Andrew Jeffery , openbmc@lists.ozlabs.org, linux-aspeed@lists.ozlabs.org Subject: [PATCH 13/55] media: aspeed: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:12 +0100 Message-Id: <20231127165454.166373-14-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. aspeed 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: Eddie James (maintainer:ASPEED VIDEO ENGINE DRIVER) CC: Joel Stanley (supporter:ARM/ASPEED MACHINE SUPPORT) CC: Andrew Jeffery (reviewer:ARM/ASPEED MACHINE SUPPORT) CC: openbmc@lists.ozlabs.org (moderated list:ASPEED VIDEO ENGINE DRIVER) CC: linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT) --- drivers/media/platform/aspeed/aspeed-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c index d08aa7f73d4f..c28b10808cda 100644 --- a/drivers/media/platform/aspeed/aspeed-video.c +++ b/drivers/media/platform/aspeed/aspeed-video.c @@ -2034,7 +2034,7 @@ static int aspeed_video_setup_video(struct aspeed_video *video) vbq->drv_priv = video; vbq->buf_struct_size = sizeof(struct aspeed_video_buffer); vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vbq->min_buffers_needed = ASPEED_VIDEO_V4L2_MIN_BUF_REQ; + vbq->min_reqbufs_allocation = ASPEED_VIDEO_V4L2_MIN_BUF_REQ; rc = vb2_queue_init(vbq); if (rc) { From patchwork Mon Nov 27 16:54:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747719 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="b8B91Hpy" 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 BD99A10CB; Mon, 27 Nov 2023 08:55:17 -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 0568C66022D7; Mon, 27 Nov 2023 16:55:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104116; bh=0IW6KaZQ66ctszxERd9LJZiesOlWHkv1oaN5vdBxTOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b8B91HpyP1Sf3w26/2U8ec9vYjPCdDWxjffLbFaIVAf32m07JWcjIgLw5l3GAN7zo dP6Tb/ovpk5XARCckipAA4Kq1UAslwqwcatQs8OsqO1RRZGaLMtjtO6ivnn4lVEZXg i6zDH8ehUe5HYPKQO7UVM78gtz9SE7IelAHYX5xM81s2CeV/KKghxucusWIH1VoW1x fW3Q14aGoqr1bj5JRO1WL75XK2MBkQ0qZxCPVXSd/tPpxa5jmYj7C8INRJn6KPJ8/y J5pj6QCauCj68sOV9mhlXmlnst2Q01bVkOCxkTj1nMdoc3GTnUo8j6oD+U0TAu2osD pATGmFRvNPJog== 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 , Eugen Hristev Subject: [PATCH 14/55] media: microchip: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:13 +0100 Message-Id: <20231127165454.166373-15-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. microchip 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: Eugen Hristev --- drivers/media/platform/microchip/microchip-isc-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c index 3fba0e2844b6..9bed33aaf36f 100644 --- a/drivers/media/platform/microchip/microchip-isc-base.c +++ b/drivers/media/platform/microchip/microchip-isc-base.c @@ -1821,7 +1821,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier) q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &isc->lock; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->dev = isc->dev; ret = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747974 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="jwt0rlRF" 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 76868D6D; Mon, 27 Nov 2023 08:55:18 -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 B5A7B6607285; Mon, 27 Nov 2023 16:55:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104117; bh=OM1rMpAHnewxMwYLehpH3RhyuQD/KBKxUNIY9psBF1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jwt0rlRF5iVZMWkF95dc1OcXj7QgqBO+VsnS6mYiSFfym4uFTTI8NqV4IKo9OAOi2 BgLUy2d833QU1yJIuPlXwlS4MBFA0HY55MFYS6lgkk3bHxkhwEx+xErqkm4ur/A1lQ ZQFyRw31dlwXCcpKi+xdvQu3FQ1q7jvp75h4mNw1JddQy/KM4X0qyiRy6krj/vCFiz qV+PnfSpf2z4ZGk2VYpG3gfqTTPxvbLCmsOlvjdqs+HmfiFd2UdukfBxHHAusTxRxt fC/ha/eaO4+z4Xh8XOtXPNbX9co2oTScIZl2imvhFlFYOZapLYuvQovGEXbJeQTMVC ria//pNugEYag== 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 , Ming Qian , Zhou Peng Subject: [PATCH 15/55] media: amphion: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:14 +0100 Message-Id: <20231127165454.166373-16-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. amphion 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: Ming Qian CC: Zhou Peng --- drivers/media/platform/amphion/vpu_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c index 87afb4a18d5d..1e4c76032d2b 100644 --- a/drivers/media/platform/amphion/vpu_v4l2.c +++ b/drivers/media/platform/amphion/vpu_v4l2.c @@ -649,7 +649,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q src_vq->mem_ops = &vb2_vmalloc_memops; src_vq->drv_priv = inst; src_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer); - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->dev = inst->vpu->dev; src_vq->lock = &inst->lock; ret = vb2_queue_init(src_vq); @@ -666,7 +666,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q dst_vq->mem_ops = &vb2_vmalloc_memops; dst_vq->drv_priv = inst; dst_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer); - dst_vq->min_buffers_needed = 1; + dst_vq->min_reqbufs_allocation = 1; dst_vq->dev = inst->vpu->dev; dst_vq->lock = &inst->lock; ret = vb2_queue_init(dst_vq); From patchwork Mon Nov 27 16:54:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747718 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="BP2Op9YS" 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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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); From patchwork Mon Nov 27 16:54:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747973 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="BCsEkgRk" 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 D3E9519A4; Mon, 27 Nov 2023 08:55:20 -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 7184C6607295; Mon, 27 Nov 2023 16:55:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104119; bh=nJOkOwWG7HAPg6iANkaE4/DJj5MpFIvKCNqxFpSa5Zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BCsEkgRkF4I9+jKVaLVK/3afs96G/4+2+vyjv9QCBgA8jFRYWCAajIW3xxZETRBo9 tgAXP7TuMlICwajFzuuxxPjlfd1iWnVacLHUsfH1f/waR8rkWqVUnyNRRUgsMur1u9 cYcusOnwHTTJnAtWClQFvLYMcs4rCCIxFcdbouVKijEy1uCVut+hPm5bfhq/WaeXd6 jiMtIsdu/kerhiVahdK02NKYg3C4/SN5aTxb6KWs9ODpChLU/SZdSImNgujMG82jjh gr5cqbYm8yNCICgMFsvZsPuA5ulTFb5mNFRjUHiXl+vpvvagIntfjcxN+TRu6S3Hzd nnNt7JCp1E3dA== 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 , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Subject: [PATCH 17/55] media: sun4i-csi: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:16 +0100 Message-Id: <20231127165454.166373-18-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun4i-csi 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: Chen-Yu Tsai CC: Jernej Skrabec CC: Samuel Holland --- drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c index 95b5633b7914..8f071cba2d25 100644 --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c @@ -411,7 +411,7 @@ int sun4i_csi_dma_register(struct sun4i_csi *csi, int irq) for (i = 0; i < CSI_MAX_BUFFER; i++) csi->current_buf[i] = NULL; - q->min_buffers_needed = 3; + q->min_reqbufs_allocation = 3; q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; q->io_modes = VB2_MMAP | VB2_DMABUF; q->lock = &csi->lock; From patchwork Mon Nov 27 16:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747972 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="JVjLCLb0" 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 2967319AA; Mon, 27 Nov 2023 08:55:21 -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 43B9A66072E7; Mon, 27 Nov 2023 16:55:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104119; bh=afrMqjrALFOXIhCz1raNZ7/QwbGBSwKlzOWAk681eQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVjLCLb0nBrqf5glep/h0Gt7uYvwjMeFCskphJUITTXCYwGL9BJgBStqLGhM40DBN bJ46yJCcPRrBnrXHH24IZcU0XoMmgldhzmsLSFvW89QCcdhJFlJdozppNr9xFZ2XDg 0OoqOroKpaAndWzVFd9lSZ4d3csC8eagUTBnDIq57bZ6B4Qre+pvm/qGMbkvz9eUro /8ZhwaeVIqD2MBqMq3WFUb5inmNy/Rz9yg+0UI4vMwYd7uRfW/qzV6N3EkEur50PsW tYZ2IQZ6KWjSX7mnsw2HQGww2zq8drPlRitnQWvze6CcSOCllSJjE9E+8b2AWMgnsB iFA/1RJFRAPrw== 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 , Chen-Yu Tsai , Samuel Holland Subject: [PATCH 18/55] media: sunxi: sun8i-di: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:17 +0100 Message-Id: <20231127165454.166373-19-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun8i-di 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: Chen-Yu Tsai CC: Samuel Holland --- drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index 90ab1d77b6a5..d0f4f1f98bf0 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -673,7 +673,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->io_modes = VB2_MMAP | VB2_DMABUF; src_vq->drv_priv = ctx; src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->ops = &deinterlace_qops; src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; @@ -688,7 +688,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; dst_vq->drv_priv = ctx; dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - dst_vq->min_buffers_needed = 2; + dst_vq->min_reqbufs_allocation = 2; dst_vq->ops = &deinterlace_qops; dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; From patchwork Mon Nov 27 16:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747717 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XBGt7xdM" 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 EED6619B3; Mon, 27 Nov 2023 08:55:21 -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 0D86466072C1; Mon, 27 Nov 2023 16:55:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104120; bh=QToV8lElzrqp6zWG2/Ij9Fy7YYCaGPBAPbmtKiSOV+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBGt7xdMVEDvZuVk9Ad14jb83KoEdPpGetmdJSap2lBA2z5MJ403Xorerc4Bnbt1J fMUQrg/YddUn0oxlaDoWJ8uL25YiWdqYKXzah8zc76vIuqATvru2IgmKIz3v4O/GE8 md/ixY3FvptKrTjOwT0L6St5UlZvDV4DWTKm6ZOPPpwrEprsmKVRAnQBjz4wtiaNSp U1QUNctewxrMvCLj7IzvCbP3+xTxNvobqU3TZAnO9VZr5HD77oypyU6GEzcibztO5b p4Cat7dlxH/Sx+i9JGbFd3+rIlZJTGjE8ouelk/vcaO0fw0hSNhicljgodjU1Bw+x5 uBbSq6hrdGDEw== 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 , Chen-Yu Tsai , Samuel Holland Subject: [PATCH 19/55] media: sun8i-rotate: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:18 +0100 Message-Id: <20231127165454.166373-20-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun8i-rotate 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: Chen-Yu Tsai CC: Samuel Holland --- drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c index 0b025ec91826..14cd0afd7c6a 100644 --- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c +++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c @@ -536,7 +536,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->io_modes = VB2_MMAP | VB2_DMABUF; src_vq->drv_priv = ctx; src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->ops = &rotate_qops; src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; @@ -551,7 +551,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; dst_vq->drv_priv = ctx; dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - dst_vq->min_buffers_needed = 2; + dst_vq->min_reqbufs_allocation = 2; dst_vq->ops = &rotate_qops; dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; From patchwork Mon Nov 27 16:54:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747716 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="QmkVCU/m" 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 E358D1BC0; Mon, 27 Nov 2023 08:55:22 -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 C8BB06607314; Mon, 27 Nov 2023 16:55:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104121; bh=Gl50yamOqxp5F3J61bdrX38ELoxqbgPRLIk274ynKbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QmkVCU/mNHbH08K2PA2jaI2xpeSxJuOOVrVYa9HY95R21gu5GweBdW7pOdRQcH8sw 97ZkaSuMlYvGcvZWaIfkrUeK33oPvy53N5merp83DLt/CUymdW3Sdv986VTvkfckbY BvQudmhzSKODBZ5dyEb6bSpshQR6PoiBmaQ6biGTlhD3/RgJK9mtSDxhHZ6CRWC5PU b9oleh9GiLzNgSFmVOKJ9Nj3xyRbK0toNby8SYUtxVwn9+gx8kpTovWdSkHXfcOf36 aKWhVZHgm9eW7jxcvb8bZMqte8r+rePL7h6ZehDPaKj80A6YWzn7oAUah6WqqOhnNc 5tseHh0k29+8Q== 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 , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Subject: [PATCH 20/55] media: sunxi: sun6i-csi: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:19 +0100 Message-Id: <20231127165454.166373-21-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun6i-csi 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: Chen-Yu Tsai CC: Jernej Skrabec CC: Samuel Holland --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index cf6aadbc130b..73e721936d27 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c @@ -1010,7 +1010,7 @@ int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev) queue->buf_struct_size = sizeof(struct sun6i_csi_buffer); queue->ops = &sun6i_csi_capture_queue_ops; queue->mem_ops = &vb2_dma_contig_memops; - queue->min_buffers_needed = 2; + queue->min_reqbufs_allocation = 2; queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; queue->lock = &capture->lock; queue->dev = csi_dev->dev; From patchwork Mon Nov 27 16:54:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747971 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="n/wP1EJ+" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 563E31BC8; Mon, 27 Nov 2023 08:55:23 -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 98F9C660739A; Mon, 27 Nov 2023 16:55:21 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104122; bh=xU5t5lXDyNc7SbgcJxDjwWv/JGjLx2P5DrRCeKKrrB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/wP1EJ+piINx+lJsUpzunRoD05oSZyG2UdLFhXS653XIRx1GPz65n4PYYppZZNgN cLUA1A/P0pFwdqWCKcLN6I4JSg7/S+IlpKxsLgVDTItARf2zJWj1bYfc/mBwo2Lr3G asWjj47Ifceq5sLD/Ns5wh4XwmJC79uZR3gpaqGYXhEguFIfX+o0htikg1PuP1GkdG Etw45V7y4XIOpJxZFmAcK8lyDgwzhE3nFSLOQoMH+B2eEA4bQ4XSf3u088SA/5jdOS J/rU6r0PqfnUmGj4i1H0n2GDyuEta7yI9za38218FR3mylHZhyPQCRAzPgG1GelZHm JuK1J2F8WtY+w== 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 Subject: [PATCH 21/55] media: i2c: video-i2c: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:20 +0100 Message-Id: <20231127165454.166373-22-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. video-i2c 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 --- drivers/media/i2c/video-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index ebf2ac98a068..ec20849cd306 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -795,7 +795,7 @@ static int video_i2c_probe(struct i2c_client *client) queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; queue->drv_priv = data; queue->buf_struct_size = sizeof(struct video_i2c_buffer); - queue->min_buffers_needed = 1; + queue->min_reqbufs_allocation = 1; queue->ops = &video_i2c_video_qops; queue->mem_ops = &vb2_vmalloc_memops; From patchwork Mon Nov 27 16:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747715 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="VwQOmNRl" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14E951BCF; Mon, 27 Nov 2023 08:55:24 -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 4C8D666073A4; Mon, 27 Nov 2023 16:55:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104122; bh=GzHBqgRhyPfMPwV2bftblzOdfFiQq/5ns8Cr3Xl9iGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VwQOmNRlKbCStX02pa30QUDD67AudKdZI1SlNcUxNJACh3pt3K0319v5P/3pqBJ+/ rOCaSGAvVwD1fDvqioLcIjTLJkZzAHKeVHXXJyBQQ+acixMmcN2zWoKhK3ze/3YaaT ctl4B2rNH1jl1ZopwYPGmVbMGwhwZaWRwO7ywUPYTCm5+rmIek9NI7ghu3msn+HGIf hubiyhwkLYrFJ6hq7gZg2fxIjJ04DvQQvKVdbPfHdjVV7/zXBpGIxen5JDtlnvC9dt /r36BuglfcX64lvC9WyeGYXHvcM6LG77JbN1NiM0EvlKQKCyMP0MnsbTA6jjVX5Ciz 1NtkKacnCdDnA== 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 Subject: [PATCH 22/55] media: dvb-core: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:21 +0100 Message-Id: <20231127165454.166373-23-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. dvb_vb2 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 --- drivers/media/dvb-core/dvb_vb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c index 167ff82a6fed..e6253cc41ae3 100644 --- a/drivers/media/dvb-core/dvb_vb2.c +++ b/drivers/media/dvb-core/dvb_vb2.c @@ -171,7 +171,7 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking) q->io_modes = VB2_MMAP; q->drv_priv = ctx; q->buf_struct_size = sizeof(struct dvb_buffer); - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->ops = &dvb_vb2_qops; q->mem_ops = &vb2_vmalloc_memops; q->buf_ops = &dvb_vb2_buf_ops; From patchwork Mon Nov 27 16:54:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="oLGIy3SC" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025251BD7; Mon, 27 Nov 2023 08:55:25 -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 0260066073BB; Mon, 27 Nov 2023 16:55:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104123; bh=ORlm67uM5fv255axUnsY7LF5+NRgLL1FXRZ/tIF2QjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLGIy3SCfICUtd7xWL7fyPuo1zGdVydo4Iy1+Qb24tLeTC1ONiJGIXEqEKoRP5URg BZxpun+/9Ypo+UHvaC0YGQLXW6IDdw6noE1wfieLQqA1W2SYT+zfVUE9Cy4NNR1qjW /NUrisiu1BMMfcMIrj+x9dFAXL1HJ9Nx86NU7uHz1epUFpR3SbijDOj39E+WRGVo7D WI8jCSQbS7WGgQTUNaQInnERCDkcvyWOBterqwpgnx1kjzEI1FRUZqtF+v6sKFIYG5 H+0vpceGHBJmknKWFjeJrD6Y4LKijtNNq5lwLGlQptq7ML7DrTFGGc+gR0LJ+uUUvf iDjXx3yFLeT8Q== 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 , Steve Longerbeam , Philipp Zabel , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH 23/55] media: imx: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:22 +0100 Message-Id: <20231127165454.166373-24-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. imx-media-capture 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: Steve Longerbeam CC: Philipp Zabel CC: Greg Kroah-Hartman CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team --- drivers/staging/media/imx/imx-media-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c index ce02199e7b1b..5bb1ebd35d89 100644 --- a/drivers/staging/media/imx/imx-media-capture.c +++ b/drivers/staging/media/imx/imx-media-capture.c @@ -1022,7 +1022,7 @@ imx_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd, vq->mem_ops = &vb2_dma_contig_memops; vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; vq->lock = &priv->mutex; - vq->min_buffers_needed = 2; + vq->min_reqbufs_allocation = 2; vq->dev = priv->dev; ret = vb2_queue_init(vq); From patchwork Mon Nov 27 16:54:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747714 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Q/A0oatc" 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 CCFC41BE2; Mon, 27 Nov 2023 08:55:25 -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 06FA466073C1; Mon, 27 Nov 2023 16:55:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104124; bh=cnLy0TbF/AfysmCQDbLYpAUN3cPkSiq05OZ3x+S4YnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q/A0oatc8YQfUvE4g3WNR5Iwa75SEj9b1Z75m/AmFMsMVVf6lGEeItRKQ7yjbPJ5b JvtkRawLZ08cpIxRcnJqyYtSInPApW54sNBQRPDN//py4BFi4Cpt2GOGI8qKbXpUjX wXz5IEFgS+NMHvE99jV6OGzbkAQvJ9XGYxiBEGKBavIU2CUDjtN98+bQ1z2xIesq4p /j/nZGg4ysEhLjc1pE3f0sAaYLJfhJHi56DGddzeSWPwwjkv6GNk9qFQjy+e4A4yJd PRzqqFMTTjTseaIiorvCOUx+bHBye7+QiVw7uJ8jRbCOag7gQw+hekNAoy9sRqFwDO MzDjSBSwDfEog== 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 , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 24/55] media: atmel: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:23 +0100 Message-Id: <20231127165454.166373-25-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. atmel-isc drivers don'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: Eugen Hristev CC: Nicolas Ferre CC: Alexandre Belloni CC: Claudiu Beznea --- drivers/staging/media/deprecated/atmel/atmel-isc-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c index 468568b5bb7a..dbe611d03018 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c +++ b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c @@ -1871,7 +1871,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier) q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &isc->lock; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->dev = isc->dev; ret = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747969 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="X46/hfSc" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB2F71BEE; Mon, 27 Nov 2023 08:55:26 -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 D177E66071EF; Mon, 27 Nov 2023 16:55:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104125; bh=6fLuB21NqZHQ9MYfFVjrs/3zUstZGwJ8LCc0NS9LFcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X46/hfSczoQezSpEDoB4gMCxWcrCu/PmrdfIbxsUqXyLgcUdVBnZCapFmnqB78f/N Rkq0xLW3LBtfKdyUICWd/b22L5v1j8lzrc8Y5msfSqTshXC+m7zfUGixwUhDoCz7wh wtJi0FY7JsF8dAf6NKcZYSliw+At0lUQSi71uRC9PhERPgdTULw3A3YvhiXSWBliUU gA0Fvzm0vNwLT70tWOxUAbChhbJnIzkp/Rp1vwpHGUnJ6zDMzRdOtc1O1ObkkQzdVi NxoaXijoa0y2AxYoW/ASXNaHfye9kIX7lSDtOKvdorglQxUxcxLoXJVbTkboPYDrtS azWDc8ZE0l/Rg== 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 , Sakari Ailus , Bingbu Cao , Tianshu Qiu Subject: [PATCH 25/55] media: ipu3: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:24 +0100 Message-Id: <20231127165454.166373-26-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. ipu3 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: Sakari Ailus CC: Bingbu Cao CC: Tianshu Qiu --- drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 0fe2b858da83..197326fbcc2c 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -1198,7 +1198,7 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe, vbq->buf_struct_size = imgu->buf_struct_size; vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; /* can streamon w/o buffers */ - vbq->min_buffers_needed = 0; + vbq->min_reqbufs_allocation = 0; vbq->drv_priv = imgu; vbq->lock = &node->lock; r = vb2_queue_init(vbq); From patchwork Mon Nov 27 16:54:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747713 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LdlQSF8T" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF5231BF5; Mon, 27 Nov 2023 08:55:27 -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 AA81A66073C8; Mon, 27 Nov 2023 16:55:25 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104126; bh=yTw2OYKem5rJF2Nwf34/Wc4CllCCaoPD56PNsk9nNiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LdlQSF8TUQUtEtQEX4FNz/sBA53t5NMSXGsZ7LoAxMo5zdnlfbOxs1MNTBy1JrjfA xCwqsJ/8Kry0SJi3u6Dpp9FextBN6RG6fN9a32XVoqePLvzxR9KiFPS4D2pnePmpRo BmypuumCDQykRPHnKSYMKZ3yvhyHoGQMsiGEODDUbc28DDz4RoK1UOiY6oftKGz6fV AJv4rNy63G6mMHKUcxHfbHSVhpUYe2irMrL8EOccFCwsWd9nZOmnV3SBpgcSqaswfn k7tAGqOsC14HEO1SsGqxPT6+5Tqe3lTwQccVH8KfoH9wUw2pZ/f/LQJzU41nIRDLgb Vm6Zkj3oOjoKA== 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 , Jack Zhu , Changhuang Liang Subject: [PATCH 26/55] media: starfive: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:25 +0100 Message-Id: <20231127165454.166373-27-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. starfive 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: Jack Zhu CC: Changhuang Liang --- drivers/staging/media/starfive/camss/stf-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c index 0b305f21eb53..25038e37e8a6 100644 --- a/drivers/staging/media/starfive/camss/stf-video.c +++ b/drivers/staging/media/starfive/camss/stf-video.c @@ -513,7 +513,7 @@ int stf_video_register(struct stfcamss_video *video, q->buf_struct_size = sizeof(struct stfcamss_buffer); q->dev = video->stfcamss->dev; q->lock = &video->q_lock; - q->min_buffers_needed = STFCAMSS_MIN_BUFFERS; + q->min_reqbufs_allocation = STFCAMSS_MIN_BUFFERS; ret = vb2_queue_init(q); if (ret < 0) { dev_err(video->stfcamss->dev, From patchwork Mon Nov 27 16:54:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747968 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="AiG+Ejb2" 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 7E9F91BFE; Mon, 27 Nov 2023 08:55:28 -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 75A956607286; Mon, 27 Nov 2023 16:55:26 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104127; bh=YIgkAExbbbECDPnkaD6N0lG+VUJuWN8PC9JRmzX9TCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AiG+Ejb2+mNZ23dQ58fH8HeFPy3hJ02mlj2Hi6rxIeY+Gy1a8/QIAfOk23U/takDW v6q5IkEXN2y6tQf+omLSLpcCgvsdNkad61xg1wUI87O6gd/fMVHJPt7beMBJxoFrzv o3zi6w3FT8MG0PcMXFjmkzio7deWNDtDOAOgQxgjwDHJYjxGTvkbAVGKotPtggFhjH nEwfKFLrFCHpdhjTGSVVIYW9HnpEUsKJSQJhbxaToNiZ+59Uk/fYnCZBuMuMOIXmHs 95pGFhjthjI/q+XLSrPOYxKfQ89KGXqn3gvvCg3f+9+VRpC04Qij8+Svm2OuMVLuVw WvZajJW/poNYw== 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 , Paul Kocialkowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-sunxi@lists.linux.dev Subject: [PATCH 27/55] media: sun6i-isp: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:26 +0100 Message-Id: <20231127165454.166373-28-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun6i-isp 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: Paul Kocialkowski CC: Chen-Yu Tsai CC: Jernej Skrabec CC: Samuel Holland CC: linux-sunxi@lists.linux.dev --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 +- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c index 1595a9607775..f47f9946c19f 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c @@ -660,7 +660,7 @@ int sun6i_isp_capture_setup(struct sun6i_isp_device *isp_dev) queue->buf_struct_size = sizeof(struct sun6i_isp_buffer); queue->ops = &sun6i_isp_capture_queue_ops; queue->mem_ops = &vb2_dma_contig_memops; - queue->min_buffers_needed = 2; + queue->min_reqbufs_allocation = 2; queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; queue->lock = &capture->lock; queue->dev = isp_dev->dev; diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c index e28be895b486..259f6bfcb620 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c @@ -489,7 +489,7 @@ int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev) queue->buf_struct_size = sizeof(struct sun6i_isp_buffer); queue->ops = &sun6i_isp_params_queue_ops; queue->mem_ops = &vb2_vmalloc_memops; - queue->min_buffers_needed = 1; + queue->min_reqbufs_allocation = 1; queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; queue->lock = ¶ms->lock; queue->dev = isp_dev->dev; From patchwork Mon Nov 27 16:54:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747712 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="k3YZYXRH" 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 4A6151FCE; Mon, 27 Nov 2023 08:55:29 -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 5FE7666073CD; Mon, 27 Nov 2023 16:55:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104128; bh=PJOb0upzYk5sy+kA9Qk465u2DFL4NHA2Gb2jqg1/r/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k3YZYXRHqyULkbuXDy3Xg/N7u6yLlC9ch+gaajxQbo5EMxlKvmHEEU6TlyVFoYK/e tVgdrrRXlnj7YYHNo7+/hTVR6g8ifxG86PJXCsiOuQdYLloUVPh4pVrK/kr55HaXLa fZsUIMUastnZ2yqudoE2JxwbB1LQyDR3Qs749Y3OxoTuh+eS2k/Ci0JHpyPdISDPkr UV+sXv1ei8pw5aasuxbLqsi7898BCZJHC5C0E7cFIFLX998z42g5qaF43w1NMv4X+A l/52MGE0X34FEhPsa5u5g6W7EIgN7YW7DmwZicDihlQclalSrEGYQfpcvwuvWzFmQ4 /o9PEMC6M/zrQ== 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 , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , linux-tegra@vger.kernel.org Subject: [PATCH 28/55] media: tegra-video: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:27 +0100 Message-Id: <20231127165454.166373-29-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. tegra-video 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: Thierry Reding CC: Jonathan Hunter CC: Sowjanya Komatineni CC: Luca Ceresoli CC: linux-tegra@vger.kernel.org --- drivers/staging/media/tegra-video/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c index e0bb59ee3c09..b8242c8c0497 100644 --- a/drivers/staging/media/tegra-video/vi.c +++ b/drivers/staging/media/tegra-video/vi.c @@ -1174,7 +1174,7 @@ static int tegra_channel_init(struct tegra_vi_channel *chan) chan->queue.ops = &tegra_channel_queue_qops; chan->queue.mem_ops = &vb2_dma_contig_memops; chan->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - chan->queue.min_buffers_needed = 2; + chan->queue.min_reqbufs_allocation = 2; chan->queue.dev = vi->dev; ret = vb2_queue_init(&chan->queue); if (ret < 0) { From patchwork Mon Nov 27 16:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747711 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="fRzBKxgr" 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 B75621FE1; Mon, 27 Nov 2023 08:55:30 -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 4AA3E66073D3; Mon, 27 Nov 2023 16:55:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104128; bh=XHY1AINeJ9MzBkkr5zEpq1g8COVMpemGzWI4pwBIFa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fRzBKxgrAEff3sfYNfYAcyeBEFRcIZrXZKo61JA9EDYMcbJwB04bk1fuUxcfcZ5l0 4tKCk8SikbcntXrdTatdABcMyFpWo/AHSfOmXAPdxgmjMeMMTZ2Rd4Y39aXZUHzjFy e/DkVwxYdtxfMHjP0WPzzxz9fUGk0gqJF8JKrYSG/7lNvd1ITu0XimopKmRxIKkBCB AVBshSRIqHZ2eUUTKzkGEpAY+v9NSwHYdmTcVpKWTI1nxps0VGnlg0fkWaJSalskuc uO5GWVmJdhhVLcCttxQ72Hq3bD1BwbKMg3Ya/9RYe6H66teaqherQjJTek9Sls/1Vl gjehpR0o3Ae9w== 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 , "Lad, Prabhakar" Subject: [PATCH 29/55] media: ti: am437x: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:28 +0100 Message-Id: <20231127165454.166373-30-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. am437x 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: "Lad, Prabhakar" --- drivers/media/platform/ti/am437x/am437x-vpfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c index f18acf9286a2..c2abb7760225 100644 --- a/drivers/media/platform/ti/am437x/am437x-vpfe.c +++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c @@ -2234,7 +2234,7 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe) q->buf_struct_size = sizeof(struct vpfe_cap_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &vpfe->lock; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->dev = vpfe->pdev; err = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747967 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="EYVQNlDh" 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 E09A51FE0; Mon, 27 Nov 2023 08:55:30 -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 0844F66073D7; Mon, 27 Nov 2023 16:55:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104129; bh=3CZsTTbHLtC5vyOvtssRJvLsPSp78mQlLUyr4UEzOZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYVQNlDhTIxKDHnmG/Ekj99JD5kgVrukW22yr4FR3JKkFJU6WKYy2ELTie1khIxEW KyelEo7dOIjQRLCscyLgl3qFCVbux/fWK6ENMHTGzu0FdhiHrjucE1mvsXbMhWrGzL LGJ93g37lbE/Ky/0csRdacUDH2wGwJVi5FqvGJAl7Sy8EP2BoVrPew50Mmy29YMfN4 f7sDclJ3eyLKuP1Y7CHuq8iCBxqYBq9Cscoq7sAviNjetQpcbbBMizPSZev3xtnJBr T5IRo07rQWHE7usTvfd22nmZLmkOOGz86nuXUa8Y+evAoKVBarFSMqYIUBDH1HuSky 8/lu3VxwGRZ9A== 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 , Benoit Parrot Subject: [PATCH 30/55] media: ti: cal: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:29 +0100 Message-Id: <20231127165454.166373-31-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. Cal 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: Benoit Parrot --- drivers/media/platform/ti/cal/cal-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/cal/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c index e1c5e68e945b..04709dac7221 100644 --- a/drivers/media/platform/ti/cal/cal-video.c +++ b/drivers/media/platform/ti/cal/cal-video.c @@ -1010,7 +1010,7 @@ int cal_ctx_v4l2_init(struct cal_ctx *ctx) q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &ctx->mutex; - q->min_buffers_needed = 3; + q->min_reqbufs_allocation = 3; q->dev = ctx->cal->dev; ret = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747710 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="c2gVJHwe" 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 AD9D51FF7; Mon, 27 Nov 2023 08:55:31 -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 C131A66073DD; Mon, 27 Nov 2023 16:55:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104130; bh=BbsAaug6qXnV0oQEB2d1Bjx3d9aAtffDIgQvK76wdRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c2gVJHwetDI8l8Qh9LeoES0puBKsmLoshT4N1Q4J0HFqUZsvJdXMzCeWySiDyD2aH fEnuewQHs1uGaY7lTSx/5Rv+wCzxQC016UImFRv/C7gRoj6ekuzB2siAL+kK9HhYsm rN9ECZQU5mxm5tyW7oMHUNKZLfSHfuuNzPU0ZX36ReJn4DFf2wGrP6U93jS9GupV82 vXnMYvVNVN2Q+KFKdzMlN2GGWiskyZnutsgS8ckxR+p8bcjpMhP3o2+prSP//8/szf HUerogHaXTm2GxtSm7bCQOlyzU8LKeFCuXrnPeWst9eDr4mC3bWMjKP3A1P71iFiCC +cV1CXLK5mNpg== 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 , "Lad, Prabhakar" Subject: [PATCH 31/55] media: ti: davinci: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:30 +0100 Message-Id: <20231127165454.166373-32-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. davinci 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: "Lad, Prabhakar" --- drivers/media/platform/ti/davinci/vpif_capture.c | 2 +- drivers/media/platform/ti/davinci/vpif_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c index fc42b4bc37e6..1714d67ea702 100644 --- a/drivers/media/platform/ti/davinci/vpif_capture.c +++ b/drivers/media/platform/ti/davinci/vpif_capture.c @@ -1429,7 +1429,7 @@ static int vpif_probe_complete(void) q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct vpif_cap_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->lock = &common->lock; q->dev = vpif_dev; diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c index 9dbab1003c1d..e918b6c8e645 100644 --- a/drivers/media/platform/ti/davinci/vpif_display.c +++ b/drivers/media/platform/ti/davinci/vpif_display.c @@ -1169,7 +1169,7 @@ static int vpif_probe_complete(void) q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct vpif_disp_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 1; + q->min_reqbufs_allocation = 1; q->lock = &common->lock; q->dev = vpif_dev; err = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747966 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="J7Mw8BYc" 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 717462102; Mon, 27 Nov 2023 08:55:32 -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 800036607332; Mon, 27 Nov 2023 16:55:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104131; bh=6CSGRDiRO2lms0wmXZEstJJokqkWndIp5smKK5ehYIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J7Mw8BYcjh+HAx9EHuD5fXzhsVfCxdRCEtvz6kxPPisGcj/BjvZK0XvHWOdNU65Qd it31XKO2UrDstoCrnrQT0G1QxAI2CaPBB9k8A7g8fYXE0K+T3LdwZ4KwStLepJpSC/ hJiahT1bN4TTma3pTkZ1zjLRTQK4eQMjmmZAoTl0JtFOG4xk2hdW4xDTuR2YIcA8Wu BOH6/Oy285pZ3z5U1wse4tYdhb4lsbxuK47nAAk3uMI9k7+zb40ffFYK9iGR/gnoP1 oiAWMuN3Y3uM2lz67aCyIZYMMwYABSCocGAikiGOHdgPhpKaoDwSRq/pYkPGNVPSmJ tZ1xh73ZqnCOg== 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 Subject: [PATCH 32/55] media: saa7146: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:31 +0100 Message-Id: <20231127165454.166373-33-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. saa7146 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 --- drivers/media/common/saa7146/saa7146_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c index 79214459387a..db4d725a05d4 100644 --- a/drivers/media/common/saa7146/saa7146_fops.c +++ b/drivers/media/common/saa7146/saa7146_fops.c @@ -387,7 +387,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev, q->gfp_flags = __GFP_DMA32; q->buf_struct_size = sizeof(struct saa7146_buf); q->lock = &dev->v4l2_lock; - q->min_buffers_needed = 2; + q->min_reqbufs_allocation = 2; q->dev = &dev->pci->dev; err = vb2_queue_init(q); if (err) From patchwork Mon Nov 27 16:54:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747965 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="bUW8uWS5" 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 8E840210D; Mon, 27 Nov 2023 08:55:33 -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 3586B66073CA; Mon, 27 Nov 2023 16:55:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104131; bh=zWGO+xQMxELWOf7KdTdR8LG3JTriZNDDb/EP2aovBFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bUW8uWS5GW0QXyBTRzhuFADv/y2EtdYvOtkMLrer7hDPeWcEz2eOSftisYiD15p3q rGznA676mshUPeo1Vt77h7d8o7lH9BfYqnhBFPaUg92Fx0LtkyXgsWOxYZHfYsCG6W lluewMKI+WXpr/nfDPLvWH+OvFxxSrA+su6FcnSC/xfYTSsPBEyX2xyn/+DxR3jZUx rjLWHFj4/AWStGyBxF3ejvARfP/Kur946umnB7qJIXur/ca7OKbeU5boLXbyOPchaa LPmgq22GT8Mg+Id+g2wryn/7gJxCz4DzYdNqEQ+rf/fwuGkQ28K07y1ZarUEfUUXgp BJMwf+JBqV4LA== 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 , Nick Dyer , Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH 33/55] input: touchscreen: atmel: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:32 +0100 Message-Id: <20231127165454.166373-34-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. atmel touchscreen 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: Nick Dyer CC: Dmitry Torokhov CC: linux-input@vger.kernel.org --- drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 20094b9899f0..47f2b3aafa4d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2546,7 +2546,7 @@ static const struct vb2_queue mxt_queue = { .ops = &mxt_queue_ops, .mem_ops = &vb2_vmalloc_memops, .timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC, - .min_buffers_needed = 1, + .min_reqbufs_allocation = 1, }; static int mxt_vidioc_querycap(struct file *file, void *priv, From patchwork Mon Nov 27 16:54:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747709 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aqpRUR5B" 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 E5D8D2119; Mon, 27 Nov 2023 08:55:33 -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 085D266073E5; Mon, 27 Nov 2023 16:55:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104132; bh=2gAqxxEJ2KqwbPuMzplAmWNudI3ZJjJVcvYYervFwW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqpRUR5B7rLkIPBrl96mQJqeD5R0o9Q5BMCoaKtg5QuqkLlcc+C911iU2FJnQzBX6 F2zlghBwHF16o0UIYyjlbkocDMkKKD/AaICpRYiV4w57I/LqUDJ+7dQqqlVlGB+s99 qG5ySA4re0p45He3Ra0IqcIm/IGL4lvPbWUIDdb93OxZFJA3DvKJqzFTnZhRkLtVu+ wOSCU48w+YYSaPCltcO+cYnd3AyuzqTB6xc881+R4CslyHe3nXrQe92JmFPJhK2CcM LegUwvBEHebpAjinyfNEM35kcTmAZRZrrc3iy/D1gvAN5Mt2PtX0axNXNrjYIbSTiV +T5FmrLdIH1Ow== 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 , Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH 34/55] input: touchscreen: sur40: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:33 +0100 Message-Id: <20231127165454.166373-35-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sur40 touchscreen 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: Dmitry Torokhov CC: linux-input@vger.kernel.org --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index e7d2a52169a0..4da3063c352e 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -1124,7 +1124,7 @@ static const struct vb2_queue sur40_queue = { .ops = &sur40_queue_ops, .mem_ops = &vb2_dma_sg_memops, .timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC, - .min_buffers_needed = 3, + .min_reqbufs_allocation = 3, }; static const struct v4l2_file_operations sur40_video_fops = { From patchwork Mon Nov 27 16:54:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747964 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="AyB7slYM" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E522125; Mon, 27 Nov 2023 08:55:34 -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 C0C4466073E9; Mon, 27 Nov 2023 16:55:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104133; bh=s+4TpTUuiOxUyySpjai/VxlncF5tn3uinvKKcPElu7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AyB7slYMc/QOMLbN/sOUhyWxBxEMjH7WRzaNkawTZq5x4fpFzqsfn7WRQYIbJoqAx rh71hu63SYRcJzKctOEQnsZ3y2Zz59eLtmgYxQPfTmrvOq0+135DqZT+UoJL1+z9uJ ShSAMHev+R3AxIdTXfSy4gvYD91IuAon040J2TyM7le47nP4dGbT/QpkrjCQO+r7eC uwqwqPrJxXsm+6KihJbPJE1RjH0uLXz9KgnZps6JnDZ+q/9VYU+2lmbrW//U9SOWXT NFmDtBkibr8MnwZK7NR/PGAQFg9IY65b9M5RRPI3O3k2Wvi9tCuNlOG7kpUwJAMM1o 0E0QEzOMPJPuQ== 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 Subject: [PATCH 35/55] videobuf2: core: Add min_dma_buffers_needed field to vb2_queue Date: Mon, 27 Nov 2023 17:54:34 +0100 Message-Id: <20231127165454.166373-36-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'min_dma_buffers_needed' field is to clarify 'min_buffers_needed' purpose versus 'min_reqbufs_allocation' usage. 'min_buffers_needed' is still used in few drivers so directly rename it would be problematic. The both will live together while fixing the drivers to use 'min_dma_buffers_needed' field instead. Signed-off-by: Benjamin Gaignard --- .../media/common/videobuf2/videobuf2-core.c | 28 ++++++++++++++----- include/media/videobuf2-core.h | 7 +++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index c224d13b3105..a6ec55db8635 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -816,7 +816,7 @@ static bool verify_coherency_flags(struct vb2_queue *q, bool non_coherent_mem) int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, unsigned int flags, unsigned int *count) { - unsigned int num_buffers, allocated_buffers, num_planes = 0; + unsigned int num_buffers, allocated_buffers, min_reqbufs_needed, num_planes = 0; unsigned int q_num_bufs = vb2_get_num_buffers(q); unsigned plane_sizes[VB2_MAX_PLANES] = { }; bool non_coherent_mem = flags & V4L2_MEMORY_FLAG_NON_COHERENT; @@ -866,7 +866,11 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, * Make sure the requested values and current defaults are sane. */ num_buffers = max_t(unsigned int, *count, q->min_buffers_needed); - num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation); + if (q->min_reqbufs_allocation) + num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation); + else + num_buffers = max_t(unsigned int, num_buffers, q->min_dma_buffers_needed + 1); + min_reqbufs_needed = num_buffers; num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers); memset(q->alloc_devs, 0, sizeof(q->alloc_devs)); /* @@ -918,7 +922,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, * There is no point in continuing if we can't allocate the minimum * number of buffers needed by this vb2_queue. */ - if (allocated_buffers < q->min_buffers_needed) + if (allocated_buffers < min_reqbufs_needed) ret = -ENOMEM; /* @@ -1654,7 +1658,7 @@ EXPORT_SYMBOL_GPL(vb2_core_prepare_buf); * @q: videobuf2 queue * * Attempt to start streaming. When this function is called there must be - * at least q->min_buffers_needed buffers queued up (i.e. the minimum + * at least q->min_dma_buffers_needed queued up (i.e. the minimum * number of buffers required for the DMA engine to function). If the * @start_streaming op fails it is supposed to return all the driver-owned * buffers back to vb2 in state QUEUED. Check if that happened and if @@ -1847,7 +1851,8 @@ int vb2_core_qbuf(struct vb2_queue *q, struct vb2_buffer *vb, void *pb, * then we can finally call start_streaming(). */ if (q->streaming && !q->start_streaming_called && - q->queued_count >= q->min_buffers_needed) { + ((q->queued_count >= q->min_buffers_needed) || + (q->queued_count >= q->min_dma_buffers_needed))) { ret = vb2_start_streaming(q); if (ret) { /* @@ -2217,6 +2222,12 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type) return -EINVAL; } + if (q_num_bufs < q->min_dma_buffers_needed) { + dprintk(q, 1, "need at least %u allocated buffers\n", + q->min_dma_buffers_needed); + return -EINVAL; + } + ret = call_qop(q, prepare_streaming, q); if (ret) return ret; @@ -2225,7 +2236,8 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type) * Tell driver to start streaming provided sufficient buffers * are available. */ - if (q->queued_count >= q->min_buffers_needed) { + if (q->queued_count >= q->min_buffers_needed && + q->queued_count >= q->min_dma_buffers_needed) { ret = vb2_start_streaming(q); if (ret) goto unprepare; @@ -2505,6 +2517,7 @@ int vb2_core_queue_init(struct vb2_queue *q) return -EINVAL; if (WARN_ON(q->max_num_buffers > MAX_BUFFER_INDEX) || + WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers) || WARN_ON(q->min_buffers_needed > q->max_num_buffers)) return -EINVAL; @@ -2519,7 +2532,8 @@ int vb2_core_queue_init(struct vb2_queue *q) * in that request) will always succeed. There is no method of * propagating an error back to userspace. */ - if (WARN_ON(q->supports_requests && q->min_buffers_needed)) + if (WARN_ON(q->supports_requests && + (q->min_buffers_needed || q->min_dma_buffers_needed))) return -EINVAL; INIT_LIST_HEAD(&q->queued_list); diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 17cacd696ab4..0bc97f28a7ea 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -549,10 +549,16 @@ struct vb2_buf_ops { * @min_buffers_needed: the minimum number of buffers needed before * @start_streaming can be called. Used when a DMA engine * cannot be started unless at least this number of buffers + * have been queued into the driver. (Deprecated) + * @min_dma_buffers_needed: the minimum number of buffers needed before + * @start_streaming can be called. Used when a DMA engine + * cannot be started unless at least this number of buffers * have been queued into the driver. * @min_reqbufs_allocation: the minimum number of buffers allocated when * calling VIDIOC_REQBUFS. Used when drivers need a to * specify a minimum buffers allocation before setup a queue. + * If set to 0 then min_dma_buffers_needed + 1 value is used + * as minimum numbers of buffers value. */ /* * Private elements (won't appear at the uAPI book): @@ -618,6 +624,7 @@ struct vb2_queue { u32 timestamp_flags; gfp_t gfp_flags; u32 min_buffers_needed; + u32 min_dma_buffers_needed; u32 min_reqbufs_allocation; struct device *alloc_devs[VB2_MAX_PLANES]; From patchwork Mon Nov 27 16:54:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747708 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="SYacJ+X5" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA73212C; Mon, 27 Nov 2023 08:55:35 -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 75AB7660737B; Mon, 27 Nov 2023 16:55:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104134; bh=X02tzOo2kO6Xf8Mm3XO+fdYdi1NrT5mrpTJUnhqGe4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SYacJ+X5qY1brq6yAX2v6Zh8vkADiRh6fL5ssu4J7Myr/+F2ok5EzyvDWTgMHHjXP 5zzfGnbfATjw9t+mQdXymhiV3mymtoeLiX65T3m8+Ae4xllQeIw6OFIgIeSqC1NSzn dbhT00XGtQ+nld5mStG1N0pyys73Mse09oS0sERTP7WakGbDOcD4bjJEPnjWZ/NJ7y Gor0tI48ojqW9MVdR4Al0vXf/6SiknsCV8AFr179BFApBGgQUjqxKUFHRGZtC/PScq 9FbmTemR64ciabk44Ke+awxocJzpI59XYNQVsAv4rhwe4vkrNSdaZJSSvCkpQR6meB 0UY/Dv//MyFIQ== 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 , Hugues Fruchet , linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 36/55] media: stm32: stm32-dcmi: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:35 +0100 Message-Id: <20231127165454.166373-37-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 smt32-dcmi driver use a dma engine and needs a minimum number of buffers 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: Hugues Fruchet CC: linux-stm32@st-md-mailman.stormreply.com --- drivers/media/platform/st/stm32/stm32-dcmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index 48140fdf40bb..a267fdcbe886 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -2031,7 +2031,7 @@ static int dcmi_probe(struct platform_device *pdev) q->ops = &dcmi_video_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->allow_cache_hints = 1; q->dev = &pdev->dev; From patchwork Mon Nov 27 16:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747963 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="jmgsIweR" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FD0D213B; Mon, 27 Nov 2023 08:55:36 -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 3E67166073ED; Mon, 27 Nov 2023 16:55:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104134; bh=oeU9+ujofjCPuqpbBJhFmasSXcVk3Te+UZBalP9S6o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmgsIweRenNoGVU5GQtYm6oRnhpXyUT2dFbt+4WgsQcG69mIJXDiSPgb+VIkZGjza JYJ8g7H5cb1iQEnpOF5S4ikoZ5Sa7hWLa44WS2yAWMdryATzyynpQif+YODa3yT7g2 SZK+FzrT+YrUHmL88C023KqIE+d5k8n6p/kg2nUs7oKLpWiBIEhuCADx4B6hUDiQ5I iUavy+1FeS4FcYhvE8YKYCCHw6gG3QOkvElrDuc+iJ9uqhvLbLrQY7fBScKV2DxRQr Dn9u7W9zHKOt8LqYzi6JRbYGpX9asUCO1yzbmnAJm6UAFRDPIV0MAC6NOS/8Ljdunc c0W+tU8jQKy4w== 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 , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , Jacopo Mondi , linux-renesas-soc@vger.kernel.org Subject: [PATCH 37/55] media: renesas: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:36 +0100 Message-Id: <20231127165454.166373-38-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 renesas drivers use a dma engine and needs a minimum number of buffers 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: "Niklas Söderlund" CC: Jacopo Mondi CC: linux-renesas-soc@vger.kernel.org --- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/renesas/renesas-ceu.c | 2 +- drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +- drivers/media/platform/renesas/sh_vou.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c index 2a77353f10b5..b467e7a7d0dc 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c @@ -1559,7 +1559,7 @@ int rvin_dma_register(struct rvin_dev *vin, int irq) q->ops = &rvin_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 4; + q->min_dma_buffers_needed = 4; q->dev = vin->dev; ret = vb2_queue_init(q); diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c index 2562b30acfb9..e2aef002bca9 100644 --- a/drivers/media/platform/renesas/renesas-ceu.c +++ b/drivers/media/platform/renesas/renesas-ceu.c @@ -1399,7 +1399,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier) q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct ceu_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->lock = &ceudev->mlock; q->dev = ceudev->v4l2_dev.dev; diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c index e6eedd65b71d..df1ab9beea6e 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c @@ -767,7 +767,7 @@ int rzg2l_cru_dma_register(struct rzg2l_cru_dev *cru) q->ops = &rzg2l_cru_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 4; + q->min_dma_buffers_needed = 4; q->dev = cru->dev; ret = vb2_queue_init(q); diff --git a/drivers/media/platform/renesas/sh_vou.c b/drivers/media/platform/renesas/sh_vou.c index f792aedc9d82..c2ac340a9da8 100644 --- a/drivers/media/platform/renesas/sh_vou.c +++ b/drivers/media/platform/renesas/sh_vou.c @@ -1297,7 +1297,7 @@ static int sh_vou_probe(struct platform_device *pdev) q->ops = &sh_vou_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->lock = &vou_dev->fop_lock; q->dev = &pdev->dev; ret = vb2_queue_init(q); From patchwork Mon Nov 27 16:54:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747707 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="d5k8un7Z" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 161632689; Mon, 27 Nov 2023 08:55:36 -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 10CF3660732E; Mon, 27 Nov 2023 16:55:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104135; bh=+QiW4+PKMpn2QOF9ET7fPoqeBffKw0nbwvNL+3C6ds0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d5k8un7Z4Qh5e/OGB9kL3m0OUr76zb73WO5lo60s/dRut7VkUohGVMUPd76SkojDB QQeeHKv8AGcKmyEhuPhxffYBlVBY+uq+No1fxE8S0EFp/7X2bJo7c/2a6iyhmf2JJl PRn3rcCY7uZ8JQMC0BBZjA0ZKXxkBMcDvhztqel1YmVdNWTjk9jw2AqvS/kZZuDE7P hdSRxbOF7g0ZcEcDv0njaD9jtbLTJHmWt7l5H1PWMAnaHCN2buGJLHfzZoL8SZwvwp BHeTczCoV+xl60d9M5YcqyaXzBOpF1nR0yI9xAQTgFoEwxGSpN1X2XNBVWrgPykaZm U4T7u6KX2KF4w== 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 , Jai Luthra Subject: [PATCH 38/55] media: ti: j721e-csi2rx: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:37 +0100 Message-Id: <20231127165454.166373-39-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 j721e-csi2rx driver use a dma engine and needs a minimum number of buffers 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: Jai Luthra --- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index ada61391c8d2..55e843419eb9 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -873,7 +873,7 @@ static int ti_csi2rx_init_vb2q(struct ti_csi2rx_dev *csi) q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->dev = dmaengine_get_dma_device(csi->dma.chan); q->lock = &csi->mutex; - q->min_buffers_needed = 1; + q->min_dma_buffers_needed = 1; ret = vb2_queue_init(q); if (ret) From patchwork Mon Nov 27 16:54:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747962 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aOqDp041" 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 51CE52697; Mon, 27 Nov 2023 08:55:37 -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 C574866073F3; Mon, 27 Nov 2023 16:55:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104136; bh=bUose2Qt+KgGhraI5gHXJBZnW4ioayca0b3t+erw7b4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aOqDp041fs/pryvCPqh+RTEXRELzEfst6tRZ+jEbOhsyU8v46pPm+6fd3zAHprbOq A35s2KgzdHp+aDziQP6DY8tzK6kD7PTEHdor/Zt2Hmsi0W+VTtD2zK4TZm7sfnz6nS pHxlUtx+jFP1HZW8Md7Q9rcbcbY47k5uB0FYfk1fVOPwG1aLVMndw+tk7cFDJFZA/V NhXxe/YWXNjI+/PzHFjfqcKKgcZw5rXPpOHo+imT+3cKnBYNpydTtvy4jgY/eioKBl /ZVKZZFXTjBrvLxKz80+7FRpdDung2wZDQv+OkqPLFinUPtUas7k7vdoDoSksCRWY7 nNkeQgEkaHdlA== 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 Subject: [PATCH 39/55] media: ti: omap: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:38 +0100 Message-Id: <20231127165454.166373-40-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 omap driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/platform/ti/omap/omap_vout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c index 72ce903717d3..0adbdd11e06b 100644 --- a/drivers/media/platform/ti/omap/omap_vout.c +++ b/drivers/media/platform/ti/omap/omap_vout.c @@ -1404,7 +1404,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout) vq->ops = &omap_vout_vb2_ops; vq->mem_ops = &vb2_dma_contig_memops; vq->lock = &vout->lock; - vq->min_buffers_needed = 1; + vq->min_dma_buffers_needed = 1; vfd->queue = vq; ret = vb2_queue_init(vq); From patchwork Mon Nov 27 16:54:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747706 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="gQd0qoEa" 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 95B171BC; Mon, 27 Nov 2023 08:55:38 -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 79A6566073FB; Mon, 27 Nov 2023 16:55:36 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104137; bh=71+AtmSDH/h7dLOlV29BkPWy1yXzA9ywoJKq5O/+QVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQd0qoEaJv55RD/PrXt+M/nrSvjUEquEZ2G5fgA7OMdfJZaDwhH6jBTTLr5QcJolC yFnWShT0rf29LNlSkd2gvc/eScBdKzW5La19tsISe+50xLBUNwloLBYWR1EFfuQ09K p3oM5Rg2A26IsLuIzOiEo2mSevVNxQr90CQJSzk1EUc+RD4h9stUI7t/GnfW8F4VLk AQjtMvKHqqto+zemN7U2/lkzeXukE93ac/XxPqQs50EVnSZcRsplFumvh7PjsAa+SF 5xgPu331hbJAPLpTeBvIR0HNQFAux32Q/dl616VKWKzHONlienAESESHUFStNjQ3ed 3wvzKRLBOFQng== 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 Subject: [PATCH 40/55] samples: v4l2: pci: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:39 +0100 Message-Id: <20231127165454.166373-41-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 v4l2 pci skeleton sample driver use a dma engine and needs a minimum number of buffers 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 --- samples/v4l/v4l2-pci-skeleton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c index a65aa9d1e9da..6018c5e7b3f1 100644 --- a/samples/v4l/v4l2-pci-skeleton.c +++ b/samples/v4l/v4l2-pci-skeleton.c @@ -821,7 +821,7 @@ static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * available before it can be started. The start_streaming() op * won't be called until at least this many buffers are queued up. */ - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; /* * The serialization lock for the streaming ioctls. This is the same * as the main serialization lock, but if some of the non-streaming From patchwork Mon Nov 27 16:54:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747961 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="E54Gv4X2" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B6D910D4; Mon, 27 Nov 2023 08:55:39 -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 2E4396607401; Mon, 27 Nov 2023 16:55:37 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104137; bh=VYpTZfWZN7LbMpiNcOKjYA3Gn8EBNnp4L6ZbmMp3ESA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E54Gv4X2uUv3gUKpau+ZmdPnMvd5bzU47vNGH7HkSinB+yxqdf5SmIc+iHO3GP3EZ f14NOUOEEwIjeuUdXDRCzpFyC8TUnJ+P/6xK+NS2+S/HmGBxECKrBAn+ii2gskTvG+ mLqPI/BkB/b0NGkz2/yH2SrtBI+B2QCuFURV3hnuW2DpoEeQTuStbMdcYutrsQcnru Qrdq8Z6fuVIGm/XXCiXCP6MK8qXlgCJWKpV/j8lw7Bo6CEynC9wNW01qbpZE6qzsrB iQnTsXuWV0uHfWHn4li9LKZ/3B+RndNKHhffIR+8y9ZVUVoeejScIOv3iw0NyTzLta On0k5W+VQExeA== 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 , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu Subject: [PATCH 41/55] media: pci: intel: ipu3: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:40 +0100 Message-Id: <20231127165454.166373-42-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Ipu3 driver use a dma engine and needs a minimum number of buffers 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: Yong Zhi CC: Sakari Ailus CC: Bingbu Cao CC: Dan Scally CC: Tianshu Qiu --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 5d3b0ffd3d08..3a000a682cb0 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1589,7 +1589,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q) vbq->mem_ops = &vb2_dma_sg_memops; vbq->buf_struct_size = sizeof(struct cio2_buffer); vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vbq->min_buffers_needed = 1; + vbq->min_dma_buffers_needed = 1; vbq->drv_priv = cio2; vbq->lock = &q->lock; r = vb2_queue_init(vbq); From patchwork Mon Nov 27 16:54:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747705 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="J82+hXDN" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2E4926A9; Mon, 27 Nov 2023 08:55:39 -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 14A19660738D; Mon, 27 Nov 2023 16:55:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104138; bh=HM7bQJTrYq0xI931RRj+exZg69MbeR6CU1nWD8Ux+n0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J82+hXDNdOP+SagJpnZv37YHnFlwnFOlaRqILeWuFtj4UTpODQiiCXLoHRJMpFxxE TQseQi+Fb8JdftmA3rnrIRSHvbwN7H4s47izIb49/vo5u8p51C9EHhCVbhtUbzDsxY y886IwJB4KRf5I0fMIDCogDzSogPOEgvGPOycf7QjzGSncgxT6R0fWOOQwVGh26nHf eU2d6+t+2Ju5ICKEsFFgqUm2V8J4Afke1g+PCCHrXBYDRtgzpRfQPvZpFqgUgt1QG3 9B1+YAIEWU+WDdP3tRlFpWO6IEjzk/9xBChtGcNV+hAqKsQl63YCRhugv/z50+YPAG ZVqNQ3e/37VTQ== 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 Subject: [PATCH 42/55] media: pci: dt3155: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:41 +0100 Message-Id: <20231127165454.166373-43-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 dt3155 driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/dt3155/dt3155.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c index d09cde2f6ee4..43b44af1e9ca 100644 --- a/drivers/media/pci/dt3155/dt3155.c +++ b/drivers/media/pci/dt3155/dt3155.c @@ -517,7 +517,7 @@ static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id) pd->vidq.ops = &q_ops; pd->vidq.mem_ops = &vb2_dma_contig_memops; pd->vidq.drv_priv = pd; - pd->vidq.min_buffers_needed = 2; + pd->vidq.min_dma_buffers_needed = 2; pd->vidq.gfp_flags = GFP_DMA32; pd->vidq.lock = &pd->mux; /* for locking v4l2_file_operations */ pd->vidq.dev = &pdev->dev; From patchwork Mon Nov 27 16:54:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747960 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Q/wvnA4g" 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 C0C7E26B1; Mon, 27 Nov 2023 08:55:40 -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 C478E6607405; Mon, 27 Nov 2023 16:55:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104139; bh=O6QoqjhfTjZ8fxwdlWAH4p8qUAwUTkwY0GJ5W4xynQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q/wvnA4g8SOzv8+U7u+BimIdh8r0Q9ehMJ/zalV3OCNZ0eaUROvDxJLFCFy/iDvXx Aufoa9+saUnjG8XLitslPMAYIso9fXHIFqY9qXuEp6L3AU6nXoc8V8VVSqW+qGiJ7f AVuaudIEtx/IOqstj9+2TRxrs0edqDy8pC3Ie1Ex6AFoL0gpwGAVhypbUGGLMmpsXA f918axMhhez2P9p5jagX3maoc5/ojg/0wWafSFQBuG0YTAguWtP8LJ/iAagHnFmFTU KWVFZEVzJmWgJPa0ulOFGYGRz0Bw5PpWea7HVF5gobwiSSfP0p/4najE11F6WnBoN/ 1vRO9rY11s7WA== 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 Subject: [PATCH 43/55] media: pci: bt8xx: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:42 +0100 Message-Id: <20231127165454.166373-44-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 bt8xx driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 09a193bb87df..8a3fb30e73f6 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -3094,7 +3094,7 @@ static int vdev_init(struct bttv *btv, struct video_device *vfd, q->gfp_flags = __GFP_DMA32; q->buf_struct_size = sizeof(struct bttv_buffer); q->lock = &btv->lock; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->dev = &btv->c.pci->dev; err = vb2_queue_init(q); if (err) From patchwork Mon Nov 27 16:54:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747704 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Ci+CoOpm" 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 5950C2702; Mon, 27 Nov 2023 08:55:41 -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 7586966073F5; Mon, 27 Nov 2023 16:55:39 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104140; bh=h2KeYZ0zs78nj7d0vzmwSoQJ8cIKIqcfLHmNlVHLLY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ci+CoOpm89HWTnsAVdvkdX99vxMpyqKLn94+lpKM7gMzxF+SPJS3WqYKv/mZU2TVq O9W4L0gGC4BRpAXaTknEUGyNPNEeI43f1YP8AppYo85mEwBLKtk2mwnUKL+9zifDo/ SjANBlpRlZonOp6q1IvOws+sP+bv10Bq0kT353Sr61+DuCmfyTwleJuj6BYg1Kz/qE rIBIuASI0gi6/dOyaesXFMG5+U7XiucqF1LuAAQ7eSgvtlTxiuPd/wFaeVAb0mjfml n3RoOQDHBebGIYvnxa/q2uFwhwPMikEsdl9q++bhIt0fkQXvt585Qxz6aGckbZA8h1 McmAdpU0W5BVw== 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 , Andy Walls Subject: [PATCH 44/55] media: pci: cx18: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:43 +0100 Message-Id: <20231127165454.166373-45-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cx18 driver use a dma engine and needs a minimum number of buffers 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: Andy Walls --- drivers/media/pci/cx18/cx18-streams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index cfbc4a907802..1b66a70c6d6e 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -287,7 +287,7 @@ static int cx18_stream_init(struct cx18 *cx, int type) s->vidq.ops = &cx18_vb2_qops; s->vidq.mem_ops = &vb2_vmalloc_memops; s->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - s->vidq.min_buffers_needed = 2; + s->vidq.min_dma_buffers_needed = 2; s->vidq.gfp_flags = GFP_DMA32; s->vidq.dev = &cx->pci_dev->dev; s->vidq.lock = &cx->serialize_lock; From patchwork Mon Nov 27 16:54:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747959 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="NGkKb169" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AF752708; Mon, 27 Nov 2023 08:55:41 -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 2FCCC660740B; Mon, 27 Nov 2023 16:55:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104140; bh=4e1hOLtYACGxKpv70NswjOrCLbRfh4IuvxjaZ96vjZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NGkKb169X7rS7McuEhNRieeSnHBe1RhG1TOGDwtwHiQKKk1HKBxJ9cbjQUqKc+UCB QXA1QTTgzQ3txXhyrBYh2iTC7A2AIXnm9k79ePfyy9OJiu2MpEtZ6TX+mPtyoCr1CU D9Ju9Hz1z+/o8Jz/r6WndG7yUFKHLgkRqwLsUDfjh4tb0P8msDLpHOqEWY0VdGNDki +rJFSdyavDljNblVB8pFtI9pIrKEnCkK9qYAJYLBk+8CO/HbcO7n3lIz/4W4dMt8Su PN3qzqfQajZT/DuKfVXCZ8ukqmnPn2tigDY2WcBDViPie59Oir9KseYg1hQroogFzD Ji5bHV6aYzYzg== 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 , Martin Tuma Subject: [PATCH 45/55] media: pci: mgb4: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:44 +0100 Message-Id: <20231127165454.166373-46-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 mgb4 driver use a dma engine and needs a minimum number of buffers 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: Martin Tuma --- drivers/media/pci/mgb4/mgb4_vin.c | 2 +- drivers/media/pci/mgb4/mgb4_vout.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb4_vin.c index d72b07b87cd1..89e87aa87341 100644 --- a/drivers/media/pci/mgb4/mgb4_vin.c +++ b/drivers/media/pci/mgb4/mgb4_vin.c @@ -849,7 +849,7 @@ struct mgb4_vin_dev *mgb4_vin_create(struct mgb4_dev *mgbdev, int id) vindev->queue.mem_ops = &vb2_dma_sg_memops; vindev->queue.gfp_flags = GFP_DMA32; vindev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vindev->queue.min_buffers_needed = 2; + vindev->queue.min_dma_buffers_needed = 2; vindev->queue.drv_priv = vindev; vindev->queue.lock = &vindev->lock; vindev->queue.dev = dev; diff --git a/drivers/media/pci/mgb4/mgb4_vout.c b/drivers/media/pci/mgb4/mgb4_vout.c index 857fc7bbd21a..23f0e4fb195f 100644 --- a/drivers/media/pci/mgb4/mgb4_vout.c +++ b/drivers/media/pci/mgb4/mgb4_vout.c @@ -523,7 +523,7 @@ struct mgb4_vout_dev *mgb4_vout_create(struct mgb4_dev *mgbdev, int id) voutdev->queue.mem_ops = &vb2_dma_sg_memops; voutdev->queue.gfp_flags = GFP_DMA32; voutdev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - voutdev->queue.min_buffers_needed = 2; + voutdev->queue.min_dma_buffers_needed = 2; voutdev->queue.drv_priv = voutdev; voutdev->queue.lock = &voutdev->lock; voutdev->queue.dev = dev; From patchwork Mon Nov 27 16:54:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747703 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="cG1bHKwq" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924EB2711; Mon, 27 Nov 2023 08:55:42 -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 E0CCC66073C4; Mon, 27 Nov 2023 16:55:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104141; bh=PRyjDZo6H5GsqtbpHscthGR2/GFV898HsT1KwjvLl4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cG1bHKwq7A65Ykdw7aja37ljE9yrOfjiA4eY+S7Awyo3OWXNWsPApIX3sKuUcborG X08yx6G57GxV8EVnKKYznJdbdWLg7u6ZDA1LXToQc3kRMvxr8t+vKEybtBE0dRqDlV TmFSGspRPhaq2pkmakfHZytJVjB55ZkGhMcg6skfw2P/DxgvDOUSr+Cjb81su3PgR4 18O9aa2wXUkTcCmAeYkGL0vLLjzgWKbvSyaIns+iTnV09V3WBDgcpCfgsSHc0ZVUN2 zy8sP9CewpvLbu1e7rqJF4+EHInrvXRrbISJ9sw8ja93D68qFmwPwOQLKhM1Tl4rc5 CR0z2PcbDz23g== 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 Subject: [PATCH 46/55] media: pci: tw68: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:45 +0100 Message-Id: <20231127165454.166373-47-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 tw68 driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/tw68/tw68-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 79b627ebc92a..b181abe3bfbb 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -952,7 +952,7 @@ int tw68_video_init2(struct tw68_dev *dev, int video_nr) dev->vidq.gfp_flags = __GFP_DMA32 | __GFP_KSWAPD_RECLAIM; dev->vidq.buf_struct_size = sizeof(struct tw68_buf); dev->vidq.lock = &dev->lock; - dev->vidq.min_buffers_needed = 2; + dev->vidq.min_dma_buffers_needed = 2; dev->vidq.dev = &dev->pci->dev; ret = vb2_queue_init(&dev->vidq); if (ret) From patchwork Mon Nov 27 16:54:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747958 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="BQj8M/J1" 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 5E4CC271B; Mon, 27 Nov 2023 08:55:43 -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 90AB966073FF; Mon, 27 Nov 2023 16:55:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104142; bh=Wj8OYs20xhu5X0KjHm+m9uKdirvOmODd8Mcxd+Qt7UA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BQj8M/J1cYgOnIVpoxfsdFlaceRBrewTRf11KfTbkrhsvHQeB5H92rKdqg/NUrZ+Q gNJNzfFnfD+h2IQXpj3PUPGZ30KORSrMSFYpnnurWe58kEnhDYcdtpfKd00j9elUpM 3T5rmuhyuyq+VDQG4J7q0Z8CEi3z2i8Wn3OkQz3357xg7zPqpaV6hYuHqB8u9imSj0 ItI2/9PtQdKLEkQ40eGJy1JWjIC4HGF5qUdG7Z55SwE7oQ5jMa9sdIYLBo/p1bNoCA uYXSn9I1JyfpfZ88yW7Pys1CQDpnYacFxYmUS77kbk8g6rNwh68wB7XqJvhasI4BJN WXSvoToIZbc/g== 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 Subject: [PATCH 47/55] media: pci: cx25821: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:46 +0100 Message-Id: <20231127165454.166373-48-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cx25821 driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/cx25821/cx25821-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 1b80c990cb94..7283a7379ae1 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c @@ -730,7 +730,7 @@ int cx25821_video_register(struct cx25821_dev *dev) q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; q->io_modes |= is_output ? VB2_WRITE : VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = chan; q->buf_struct_size = sizeof(struct cx25821_buffer); q->ops = &cx25821_video_qops; From patchwork Mon Nov 27 16:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747702 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="lrj3kg6h" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 545A72729; Mon, 27 Nov 2023 08:55:44 -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 451956607415; Mon, 27 Nov 2023 16:55:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104142; bh=UHmN7DYDyoab4vSZsrfP/xW1VruJJjAHjGYWzN7yozk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lrj3kg6hVhrAmuJSFfTjyf/6lDbNyCtkyhgOXIk6j/FkIK8Zy0IHpn8WXuTNM14KB P05UGZihh9NRifbhDiEiybUbgDx9I7d3stjIqY6pT2oZy3YLQdlMORzYAw4FSTxupT Ll9Ho2XdIuhHW/p46IcBIXdhEtlds52vOtgt3HSzQ0mEsDXuQaDGwtbgFPHK+6tGn0 ukHY+x0HELnnBBOQ94GhhvO5iPk5YGQb6jOefzF+Gc2bJFXwGhA2TkskLxm75isZ9Q fTgROk3eaPwKLcpJsMLyvnyjS87YrpjE9EgeQqAldgzhCeROl4gYQJephIk3Zlnwyv WFIiXzmPPXV2A== 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 , Bluecherry Maintainers , Anton Sviridenko , Andrey Utkin Subject: [PATCH 48/55] media: pci: tw5864: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:47 +0100 Message-Id: <20231127165454.166373-49-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 tw5864 driver use a dma engine and needs a minimum number of buffers 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: Bluecherry Maintainers CC: Anton Sviridenko CC: Andrey Utkin --- drivers/media/pci/tw5864/tw5864-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c index 197ed8978102..647a57552d4c 100644 --- a/drivers/media/pci/tw5864/tw5864-video.c +++ b/drivers/media/pci/tw5864/tw5864-video.c @@ -1114,7 +1114,7 @@ static int tw5864_video_input_init(struct tw5864_input *input, int video_nr) input->vidq.gfp_flags = 0; input->vidq.buf_struct_size = sizeof(struct tw5864_buf); input->vidq.lock = &input->lock; - input->vidq.min_buffers_needed = 2; + input->vidq.min_dma_buffers_needed = 2; input->vidq.dev = &input->root->pci->dev; ret = vb2_queue_init(&input->vidq); if (ret) From patchwork Mon Nov 27 16:54:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747957 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="A6o2TRtF" 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 CB8E02735; Mon, 27 Nov 2023 08:55:44 -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 18229660741B; Mon, 27 Nov 2023 16:55:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104143; bh=Mxq3P+lsb8M0itZ6b+v4Rn04+ZsLR+XPLGh6cGBX67k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A6o2TRtFR2EShU5r93olb3q5hdHStAddtYo+S3lmkAGcVZfdEzzqMuytXXqwyaMY2 2V/DzYe+wqebU8cH4uTiRvlRpO+aXDNnrCEYo06Yn25Ay4yHcYpL0c8BghEce3KOps OCd00e7eTJDMM5wWlbqDNq5betijXt+89hl9JPOw0MHEwQqB+HhOpTjcOB7s+7tshe Im/EkvZHDNfN5OY/QSt6XVFSdobEVssFksc6DNJvFZ4NNE5vMFhle0nix7TrrgS/ps jrY1vPrPPwUdHtQjP6lQjaAQfnk9ehjRazgczfdawAeVWOH5l4olFj7vgi7rnp8eHf 0mCs4h6bEHolw== 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 , Ezequiel Garcia Subject: [PATCH 49/55] media: pci: tw686x: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:48 +0100 Message-Id: <20231127165454.166373-50-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 tw686x driver use a dma engine and needs a minimum number of buffers 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: Ezequiel Garcia --- drivers/media/pci/tw686x/tw686x-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c index 6bc6d143d18c..8526c200f305 100644 --- a/drivers/media/pci/tw686x/tw686x-video.c +++ b/drivers/media/pci/tw686x/tw686x-video.c @@ -1222,7 +1222,7 @@ int tw686x_video_init(struct tw686x_dev *dev) vc->vidq.ops = &tw686x_video_qops; vc->vidq.mem_ops = dev->dma_ops->mem_ops; vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vc->vidq.min_buffers_needed = 2; + vc->vidq.min_dma_buffers_needed = 2; vc->vidq.lock = &vc->vb_mutex; vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ? GFP_DMA32 : 0; From patchwork Mon Nov 27 16:54:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747701 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="J5d5ZjFG" 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 C10862D46; Mon, 27 Nov 2023 08:55:45 -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 CBA5C660741E; Mon, 27 Nov 2023 16:55:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104144; bh=bl7A7cze/Fs4UDnfd9OCkp+Gbfc6kPJk9SWpxLmJ3Pk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5d5ZjFGg4ROA1NRrXHHuUPO7jXzI0XIeWXJhwb2b+gH6Ie1Qxt2e3cJo0VlSR1oA cX060uC1AeqYvjTfDc1ieeV+yDijP3RktQDbBInFHfANjb+aM8AdPJE/Dd9g+0HEM6 mMRjAQxqxdLd3YyVh0SaD1BZKIzlr/K6tLHlBlRomaMva0rQxESVJROaAZBANZ1A4F xA48dVXi6GRSNdytMp2iMl3m4mN2bl9R7Hpq8kJhaevWRUu4GQnaVbflt/lK4H9ICD fTuMCFhpgt0/vuHOdH17FpoqbwyeG2Q7x2qbUsnzVOuxxPmf15c4iqjC7P8z8f79FA MRRtrxBQM2vrw== 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 Subject: [PATCH 50/55] media: pci: cx88: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:49 +0100 Message-Id: <20231127165454.166373-51-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cx88 driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index c1b41a9283c1..9cb14d661eec 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -1195,7 +1195,7 @@ static int cx8802_blackbird_probe(struct cx8802_driver *drv) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx88_buffer); q->ops = &blackbird_qops; diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index 2087f2491c42..3473e1e93a24 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -1776,7 +1776,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx88_buffer); q->ops = &dvb_qops; diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index c0ef03ed74f9..31eb79bfa547 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -1411,7 +1411,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx88_buffer); q->ops = &cx8800_video_qops; @@ -1428,7 +1428,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, q->type = V4L2_BUF_TYPE_VBI_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx88_buffer); q->ops = &cx8800_vbi_qops; From patchwork Mon Nov 27 16:54:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747954 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="bWEody9R" 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 5E2122D4F; Mon, 27 Nov 2023 08:55:46 -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 817EA6607347; Mon, 27 Nov 2023 16:55:44 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104145; bh=l0yA+tkYAIYjSficENb2r/EZg/4Zvfn7jPg69IDt+aw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWEody9REaxKp+AZdERITTmjwYiVD1Ytqd62b9M8v/RhCAaSJVc6iwbWgDcDoLPBb lcQ3tFAzSdXrsLYlrSUiNTo4XH3cIefIEKLJZHMlnuLzT0dwsU8Vmgmipy/ubVVsWX f4k6jJ5uZfoH60dUcT4Sz7MvwWZiVHQkUsfY+lPznBquUBUAq8kEKsJZyPoG5OguTd bcQA7VIhiku8qWd3MIJGCRRp/lQa493PRxsmtx4VQrMe9BR42iyWG1XxpFX65q+D0H +kUkB1q1EbSiMvmsCH8Kjr1gFeJ9bY7Xrz+ShVx+tWvZKYCODlc7j0xIMOE+qlSMuk b+gg4DqkqqRQQ== 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 Subject: [PATCH 51/55] media: pci: cx23885: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:50 +0100 Message-Id: <20231127165454.166373-52-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cx23885 driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/cx23885/cx23885-417.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- drivers/media/pci/cx23885/cx23885-video.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 434677bd4ad1..44c93484d42c 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1525,7 +1525,7 @@ int cx23885_417_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_qops; diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c index 7551ca4a322a..7509fbda4e18 100644 --- a/drivers/media/pci/cx23885/cx23885-dvb.c +++ b/drivers/media/pci/cx23885/cx23885-dvb.c @@ -2667,7 +2667,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = port; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &dvb_qops; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 9af2c5596121..13c5812a8833 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -1321,7 +1321,7 @@ int cx23885_video_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_video_qops; @@ -1338,7 +1338,7 @@ int cx23885_video_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VBI_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_vbi_qops; From patchwork Mon Nov 27 16:54:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747956 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="UOQJzgrW" 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 A0F0F2D65; Mon, 27 Nov 2023 08:55:47 -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 347576607424; Mon, 27 Nov 2023 16:55:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104145; bh=yBTcY/czjMNBp1trwVXXouYWoMuVcN590O1KG93acxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UOQJzgrWxwOp2sA7iCF9XxZJq7N4qsbIqJgtBVRCKuSPh1OE50mJTPPDxhGrydikf FVleabN0drV801aIkvUbtkOPgQq7uf/pkN15a57SUTqLoK+DBlpFM/TuG2aTYbj2xU Bvtve6HF3qVwu/VINhnqzHZdv7Lugq/X497ztVoEXSZcCxIla8Hi0qNdPjkCDbRfxp 3qqpAb8DYCF3RWXO3IX5Vzq2OePF18K7FX9em/JKY44U7NDYWdi9iuTIRPfxo+mQX3 8rtiaC6AKCuQ1AchXUGqH6HGGn0ygk0F88LSMKGIPSdj/cxwEEhGp+S1yQEGqRDRck 072VCRCO/IUtA== 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 , Corentin Labbe , mjpeg-users@lists.sourceforge.net Subject: [PATCH 52/55] media: pci: zoran: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:51 +0100 Message-Id: <20231127165454.166373-53-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 zoran driver use a dma engine and needs a minimum number of buffers 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: Corentin Labbe CC: mjpeg-users@lists.sourceforge.net --- drivers/media/pci/zoran/zoran_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index fa672cc8bc67..23ed1fdc03df 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c @@ -749,9 +749,6 @@ static int zr_vb2_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsi zr->buf_in_reserve = 0; - if (*nbuffers < vq->min_buffers_needed) - *nbuffers = vq->min_buffers_needed; - if (*nplanes) { if (sizes[0] < size) return -EINVAL; @@ -971,7 +968,7 @@ int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir) vq->mem_ops = &vb2_dma_contig_memops; vq->gfp_flags = GFP_DMA32; vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vq->min_buffers_needed = 9; + vq->min_dma_buffers_needed = 9; vq->lock = &zr->lock; err = vb2_queue_init(vq); if (err) From patchwork Mon Nov 27 16:54:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747700 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="CudTVH0G" 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 643F02D78; Mon, 27 Nov 2023 08:55:48 -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 024756607427; Mon, 27 Nov 2023 16:55:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104146; bh=F5H/xy1t7xG2JnVZwoCdxqoIZwKLuviOUA/LItWXlFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CudTVH0GFVAKjdGuqqvwAJQo6DmaDPbWDIhBKTvy06O6+ZaBHxeVOOtmtNh1Tmoce pArKAwpVjiXPzhu12+CZStv9JKm+zQFThaHzQEwSHyd2VwWb/OPMUOLXtI44geV2nr lXV3xD9cB9VNaerWjiM8bC+RSlX7G0f8nSWn9HB+73763w4mtZZ8k8z7Nqivgf9z3j GVRS9rjsScq1g9+Exg6mQlQpH6olubrhR407oukK8/wk0S0+nLFJweoE++qIdqQ/5+ W6ImZWVz0Vsw5SKHVMspeXI+bKdMGSdhMSe0GdWUXOosAIgF3b0CnY9IBykMOvlPi+ oLBpGHFFim9EQ== 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 Subject: [PATCH 53/55] media: pci: cobalt: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:52 +0100 Message-Id: <20231127165454.166373-54-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 cobalt driver use a dma engine and needs a minimum number of buffers 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 --- drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index 26bf58d17a3d..9e99820f58d4 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -1260,7 +1260,7 @@ static int cobalt_node_register(struct cobalt *cobalt, int node) q->ops = &cobalt_qops; q->mem_ops = &vb2_dma_sg_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->lock = &s->lock; q->dev = &cobalt->pci_dev->dev; vdev->queue = q; From patchwork Mon Nov 27 16:54:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747955 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="MINNiUeo" 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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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); From patchwork Mon Nov 27 16:54:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 747699 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="JKdid/dB" 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 7C56E30CF; 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 9C2C3660742F; Mon, 27 Nov 2023 16:55:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104148; bh=QEqxRu1mY/zwGiIOPG4lnpEEGA62Ed1wsxCNtfbcpMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JKdid/dBmjepTqfqXAYuEvFP40WvHnDGxQJsBMAFXpFVvXjyUI8VOCMePr0y7sr+s n5LH+erX1s5o7qh9DIzZo4AEW/Z20iMI3DaYIZai5jliY6awbDoxbiqJ6veUsW7L3B EcmzTRr97d6HGFq8WG/Z6PrOX/OauRbv45dy7O9PUIPLOCRYu/poZ3+GsNQuHy6ehN /kuNyFjNJKGchrc3L7T6bOmIc0K6WKefJN3UrNJo4qH1Z3ONR7xj+teQJJw3QMEBsg ldHtL8jWHGja2FLxrDM5cEjeGt/gtUx+RubGF1ujSSnaz3d6UZ5CMbzXxbnBX3YV8O K4G/jYILNkZlQ== 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 Subject: [PATCH 55/55] media: videobuf2: core: Remove 'min_buffers_needed' field Date: Mon, 27 Nov 2023 17:54:54 +0100 Message-Id: <20231127165454.166373-56-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After clean up all the drivers it is possible to remove this field from vb2_queue structure. It has been replace by 'min_dma_buffers_needed' which indicates how many buffers a dma engine needs before start streaming and 'min_reqbufs_allocation' to let drivers specify the minimum number of buffers to be allocated when calling VIDIO_REQBUFS Signed-off-by: Benjamin Gaignard --- .../media/common/videobuf2/videobuf2-core.c | 25 ++++++------------- include/media/videobuf2-core.h | 5 ---- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index a6ec55db8635..223521cc135d 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -865,11 +865,10 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, /* * Make sure the requested values and current defaults are sane. */ - num_buffers = max_t(unsigned int, *count, q->min_buffers_needed); if (q->min_reqbufs_allocation) - num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation); + num_buffers = max_t(unsigned int, *count, q->min_reqbufs_allocation); else - num_buffers = max_t(unsigned int, num_buffers, q->min_dma_buffers_needed + 1); + num_buffers = max_t(unsigned int, *count, q->min_dma_buffers_needed + 1); min_reqbufs_needed = num_buffers; num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers); memset(q->alloc_devs, 0, sizeof(q->alloc_devs)); @@ -1851,8 +1850,7 @@ int vb2_core_qbuf(struct vb2_queue *q, struct vb2_buffer *vb, void *pb, * then we can finally call start_streaming(). */ if (q->streaming && !q->start_streaming_called && - ((q->queued_count >= q->min_buffers_needed) || - (q->queued_count >= q->min_dma_buffers_needed))) { + q->queued_count >= q->min_dma_buffers_needed) { ret = vb2_start_streaming(q); if (ret) { /* @@ -2216,12 +2214,6 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type) return -EINVAL; } - if (q_num_bufs < q->min_buffers_needed) { - dprintk(q, 1, "need at least %u allocated buffers\n", - q->min_buffers_needed); - return -EINVAL; - } - if (q_num_bufs < q->min_dma_buffers_needed) { dprintk(q, 1, "need at least %u allocated buffers\n", q->min_dma_buffers_needed); @@ -2236,8 +2228,7 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type) * Tell driver to start streaming provided sufficient buffers * are available. */ - if (q->queued_count >= q->min_buffers_needed && - q->queued_count >= q->min_dma_buffers_needed) { + if (q->queued_count >= q->min_dma_buffers_needed) { ret = vb2_start_streaming(q); if (ret) goto unprepare; @@ -2517,8 +2508,7 @@ int vb2_core_queue_init(struct vb2_queue *q) return -EINVAL; if (WARN_ON(q->max_num_buffers > MAX_BUFFER_INDEX) || - WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers) || - WARN_ON(q->min_buffers_needed > q->max_num_buffers)) + WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers)) return -EINVAL; if (WARN_ON(q->requires_requests && !q->supports_requests)) @@ -2526,14 +2516,13 @@ int vb2_core_queue_init(struct vb2_queue *q) /* * This combination is not allowed since a non-zero value of - * q->min_buffers_needed can cause vb2_core_qbuf() to fail if + * q->min_dma_buffers_needed can cause vb2_core_qbuf() to fail if * it has to call start_streaming(), and the Request API expects * that queueing a request (and thus queueing a buffer contained * in that request) will always succeed. There is no method of * propagating an error back to userspace. */ - if (WARN_ON(q->supports_requests && - (q->min_buffers_needed || q->min_dma_buffers_needed))) + if (WARN_ON(q->supports_requests && q->min_dma_buffers_needed)) return -EINVAL; INIT_LIST_HEAD(&q->queued_list); diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 0bc97f28a7ea..353dccee7a30 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -546,10 +546,6 @@ struct vb2_buf_ops { * @gfp_flags: additional gfp flags used when allocating the buffers. * Typically this is 0, but it may be e.g. %GFP_DMA or %__GFP_DMA32 * to force the buffer allocation to a specific memory zone. - * @min_buffers_needed: the minimum number of buffers needed before - * @start_streaming can be called. Used when a DMA engine - * cannot be started unless at least this number of buffers - * have been queued into the driver. (Deprecated) * @min_dma_buffers_needed: the minimum number of buffers needed before * @start_streaming can be called. Used when a DMA engine * cannot be started unless at least this number of buffers @@ -623,7 +619,6 @@ struct vb2_queue { unsigned int buf_struct_size; u32 timestamp_flags; gfp_t gfp_flags; - u32 min_buffers_needed; u32 min_dma_buffers_needed; u32 min_reqbufs_allocation;