linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] v4l: vsp1: Fix wrong entities links creation
@ 2016-01-19 13:45 Javier Martinez Canillas
  2016-01-19 13:49 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2016-01-19 13:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-sh, Mauro Carvalho Chehab, Geert Uytterhoeven,
	Niklas Söderlund, Laurent Pinchart, linux-media,
	Javier Martinez Canillas

The Media Control framework now requires entities to be registered with
the media device before creating links so commit c7621b3044f7 ("[media]
v4l: vsp1: separate links creation from entities init") separated link
creation from entities init.

But unfortunately that patch introduced a regression since wrong links
were created causing a boot failure on Renesas boards.

This patch fixes the boot issue and also the media graph was compared
by Geert Uytterhoeven to make sure that the driver changes required by
the Media Control framework next generation did not affect the graph.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/media/platform/vsp1/vsp1_drv.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 42dff9d020af..533bc796391e 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -256,7 +256,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
 
 	/* Create links. */
 	list_for_each_entry(entity, &vsp1->entities, list_dev) {
-		if (entity->type == VSP1_ENTITY_LIF) {
+		if (entity->type == VSP1_ENTITY_WPF) {
 			ret = vsp1_wpf_create_links(vsp1, entity);
 			if (ret < 0)
 				goto done;
@@ -264,7 +264,10 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
 			ret = vsp1_rpf_create_links(vsp1, entity);
 			if (ret < 0)
 				goto done;
-		} else {
+		}
+
+		if (entity->type != VSP1_ENTITY_LIF &&
+		    entity->type != VSP1_ENTITY_RPF) {
 			ret = vsp1_create_links(vsp1, entity);
 			if (ret < 0)
 				goto done;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [media] v4l: vsp1: Fix wrong entities links creation
  2016-01-19 13:45 [PATCH] [media] v4l: vsp1: Fix wrong entities links creation Javier Martinez Canillas
@ 2016-01-19 13:49 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2016-01-19 13:49 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Mauro Carvalho Chehab, Niklas Söderlund,
	Laurent Pinchart, Linux Media Mailing List, linux-renesas-soc

Hi Javier,

On Tue, Jan 19, 2016 at 2:45 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The Media Control framework now requires entities to be registered with
> the media device before creating links so commit c7621b3044f7 ("[media]
> v4l: vsp1: separate links creation from entities init") separated link
> creation from entities init.
>
> But unfortunately that patch introduced a regression since wrong links
> were created causing a boot failure on Renesas boards.
>
> This patch fixes the boot issue and also the media graph was compared
> by Geert Uytterhoeven to make sure that the driver changes required by
> the Media Control framework next generation did not affect the graph.

Thank you!

> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-19 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 13:45 [PATCH] [media] v4l: vsp1: Fix wrong entities links creation Javier Martinez Canillas
2016-01-19 13:49 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).