[PATCH 27/74] media: qcom: camss: vfe: Move legacy VFE bus client assignment to msm_vfe_subdev_init
From: Bryan O'Donoghue
Date: Mon Oct 05 2026 - 13:35:26 EST
Initialising core elements of a logical structure shouldn't be done in
get(). For the fixed RDI logic assigning the write-index in get() is 100%
redundant. For the expanded PIX path the assignment itself will be wrong.
Move the legacy assignment out of get() and into subdev_init().
Signed-off-by: Bryan O'Donoghue <bod@xxxxxxxxxx>
---
drivers/media/platform/qcom/camss/camss-vfe.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 667cda379be44..35ab3203d75af 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -802,13 +802,6 @@ int vfe_get_output_v2(struct vfe_line *line)
goto error;
}
- output->wm_num = 1;
-
- /* Correspondence between VFE line number and WM number.
- * line 0 -> RDI 0, line 1 -> RDI1, line 2 -> RDI2, line 3 -> PIX/RDI3
- * Note this 1:1 mapping will not work for PIX streams.
- */
- output->wm[0].bus_client = line->id;
vfe->wm_output_map[line->id] = line->id;
output->drop_update_idx = 0;
@@ -2054,6 +2047,9 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
l->num_outputs = 1;
l->output[0].line = l;
+ l->output[0].wm_num = 1;
+ l->output[0].wm[0].bus_client = l->id;
+
init_completion(&l->output[0].sof);
init_completion(&l->output[0].reg_update);
@@ -2064,6 +2060,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
l->nformats = res->vfe.formats_rdi->nformats;
l->formats = res->vfe.formats_rdi->formats;
}
+
}
vfe->res->hw_ops->subdev_init(dev, vfe);
--
2.55.0