Hi Sakari,
On 05.12.2012 00:22, Sakari Ailus wrote:
Hi Andrzej,
On Fri, Nov 23, 2012 at 04:22:30PM +0100, Andrzej Hajda wrote:
Function support variable number of subdevs in pipe-line.
Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
drivers/media/platform/s5p-fimc/fimc-capture.c | 100 +++++++++++++++---------
1 file changed, 64 insertions(+), 36 deletions(-)
diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
index 3acbea3..39c4555 100644
--- a/drivers/media/platform/s5p-fimc/fimc-capture.c
+++ b/drivers/media/platform/s5p-fimc/fimc-capture.c
@@ -794,6 +794,21 @@ static int fimc_cap_enum_fmt_mplane(struct file *file, void *priv,
return 0;
}
+static struct media_entity *fimc_pipeline_get_head(struct media_entity *me)
+{
+ struct media_pad *pad = &me->pads[0];
+
+ while (!(pad->flags & MEDIA_PAD_FL_SOURCE)) {
+ pad = media_entity_remote_source(pad);
+ if (!pad)
+ break;
Isn't it an error if a sink pad of the entity isn't connected?
media_entity_remote_source(pad) returns NULL if the link is disabled. I'm
just wondering if this is possible.
AFAIK documentation says nothing about it and current media_entity
implementation
accepts pipelines with pads without active links.
In fact during s5c73m3 sensor development I have successfully used such
pipeline as a temporary solution.
+ me = pad->entity;
+ pad = &me->pads[0];
+ }
+
+ return me;
+}
+
Regards
Andrzej
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html