1 From 3e2203b265ddd8630fea0fbb69b3a2ec1496f773 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Wed, 4 Oct 2023 09:39:59 +0100
4 Subject: [PATCH] media: rp1: cfe: Fail streaming if FE_CONFIG node is not
7 When the FE is enabled, ensure that the FE_CONFIG node is enabled.
8 Otherwise fail cfe_start_streaming() entirely.
10 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
12 drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 8 ++++++++
13 1 file changed, 8 insertions(+)
15 --- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
16 +++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
17 @@ -997,6 +997,14 @@ static int cfe_start_streaming(struct vb
21 + /* When using the Frontend, we must enable the FE_CONFIG node. */
22 + if (is_fe_enabled(cfe) &&
23 + !check_state(cfe, NODE_ENABLED, cfe->node[FE_CONFIG].id)) {
24 + cfe_err("FE enabled, but FE_CONFIG node is not\n");
29 ret = media_pipeline_start(&node->pad, &cfe->pipe);
31 cfe_err("Failed to start media pipeline: %d\n", ret);