bcm27xx: update 6.1 patches to latest version
[openwrt/staging/svanheule.git] / target / linux / bcm27xx / patches-6.1 / 950-1010-media-rp1-cfe-Fail-streaming-if-FE_CONFIG-node-is-no.patch
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
5 enabled
6
7 When the FE is enabled, ensure that the FE_CONFIG node is enabled.
8 Otherwise fail cfe_start_streaming() entirely.
9
10 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
11 ---
12 drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 8 ++++++++
13 1 file changed, 8 insertions(+)
14
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
18 goto err_streaming;
19 }
20
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");
25 + ret = -EINVAL;
26 + goto err_streaming;
27 + }
28 +
29 ret = media_pipeline_start(&node->pad, &cfe->pipe);
30 if (ret < 0) {
31 cfe_err("Failed to start media pipeline: %d\n", ret);