From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Cosmin Tanislav <demonsingur@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Steve Longerbeam <slongerbeam@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] v4l2: mc: fix endpoint iteration
Date: Sat, 23 Nov 2024 23:39:52 +0200 [thread overview]
Message-ID: <20241123213952.GD19573@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20241122145525.194253-1-demonsingur@gmail.com>
Hi Cosmin,
Thank you for the patch.
On Fri, Nov 22, 2024 at 04:55:24PM +0200, Cosmin Tanislav wrote:
> When creating links from a subdev to a sink, the current logic tries to
> iterate over the endpoints of dev's fwnode.
>
> This might not be correct when the subdev uses a different fwnode
> compared to the dev's fwnode.
>
> If, when registering, the subdev's fwnode is not set, the code inside
> v4l2_async_register_subdev will set it to the dev's fwnode.
>
> To fix this, just use the subdev's fwnode.
>
> Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
> Fixes: 0d3c81e82da9 ("media: v4l2-mc: add v4l2_create_fwnode_links helpers")
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/media/v4l2-core/v4l2-mc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
> index 4bb91359e3a9a..937d358697e19 100644
> --- a/drivers/media/v4l2-core/v4l2-mc.c
> +++ b/drivers/media/v4l2-core/v4l2-mc.c
> @@ -329,7 +329,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
> if (!(sink->flags & MEDIA_PAD_FL_SINK))
> return -EINVAL;
>
> - fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
> + fwnode_graph_for_each_endpoint(src_sd->fwnode, endpoint) {
> struct fwnode_handle *remote_ep;
> int src_idx, sink_idx, ret;
> struct media_pad *src;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-11-23 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 14:55 [PATCH] v4l2: mc: fix endpoint iteration Cosmin Tanislav
2024-11-23 21:39 ` Laurent Pinchart [this message]
2024-12-13 8:35 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241123213952.GD19573@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=demonsingur@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox