All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for v5.6] hantro: Fix broken media controller links
@ 2020-02-04 19:38 Ezequiel Garcia
  2020-02-04 19:58 ` Nicolas Dufresne
  0 siblings, 1 reply; 2+ messages in thread
From: Ezequiel Garcia @ 2020-02-04 19:38 UTC (permalink / raw)
  To: linux-media
  Cc: kernel, linux-kernel, Hans Verkuil, Ezequiel Garcia,
	Nicolas Dufresne, stable

The driver currently creates a broken topology,
with a source-to-source link and a sink-to-sink
link instead of two source-to-sink links.

Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: <stable@vger.kernel.org>      # for v5.3 and up
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 drivers/staging/media/hantro/hantro_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
index 448493a08805..840b96bee082 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -556,13 +556,13 @@ static int hantro_attach_func(struct hantro_dev *vpu,
 		goto err_rel_entity1;
 
 	/* Connect the three entities */
-	ret = media_create_pad_link(&func->vdev.entity, 0, &func->proc, 1,
+	ret = media_create_pad_link(&func->vdev.entity, 0, &func->proc, 0,
 				    MEDIA_LNK_FL_IMMUTABLE |
 				    MEDIA_LNK_FL_ENABLED);
 	if (ret)
 		goto err_rel_entity2;
 
-	ret = media_create_pad_link(&func->proc, 0, &func->sink, 0,
+	ret = media_create_pad_link(&func->proc, 1, &func->sink, 0,
 				    MEDIA_LNK_FL_IMMUTABLE |
 				    MEDIA_LNK_FL_ENABLED);
 	if (ret)
-- 
2.25.0


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

* Re: [PATCH for v5.6] hantro: Fix broken media controller links
  2020-02-04 19:38 [PATCH for v5.6] hantro: Fix broken media controller links Ezequiel Garcia
@ 2020-02-04 19:58 ` Nicolas Dufresne
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Dufresne @ 2020-02-04 19:58 UTC (permalink / raw)
  To: Ezequiel Garcia, linux-media; +Cc: kernel, linux-kernel, Hans Verkuil, stable

Le mardi 04 février 2020 à 16:38 -0300, Ezequiel Garcia a écrit :
> The driver currently creates a broken topology,
> with a source-to-source link and a sink-to-sink
> link instead of two source-to-sink links.
> 
> Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca>
> Cc: <stable@vger.kernel.org>      # for v5.3 and up
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>

Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/staging/media/hantro/hantro_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_drv.c
> b/drivers/staging/media/hantro/hantro_drv.c
> index 448493a08805..840b96bee082 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -556,13 +556,13 @@ static int hantro_attach_func(struct hantro_dev *vpu,
>  		goto err_rel_entity1;
>  
>  	/* Connect the three entities */
> -	ret = media_create_pad_link(&func->vdev.entity, 0, &func->proc, 1,
> +	ret = media_create_pad_link(&func->vdev.entity, 0, &func->proc, 0,

As for the m2m comment, some local define to name the pad index would make this
readable.

>  				    MEDIA_LNK_FL_IMMUTABLE |
>  				    MEDIA_LNK_FL_ENABLED);
>  	if (ret)
>  		goto err_rel_entity2;
>  
> -	ret = media_create_pad_link(&func->proc, 0, &func->sink, 0,
> +	ret = media_create_pad_link(&func->proc, 1, &func->sink, 0,
>  				    MEDIA_LNK_FL_IMMUTABLE |
>  				    MEDIA_LNK_FL_ENABLED);
>  	if (ret)


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

end of thread, other threads:[~2020-02-04 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 19:38 [PATCH for v5.6] hantro: Fix broken media controller links Ezequiel Garcia
2020-02-04 19:58 ` Nicolas Dufresne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.