Skip to content

Commit

Permalink
media: hantro: Fix broken media controller links
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Ezequiel Garcia authored and Mauro Carvalho Chehab committed Feb 24, 2020
1 parent 044041c commit d171c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/hantro/hantro_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,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)
Expand Down

0 comments on commit d171c45

Please sign in to comment.