[PATCH v3 4/7] media: qcom: camss: Match VFE lite clocks by name prefix
From: Andrew Gigena via B4 Relay
Date: Fri Nov 06 2026 - 13:37:29 EST
From: Andrew Gigena <mail@xxxxxxxxxxxxxxxx>
vfe_match_clock_names() builds the expected lite clock name from
vfe->id, but vfe->id is the index of the VFE in the resources array.
On SoCs where the lite VFEs come after the full VFEs, the generated
name is vfe_lite2, vfe_lite3, ... and never matches the actual
vfe_lite0/vfe_lite1 clocks, so their rates are never programmed.
Restrict the new prefix match to numbered "vfe_liteN" clocks (digit
check) to avoid matching aux clocks, leaving the pre-existing
vfe_lite_name and bare "vfe_lite" matches unchanged.
This affects SM8150, SC7280 and SC8280XP. On a Pixel 4 (SM8150),
streaming through VFE-lite0 left cam_cc_ife_lite_0_clk at 19.2 MHz and
failed with "VFE reset timeout".
Signed-off-by: Andrew Gigena <mail@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/camss/camss-vfe.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 2680a9914765..29e04d097116 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -9,6 +9,7 @@
*/
#include <linux/clk.h>
#include <linux/completion.h>
+#include <linux/ctype.h>
#include <linux/interrupt.h>
#include <linux/iommu.h>
#include <linux/mutex.h>
@@ -346,6 +347,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code,
case CAMSS_6350:
case CAMSS_7280:
case CAMSS_8x96:
+ case CAMSS_8150:
case CAMSS_8250:
case CAMSS_8280XP:
case CAMSS_8300:
@@ -914,6 +916,9 @@ static int vfe_match_clock_names(struct vfe_device *vfe,
return (!strcmp(clock->name, vfe_name) ||
!strcmp(clock->name, vfe_lite_name) ||
!strcmp(clock->name, "vfe_lite") ||
+ (vfe->res->is_lite &&
+ !strncmp(clock->name, "vfe_lite", 8) &&
+ isdigit((unsigned char)clock->name[8])) ||
!strcmp(clock->name, "camnoc_axi") ||
!strcmp(clock->name, "camnoc_rt_axi"));
}
@@ -2006,6 +2011,7 @@ static int vfe_bpl_align_rdi(struct vfe_device *vfe)
case CAMSS_6150:
case CAMSS_6350:
case CAMSS_7280:
+ case CAMSS_8150:
case CAMSS_8250:
case CAMSS_8280XP:
case CAMSS_8300:
--
2.56.0