FAILED: patch "[PATCH] media: qcom: camss: vfe: Fix VFE reset while another line is streaming" failed to apply to 5.15-stable tree
Subsystems (5)
Sasha Levin
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x e5d4b0e69a4017fd39354499c9d7583f625f0524
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From e5d4b0e69a4017fd39354499c9d7583f625f0524 Mon Sep 17 00:00:00 2001
From: Hitesh Patel <[email protected]>
Date: Mon, 28 Sep 2026 17:45:05 +0530
Subject: [PATCH] media: qcom: camss: vfe: Fix VFE reset while another line is
streaming
vfe_disable_output() stops the write masters of the line being disabled and then resets the whole VFE. The reset is not limited to that line.
When two lines of one VFE stream at the same time, which is the case whenever a CSID demultiplexes several virtual channels to different RDIs, stopping the first line resets the VFE underneath the second line. The second line's write master configuration is wiped, the buffers it had in flight are never completed, and the VFE is left in a state in which the next global reset is not acknowledged. Stopping or restarting the second line then fails with:
VFE reset timeout
Move the reset to vfe_disable() and do it under stream_lock, as part of the decrement that makes the count reach zero, so that exactly one caller resets and no line can be enabled while the reset runs. Stopping the line's write masters is enough to quiesce that line on its own. With a single line streaming, the reset happens exactly as before.
--- drivers/media/platform/qcom/camss/camss-vfe.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe.c +5 -9
@@ -808,7 +808,7 @@ int vfe_put_output(struct vfe_line *line)return 0 ; } -static int vfe_disable_output (struct vfe_line *line) +static void vfe_disable_output (struct vfe_line *line) {struct vfe_device *vfe =to_vfe (line);struct vfe_output *output = &line->output;
@@ -820,8 +820,6 @@ static int vfe_disable_output(struct vfe_line *line) vfe->res->hw_ops->vfe_wm_stop (vfe, output->wm_idx[i]); output->gen2.active_num =0 ;spin_unlock_irqrestore (&vfe->output_lock, flags); - -return vfe_reset (vfe); }/*
@@ -833,21 +831,19 @@ static int vfe_disable_output(struct vfe_line *line)int vfe_disable (struct vfe_line *line) {struct vfe_device *vfe =to_vfe (line); -int ret; +int ret =0 ; - ret =vfe_disable_output (line); -if (ret) - goto error; +vfe_disable_output (line);vfe_put_output (line);mutex_lock (&vfe->stream_lock); - vfe->stream_count--; +if (--vfe->stream_count ==0 ) + ret =vfe_reset (vfe);mutex_unlock (&vfe->stream_lock); -error:return ret; }
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/6 media: camss: vfe: Don't read hardware version needlessly
From: Robert Foss <[email protected]>
[ Upstream commit 8cc80c606bd1db7febd43d900fc129520580beab ]
vfe_set_power() is invoked a few times, which causes a lot of VFE HW version prints.
Secondly there is no real reason for calling hw_version_read() from this location specifically, since it does nothing more than print the VFE HW version.
A better location for the hw_version_read() call would be somewhere which is only executed once per VFE unit.
Stable-dep-of: e5d4b0e69a40 ("media: qcom: camss: vfe: Fix VFE reset while another line is streaming")
--- drivers/media/platform/qcom/camss/camss-vfe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe.c +1 -2
@@ -714,8 +714,6 @@ static int vfe_set_power(struct v4l2_subdev *sd, int on) ret =vfe_get (vfe);if (ret <0 )return ret; - - vfe->ops->hw_version_read (vfe, vfe->camss->dev); }else {vfe_put (vfe); }
@@ -1302,6 +1300,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,return -EINVAL ; } vfe->ops->subdev_init (dev, vfe); + vfe->ops->hw_version_read (vfe, dev);/* Memory */
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/6 media: camss: vfe: Decrease priority of of VFE HW version to 'dbg'
From: Robert Foss <[email protected]>
[ Upstream commit 2fa698e3da84edc6b7a2d670f8bd5035891a744e ]
The HW Version can in no case represent an error, so change the print priority to 'dbg'.
Stable-dep-of: e5d4b0e69a40 ("media: qcom: camss: vfe: Fix VFE reset while another line is streaming")
--- drivers/media/platform/qcom/camss/camss-vfe-170.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe-170.c +1 -1
@@ -184,7 +184,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev)u32 rev = (hw_version >>16 ) &0xFFF ;u32 step = hw_version &0xFFFF ; -dev_err (dev,"VFE HW Version = %u.%u.%u\n" , gen, rev, step); +dev_dbg (dev,"VFE HW Version = %u.%u.%u\n" , gen, rev, step); }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
drivers/media/platform/qcom/camss/camss-vfe-4-7.c +1 -1
@@ -258,7 +258,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION ); -dev_err (dev,"VFE HW Version = 0x%08x\n" , hw_version); +dev_dbg (dev,"VFE HW Version = 0x%08x\n" , hw_version); }static u16 vfe_get_ub_size (u8 vfe_id)
drivers/media/platform/qcom/camss/camss-vfe-4-8.c +1 -1
@@ -251,7 +251,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION ); -dev_err (dev,"VFE HW Version = 0x%08x\n" , hw_version); +dev_dbg (dev,"VFE HW Version = 0x%08x\n" , hw_version); }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 3/6 media: camss: vfe: Remove vfe_hw_version_read() argument
In reply to Sasha LevinFrom: Robert Foss <[email protected]>
[ Upstream commit 5ad5866737991d83cb4a74a02d0c32a18adb9246 ]
The device argument is not needed, since it is accessible through the vfe_device argument already.
Stable-dep-of: e5d4b0e69a40 ("media: qcom: camss: vfe: Fix VFE reset while another line is streaming")
--- drivers/media/platform/qcom/camss/camss-vfe-170.c | 5 +++-- drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe.h | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe-170.c +3 -2
@@ -176,7 +176,7 @@#define VFE_BUS_WM_FRAME_INC (n) (0x2258 + (n) * 0x100)#define VFE_BUS_WM_BURST_LIMIT (n) (0x225c + (n) * 0x100) -static void vfe_hw_version_read (struct vfe_device *vfe,struct device *dev) +static void vfe_hw_version_read (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_HW_VERSION );
@@ -184,7 +184,8 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev)u32 rev = (hw_version >>16 ) &0xFFF ;u32 step = hw_version &0xFFFF ; -dev_dbg (dev,"VFE HW Version = %u.%u.%u\n" , gen, rev, step); +dev_dbg (vfe->camss->dev,"VFE HW Version = %u.%u.%u\n" , + gen, rev, step); }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
drivers/media/platform/qcom/camss/camss-vfe-4-1.c +2 -2
@@ -210,11 +210,11 @@#define MSM_VFE_VFE0_UB_SIZE 1023#define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe,struct device *dev) +static void vfe_hw_version_read (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION ); -dev_dbg (dev,"VFE HW Version = 0x%08x\n" , hw_version); +dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); }static u16 vfe_get_ub_size (u8 vfe_id)
drivers/media/platform/qcom/camss/camss-vfe-4-7.c +2 -2
@@ -254,11 +254,11 @@#define MSM_VFE_VFE1_UB_SIZE 1535#define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe,struct device *dev) +static void vfe_hw_version_read (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION ); -dev_dbg (dev,"VFE HW Version = 0x%08x\n" , hw_version); +dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); }static u16 vfe_get_ub_size (u8 vfe_id)
drivers/media/platform/qcom/camss/camss-vfe-4-8.c +2 -2
@@ -247,11 +247,11 @@#define MSM_VFE_VFE1_UB_SIZE 1535#define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe,struct device *dev) +static void vfe_hw_version_read (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION ); -dev_dbg (dev,"VFE HW Version = 0x%08x\n" , hw_version); +dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
drivers/media/platform/qcom/camss/camss-vfe.c +1 -1
@@ -1300,7 +1300,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,return -EINVAL ; } vfe->ops->subdev_init (dev, vfe); - vfe->ops->hw_version_read (vfe, dev); + vfe->ops->hw_version_read (vfe);/* Memory */
drivers/media/platform/qcom/camss/camss-vfe.h +1 -1
@@ -103,7 +103,7 @@ struct vfe_device;struct vfe_hw_ops {void (*enable_irq_common)(struct vfe_device *vfe);void (*global_reset)(struct vfe_device *vfe); -void (*hw_version_read)(struct vfe_device *vfe,struct device *dev); +void (*hw_version_read)(struct vfe_device *vfe);irqreturn_t (*isr)(int irq,void *dev);void (*isr_read)(struct vfe_device *vfe,u32 *value0,u32 *value1);void (*pm_domain_off)(struct vfe_device *vfe);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 4/6 media: camss: vfe: Rework vfe_hw_version_read() function definition
In reply to Sasha LevinFrom: Robert Foss <[email protected]>
[ Upstream commit d2e86540366e1701baf852ee0301323ff113459c ]
Expose the VFE version by returning the value read from the HW_VERSION register.
Secondly, change the name of this function to conform with the CSID equivalent.
Stable-dep-of: e5d4b0e69a40 ("media: qcom: camss: vfe: Fix VFE reset while another line is streaming")
--- drivers/media/platform/qcom/camss/camss-vfe-170.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe.h | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe-170.c +4 -2
@@ -176,7 +176,7 @@#define VFE_BUS_WM_FRAME_INC (n) (0x2258 + (n) * 0x100)#define VFE_BUS_WM_BURST_LIMIT (n) (0x225c + (n) * 0x100) -static void vfe_hw_version_read (struct vfe_device *vfe) +static u32 vfe_hw_version (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_HW_VERSION );
@@ -186,6 +186,8 @@ static void vfe_hw_version_read(struct vfe_device *vfe)dev_dbg (vfe->camss->dev,"VFE HW Version = %u.%u.%u\n" , gen, rev, step); + +return hw_version; }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
@@ -745,7 +747,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)const struct vfe_hw_ops vfe_ops_170 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off,
drivers/media/platform/qcom/camss/camss-vfe-4-1.c +4 -2
@@ -210,11 +210,13 @@#define MSM_VFE_VFE0_UB_SIZE 1023#define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe) +static u32 vfe_hw_version (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION );dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); + +return hw_version; }static u16 vfe_get_ub_size (u8 vfe_id)
@@ -1004,7 +1006,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)const struct vfe_hw_ops vfe_ops_4_1 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off,
drivers/media/platform/qcom/camss/camss-vfe-4-7.c +4 -2
@@ -254,11 +254,13 @@#define MSM_VFE_VFE1_UB_SIZE 1535#define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe) +static u32 vfe_hw_version (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION );dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); + +return hw_version; }static u16 vfe_get_ub_size (u8 vfe_id)
@@ -1196,7 +1198,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)const struct vfe_hw_ops vfe_ops_4_7 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off,
drivers/media/platform/qcom/camss/camss-vfe-4-8.c +4 -2
@@ -247,11 +247,13 @@#define MSM_VFE_VFE1_UB_SIZE 1535#define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read (struct vfe_device *vfe) +static u32 vfe_hw_version (struct vfe_device *vfe) {u32 hw_version =readl_relaxed (vfe->base +VFE_0_HW_VERSION );dev_dbg (vfe->camss->dev,"VFE HW Version = 0x%08x\n" , hw_version); + +return hw_version; }static inline void vfe_reg_clr (struct vfe_device *vfe,u32 reg,u32 clr_bits)
@@ -1180,7 +1182,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)const struct vfe_hw_ops vfe_ops_4_8 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off,
drivers/media/platform/qcom/camss/camss-vfe.c +1 -1
@@ -1300,7 +1300,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,return -EINVAL ; } vfe->ops->subdev_init (dev, vfe); - vfe->ops->hw_version_read (vfe); + vfe->ops->hw_version (vfe);/* Memory */
drivers/media/platform/qcom/camss/camss-vfe.h +1 -1
@@ -103,7 +103,7 @@ struct vfe_device;struct vfe_hw_ops {void (*enable_irq_common)(struct vfe_device *vfe);void (*global_reset)(struct vfe_device *vfe); -void (*hw_version_read)(struct vfe_device *vfe); +u32 (*hw_version)(struct vfe_device *vfe);irqreturn_t (*isr)(int irq,void *dev);void (*isr_read)(struct vfe_device *vfe,u32 *value0,u32 *value1);void (*pm_domain_off)(struct vfe_device *vfe);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 5/6 media: qcom: camss: Move vfe_disable into a common routine where applicable
In reply to Sasha LevinFrom: Bryan O'Donoghue <[email protected]>
[ Upstream commit 90cc4555730bfd0fc6af5c8a5a81d80bfce4cff7 ]
We can move vfe_disable() into a common routine in the core VFE file provided we make wm_stop() a VFE specific callback.
The callback is required to capture the case where VFE 17x currently isn't VC enabled where as VFE 480 is.
Omit the VFE 480 conversion because that backend is absent. Include the upstream reset-error propagation in vfe_disable() so the follow-up reset-ordering fix applies cleanly.
Stable-dep-of: e5d4b0e69a40 ("media: qcom: camss: vfe: Fix VFE reset while another line is streaming")
--- .../media/platform/qcom/camss/camss-vfe-170.c | 40 +---------------- drivers/media/platform/qcom/camss/camss-vfe.c | 43 +++++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe.h | 9 ++++ 3 files changed, 53 insertions(+), 39 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe-170.c +1 -39
@@ -499,22 +499,6 @@ static int vfe_enable_output(struct vfe_line *line)return 0 ; } -static void vfe_disable_output (struct vfe_line *line) -{ -struct vfe_device *vfe =to_vfe (line); -struct vfe_output *output = &line->output; -unsigned long flags; -unsigned int i; - -spin_lock_irqsave (&vfe->output_lock, flags); -for (i =0 ; i < output->wm_num; i++) -vfe_wm_stop (vfe, output->wm_idx[i]); - output->gen2.active_num =0 ; -spin_unlock_irqrestore (&vfe->output_lock, flags); - -vfe_reset (vfe); -} -/* * vfe_enable - Enable streaming on VFE line * @line: VFE line
@@ -560,29 +544,6 @@ static int vfe_enable(struct vfe_line *line)return ret; } -/* -* vfe_disable - Disable streaming on VFE line -* @line: VFE line -* -* Return 0 on success or a negative error code otherwise -*/ -static int vfe_disable (struct vfe_line *line) -{ -struct vfe_device *vfe =to_vfe (line); - -vfe_disable_output (line); - -vfe_put_output (line); - -mutex_lock (&vfe->stream_lock); - - vfe->stream_count--; - -mutex_unlock (&vfe->stream_lock); - -return 0 ; -} -/* * vfe_isr_sof - Process start of frame interrupt * @vfe: VFE Device
@@ -759,4 +720,5 @@ const struct vfe_hw_ops vfe_ops_170 = { .vfe_enable = vfe_enable, .vfe_halt = vfe_halt, .violation_read = vfe_violation_read, + .vfe_wm_stop = vfe_wm_stop, };
drivers/media/platform/qcom/camss/camss-vfe.c +43 -0
49 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.h +9 -0
@@ -116,6 +116,7 @@ struct vfe_hw_ops {int (*vfe_enable)(struct vfe_line *line);int (*vfe_halt)(struct vfe_device *vfe);void (*violation_read)(struct vfe_device *vfe); +void (*vfe_wm_stop)(struct vfe_device *vfe,u8 wm); };struct vfe_isr_ops {
@@ -197,6 +198,14 @@ int vfe_reserve_wm(struct vfe_device *vfe, enum vfe_line_id line_id);*/ int vfe_reset (struct vfe_device *vfe); +/* +* vfe_disable - Disable streaming on VFE line +* @line: VFE line +* +* Return 0 on success or a negative error code otherwise +*/ +int vfe_disable (struct vfe_line *line); +extern const struct vfe_hw_ops vfe_ops_4_1;extern const struct vfe_hw_ops vfe_ops_4_7;extern const struct vfe_hw_ops vfe_ops_4_8;
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 6/6 media: qcom: camss: vfe: Fix VFE reset while another line is streaming
In reply to Sasha LevinFrom: Hitesh Patel <[email protected]>
[ Upstream commit e5d4b0e69a4017fd39354499c9d7583f625f0524 ]
vfe_disable_output() stops the write masters of the line being disabled and then resets the whole VFE. The reset is not limited to that line.
When two lines of one VFE stream at the same time, which is the case whenever a CSID demultiplexes several virtual channels to different RDIs, stopping the first line resets the VFE underneath the second line. The second line's write master configuration is wiped, the buffers it had in flight are never completed, and the VFE is left in a state in which the next global reset is not acknowledged. Stopping or restarting the second line then fails with:
VFE reset timeout
Move the reset to vfe_disable() and do it under stream_lock, as part of the decrement that makes the count reach zero, so that exactly one caller resets and no line can be enabled while the reset runs. Stopping the line's write masters is enough to quiesce that line on its own. With a single line streaming, the reset happens exactly as before.
--- drivers/media/platform/qcom/camss/camss-vfe.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe.c +5 -9
@@ -405,7 +405,7 @@ int vfe_put_output(struct vfe_line *line)return 0 ; } -static int vfe_disable_output (struct vfe_line *line) +static void vfe_disable_output (struct vfe_line *line) {struct vfe_device *vfe =to_vfe (line);struct vfe_output *output = &line->output;
@@ -417,8 +417,6 @@ static int vfe_disable_output(struct vfe_line *line) vfe->ops->vfe_wm_stop (vfe, output->wm_idx[i]); output->gen2.active_num =0 ;spin_unlock_irqrestore (&vfe->output_lock, flags); - -return vfe_reset (vfe); }/*
@@ -430,21 +428,19 @@ static int vfe_disable_output(struct vfe_line *line)int vfe_disable (struct vfe_line *line) {struct vfe_device *vfe =to_vfe (line); -int ret; +int ret =0 ; - ret =vfe_disable_output (line); -if (ret) - goto error; +vfe_disable_output (line);vfe_put_output (line);mutex_lock (&vfe->stream_lock); - vfe->stream_count--; +if (--vfe->stream_count ==0 ) + ret =vfe_reset (vfe);mutex_unlock (&vfe->stream_lock); -error:return ret; }
Signature · 1 line
2.53.0