From 5dd8775dc6b480f67be11108d7cd798fba724cab Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Wed, 16 Dec 2015 11:32:21 -0200 Subject: [media] media: Move media graph state for streamon/off to the pipeline The struct media_entity_graph was allocated in the stack, limiting the number of entities that could be reasonably allocated. Instead, move the struct to struct media_pipeline which is typically allocated using kmalloc() instead. The intent is to keep the enumeration around for later use for the duration of the streaming. As streaming is eventually stopped, an unfortunate memory allocation failure would prevent stopping the streaming. As no memory will need to be allocated, the problem is avoided altogether. Signed-off-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- include/media/media-entity.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/media/media-entity.h') diff --git a/include/media/media-entity.h b/include/media/media-entity.h index edfb6163caa3..4dc3bef72c9d 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -116,7 +116,13 @@ struct media_entity_graph { int top; }; +/* + * struct media_pipeline - Media pipeline related information + * + * @graph: Media graph walk during pipeline start / stop + */ struct media_pipeline { + struct media_entity_graph graph; }; /** -- cgit v1.2.3