@@ -341,14 +341,16 @@ static int ipu_smfc_link_setup(struct media_entity *entity,
const struct media_pad *remote, u32 flags)
{
struct ipu_soc *ipu = to_ipu(entity);
- const struct ipu_link *link;
+ const struct ipu_link *link = NULL;
const struct ipu_pad *pad;
u32 mask, sel = FS_SEL_ARM;
int csi, smfc;
- link = ipu_find_link(ipu, local, remote);
- if (!link)
- return ipu_invalid_link(ipu, local, remote);
+ if (remote->entity->type != MEDIA_ENT_T_DEVNODE_V4L) {
+ link = ipu_find_link(ipu, local, remote);
+ if (!link)
+ return ipu_invalid_link(ipu, local, remote);
+ }
if (local->flags & MEDIA_PAD_FL_SINK) {
/* SMFC_MAP_CHx */
@@ -371,7 +373,7 @@ static int ipu_smfc_link_setup(struct media_entity *entity,
/* SMFCx_DEST_SEL */
pad = &ipu_entities[ipu_entity(ipu, entity)].pads[local->index];
mask = pad->mask << pad->offset;
- if (flags & MEDIA_LNK_FL_ENABLED)
+ if (link && (flags & MEDIA_LNK_FL_ENABLED))
sel = link->dest_sel << pad->offset;
ipu_cm_update_bits(ipu, IPU_FS_PROC_FLOW3, mask, sel);