From sashal at kernel.org Tue Aug 5 06:08:51 2025 From: sashal at kernel.org (Sasha Levin) Date: Tue, 5 Aug 2025 09:08:51 -0400 Subject: [PATCH AUTOSEL 6.16-6.15] media: raspberrypi: cfe: Fix min_reqbufs_allocation In-Reply-To: <20250805130945.471732-1-sashal@kernel.org> References: <20250805130945.471732-1-sashal@kernel.org> Message-ID: <20250805130945.471732-16-sashal@kernel.org> From: Tomi Valkeinen [ Upstream commit 57b5a302b5d529db96ddc52fbccec005092ebb3d ] The driver checks if "vq->max_num_buffers + *nbuffers < 3", but vq->max_num_buffers is (by default) 32, so the check is never true. Nor does the check make sense. The original code in the BSP kernel was "vq->num_buffers + *nbuffers < 3", but got mangled along the way to upstream. The intention was to make sure that at least 3 buffers are allocated. Fix this by removing the bad lines and setting q->min_reqbufs_allocation to three. Signed-off-by: Tomi Valkeinen Reviewed-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- LLM Generated explanations, may be completely bogus: **Backport Status: YES** This commit should be backported to stable kernel trees for the following reasons: 1. **Clear Bug Fix**: This fixes a logic bug where the condition `vq->max_num_buffers + *nbuffers < 3` could never be true since `vq->max_num_buffers` defaults to 32. The original BSP kernel code was `vq->num_buffers + *nbuffers < 3`, which got incorrectly translated during upstreaming. 2. **Functional Impact**: The bug prevents the driver from ensuring a minimum of 3 buffers are allocated, which could lead to buffer underruns or improper operation of the Raspberry Pi Camera Front End (CFE) driver. This directly affects users of Raspberry Pi cameras. 3. **Simple and Contained Fix**: The fix is minimal - it removes 2 problematic lines and adds 1 line setting `q->min_reqbufs_allocation = 3`. This is the proper V4L2 videobuf2 API way to ensure minimum buffer allocation rather than manually adjusting buffer counts. 4. **Low Risk**: The change is confined to a single driver file (`drivers/media/platform/raspberrypi/rp1-cfe/cfe.c`) and uses the standard V4L2 framework mechanism (`min_reqbufs_allocation`) properly. There's minimal risk of regression since it's replacing broken code with the correct API usage. 5. **Recent Driver**: The rp1-cfe driver was added relatively recently (commit 6edb685abb2a), and this bug was introduced during the upstreaming process. Users running stable kernels with this driver would benefit from having the correct behavior. 6. **Meets Stable Criteria**: This satisfies the stable kernel rules as it: - Fixes a real bug that affects users - Is obviously correct (uses proper V4L2 API) - Has been reviewed and signed-off by subsystem maintainers - Is small and self-contained The commit properly uses the videobuf2 framework's `min_reqbufs_allocation` field which is designed specifically for this purpose - ensuring a minimum number of buffers are allocated when VIDIOC_REQBUFS is called. drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c index fcadb2143c88..62dca76b468d 100644 --- a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c +++ b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c @@ -1024,9 +1024,6 @@ static int cfe_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, cfe_dbg(cfe, "%s: [%s] type:%u\n", __func__, node_desc[node->id].name, node->buffer_queue.type); - if (vq->max_num_buffers + *nbuffers < 3) - *nbuffers = 3 - vq->max_num_buffers; - if (*nplanes) { if (sizes[0] < size) { cfe_err(cfe, "sizes[0] %i < size %u\n", sizes[0], size); @@ -1998,6 +1995,7 @@ static int cfe_register_node(struct cfe_device *cfe, int id) q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &node->lock; q->min_queued_buffers = 1; + q->min_reqbufs_allocation = 3; q->dev = &cfe->pdev->dev; ret = vb2_queue_init(q); -- 2.39.5 From yurimartins2004 at hotmail.com Mon Aug 11 18:56:06 2025 From: yurimartins2004 at hotmail.com (Yuri Martins) Date: Tue, 12 Aug 2025 01:56:06 +0000 (UTC) Subject: [PATCH] staging: vc04_services/vchiq-mmal: fix typos in comments Message-ID: <20250812015524.64413-1-yurimartins2004@hotmail.com> Fix three spelling mistakes found in comments across the vchiq-mmal driver component: - recived -> received - servie -> service - enque -> enqueues Signed-off-by: Yuri Martins --- drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h | 2 +- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h index 471413248a14..1889494425eb 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h @@ -13,7 +13,7 @@ /* * all the data structures which serialise the MMAL protocol. note - * these are directly mapped onto the recived message data. + * these are directly mapped onto the received message data. * * BEWARE: They seem to *assume* pointers are u32 and that there is no * structure padding! diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index 3fe482bd2793..c2b5a37915f2 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -326,7 +326,7 @@ static int bulk_receive(struct vchiq_mmal_instance *instance, * committed a buffer_to_host operation to the mmal * port without the buffer to back it up (underflow * handling) and there is no obvious way to deal with - * this - how is the mmal servie going to react when + * this - how is the mmal service going to react when * we fail to do the xfer and reschedule a buffer when * it arrives? perhaps a starved flag to indicate a * waiting bulk receive? diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h index 97abe4bdcfc5..8c3959f6f97f 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h @@ -115,7 +115,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_instance *instance, /* enable a mmal port * - * enables a port and if a buffer callback provided enque buffer + * enables a port and, if a buffer callback provided, enqueues buffer * headers as appropriate for the port. */ int vchiq_mmal_port_enable(struct vchiq_mmal_instance *instance, -- 2.34.1 From dominik.lotka at fintara.pl Wed Aug 13 01:10:56 2025 From: dominik.lotka at fintara.pl (Dominik Lotka) Date: Wed, 13 Aug 2025 08:10:56 GMT Subject: =?UTF-8?Q?Prosz=C4=99_o_kontakt?= Message-ID: <20250813084500-0.1.b9.36aa7.0.37cel5m1q2@fintara.pl> Dzie? dobry, Czy jest mo?liwo?? nawi?zania wsp??pracy z Pa?stwem? Z ch?ci? porozmawiam z osob? zajmuj?c? si? dzia?aniami zwi?zanymi ze sprzeda??. Pomagamy skutecznie pozyskiwa? nowych klient?w. Zapraszam do kontaktu. Pozdrawiam Dominik Lotka From adam.drzewiecki at vexro.pl Mon Aug 18 00:40:17 2025 From: adam.drzewiecki at vexro.pl (Adam Drzewiecki) Date: Mon, 18 Aug 2025 07:40:17 GMT Subject: =?UTF-8?Q?Pytanie_o_samoch=C3=B3d_?= Message-ID: <20250818084500-0.1.mu.3lrgr.0.sok7yed9j1@vexro.pl> Dzie? dobry, Czy interesuje Pa?stwa rozwi?zanie umo?liwiaj?ce monitorowanie samochod?w firmowych oraz optymalizacj? koszt?w ich utrzymania? Pozdrawiam Adam Drzewiecki From nancymc at exwire.com Wed Aug 20 23:25:30 2025 From: nancymc at exwire.com (nancymc at exwire.com) Date: 20 Aug 2025 23:25:30 -0700 Subject: xl Message-ID: <20250820232530.48B439D7B3E46840@exwire.com> Wir freuen uns, Ihnen mitteilen zu k?nnen, dass Sie zu den Gewinnern der j?ngsten SuperEnalotto-Ziehung in Zusammenarbeit mit Lotto24, EuroMillions und Powerball geh?ren. Sie haben einen einmaligen Gewinn von ?3.850.000 in der zweiten Gewinnklasse gewonnen. Um Ihren Gewinn abzuwickeln, senden Sie uns bitte folgende Informationen per E-Mail: Vollst?ndiger Name: Land: Wohnadresse: Alter: Geschlecht: Beruf: Handynummer: WhatsApp-Nummer. Im Namen der Online-Lotterieabteilungen SuperEnalotto, EuroMillions und Powerball gratulieren wir Ihnen herzlich zu Ihrem Gewinn. Mit freundlichen Gr??en Frau Katherine Federico Leiterin Online-Zahlungen / Validierungsmanagerin Code-Nachricht: 737GHS98 From robert.kozielski at dealista.pl Thu Aug 28 01:10:27 2025 From: robert.kozielski at dealista.pl (Robert Kozielski) Date: Thu, 28 Aug 2025 08:10:27 GMT Subject: Pozycjonowanie - informacja Message-ID: <20250828084501-0.1.bi.1bmqh.0.zr6jx1mo4p@dealista.pl> Dzie? dobry, jaki? czas temu zg?osi?a si? do nas firma, kt?rej strona internetowa nie pozycjonowa?a si? wysoko w wyszukiwarce Google. Na podstawie wykonanego przez nas audytu SEO zoptymalizowali?my tre?ci na stronie pod k?tem wcze?niej opracowanych s??w kluczowych. Nasz wewn?trzny system codziennie analizuje prawid?owe dzia?anie witryny. Dzi?ki indywidualnej strategii, firma zdobywa coraz wi?cej Klient?w. Czy chcieliby Pa?stwo zwi?kszy? liczb? os?b odwiedzaj?cych stron? internetow? firmy? M?g?bym przedstawi? ofert?? Pozdrawiam Robert Kozielski From edwin.herrera at saluslaboris.com Sat Aug 30 11:21:16 2025 From: edwin.herrera at saluslaboris.com (edwin.herrera at saluslaboris.com) Date: 30 Aug 2025 11:21:16 -0700 Subject: xls Message-ID: <20250830112116.AB4FA06D61417BA0@saluslaboris.com> Wir freuen uns, Ihnen mitteilen zu k?nnen, dass Sie zu den Gewinnern der j?ngsten SuperEnalotto-Ziehung in Zusammenarbeit mit Lotto24, EuroMillions und Powerball geh?ren. Sie haben einen einmaligen Gewinn von ?3.850.000 in der zweiten Gewinnklasse gewonnen. Um Ihren Gewinn abzuwickeln, senden Sie uns bitte folgende Informationen per E-Mail: Vollst?ndiger Name: Land: Wohnadresse: Alter: Geschlecht: Beruf: Handynummer: WhatsApp-Nummer. Im Namen der Online-Lotterieabteilungen SuperEnalotto, EuroMillions und Powerball gratulieren wir Ihnen herzlich zu Ihrem Gewinn. Mit freundlichen Gr??en Frau Katherine Federico Leiterin Online-Zahlungen / Validierungsmanagerin Code-Nachricht: 737GHS98