1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0652-media-rp1-cfe-Fail-streaming-if-FE_CONFIG-node-is-no.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

36 lines
1.3 KiB
Diff

From bffad37e28b7c39543847568664635514f5a2533 Mon Sep 17 00:00:00 2001
From: Naushir Patuck <naush@raspberrypi.com>
Date: Wed, 4 Oct 2023 09:39:59 +0100
Subject: [PATCH 0652/1002] media: rp1: cfe: Fail streaming if FE_CONFIG node
is not enabled
When the FE is enabled, ensure that the FE_CONFIG node is enabled.
Otherwise fail cfe_start_streaming() entirely.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
index 8478b879d47c..7e0a667c1518 100644
--- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
+++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
@@ -997,6 +997,14 @@ static int cfe_start_streaming(struct vb2_queue *vq, unsigned int count)
goto err_streaming;
}
+ /* When using the Frontend, we must enable the FE_CONFIG node. */
+ if (is_fe_enabled(cfe) &&
+ !check_state(cfe, NODE_ENABLED, cfe->node[FE_CONFIG].id)) {
+ cfe_err("FE enabled, but FE_CONFIG node is not\n");
+ ret = -EINVAL;
+ goto err_streaming;
+ }
+
ret = media_pipeline_start(&node->pad, &cfe->pipe);
if (ret < 0) {
cfe_err("Failed to start media pipeline: %d\n", ret);
--
2.44.0