Message ID | 20240619012356.22685-3-laurent.pinchart+renesas@ideasonboard.com (mailing list archive) |
---|---|
State | New |
Headers |
Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <linux-media+bounces-13644-patchwork=linuxtv.org@vger.kernel.org>) id 1sJk3u-0007dt-24 for patchwork@linuxtv.org; Wed, 19 Jun 2024 01:24:35 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F377B2840FB for <patchwork@linuxtv.org>; Wed, 19 Jun 2024 01:24:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AEF6D2E5; Wed, 19 Jun 2024 01:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BVowi7By" X-Original-To: linux-media@vger.kernel.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDBC1B658; Wed, 19 Jun 2024 01:24:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718760266; cv=none; b=Wp8xmcykRhaOsGRS3MllKojou55aK+J6U5ni9WNKS3u0B4t2VwKO15jh37NAY/rxWhZoFOk/WH4WS0xBAWOcAVmipJNL67UlNJP4bhBSFkvvf+xwFbPfE6hj/QB6vsxzrTvca9PylK5T99JZQUxS9t9JyJT7nInyZYLy1Ltrt6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718760266; c=relaxed/simple; bh=oN4ZSHaKeO11dckj3HGXkhAzH8nO8cjjZzc17znYEYY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bK9S4m5/K4v8jcxF4dZshOifZ51ZccPusXcPwGXCbhtgTh+GU+9YODOi5x8MLHlsGTT0K4HD8RmECIKejTCnM2+RPZgxYTtJq8aKKNzYGhZDvlfkqG7QDTuZvfM29OXIi0I8m4gYjlZ3aGu8eRclqVR+2rURYfkbzqyctMRXo/E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=BVowi7By; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D46C210CA; Wed, 19 Jun 2024 03:24:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718760244; bh=oN4ZSHaKeO11dckj3HGXkhAzH8nO8cjjZzc17znYEYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BVowi7ByD49qe9x1t41LGC/4II7n0yi/YSkzr2rU3ud7ZCiUc1VUhkbqJaHf0vsbQ wa/VsH8wShf8rt3zWt4piF3UsnILtAUyqR5QDc23nmUkubGoMY0VCfswIMr4kpc20S hSUgs2Du//kt3OEClhBMjNTFBemwaxMkN77Jj91g= From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, Eugen Hristev <eugen.hristev@collabora.com>, Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Sakari Ailus <sakari.ailus@iki.fi>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>, Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl> Subject: [PATCH 2/8] media: sun4i_csi: Implement link validate for sun4i_csi subdev Date: Wed, 19 Jun 2024 04:23:50 +0300 Message-ID: <20240619012356.22685-3-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240619012356.22685-1-laurent.pinchart+renesas@ideasonboard.com> References: <20240619012356.22685-1-laurent.pinchart+renesas@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: <linux-media.vger.kernel.org> List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-LSpam-Score: -4.9 (----) X-LSpam-Report: No, score=-4.9 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_MISSING=0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no |
Series |
media: v4l2: Improve media link validation
|
|
Commit Message
Laurent Pinchart
June 19, 2024, 1:23 a.m. UTC
The sun4i_csi driver doesn't implement link validation for the subdev it
registers, leaving the link between the subdev and its source
unvalidated. Fix it, using the v4l2_subdev_link_validate() helper.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Wed, Jun 19, 2024 at 9:24 AM Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> wrote: > > The sun4i_csi driver doesn't implement link validation for the subdev it > registers, leaving the link between the subdev and its source > unvalidated. Fix it, using the v4l2_subdev_link_validate() helper. > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Chen-Yu Tsai <wens@csie.org> > --- > drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c > index 097a3a08ef7d..dbb26c7b2f8d 100644 > --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c > +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c > @@ -39,6 +39,10 @@ static const struct media_entity_operations sun4i_csi_video_entity_ops = { > .link_validate = v4l2_subdev_link_validate, > }; > > +static const struct media_entity_operations sun4i_csi_subdev_entity_ops = { > + .link_validate = v4l2_subdev_link_validate, > +}; > + > static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier, > struct v4l2_subdev *subdev, > struct v4l2_async_connection *asd) > @@ -214,6 +218,7 @@ static int sun4i_csi_probe(struct platform_device *pdev) > subdev->internal_ops = &sun4i_csi_subdev_internal_ops; > subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; > subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE; > + subdev->entity.ops = &sun4i_csi_subdev_entity_ops; > subdev->owner = THIS_MODULE; > snprintf(subdev->name, sizeof(subdev->name), "sun4i-csi-0"); > v4l2_set_subdevdata(subdev, csi); > -- > Regards, > > Laurent Pinchart > >
Hi Laurent, On Wed, Jun 19, 2024 at 04:23:50AM +0300, Laurent Pinchart wrote: > The sun4i_csi driver doesn't implement link validation for the subdev it > registers, leaving the link between the subdev and its source > unvalidated. Fix it, using the v4l2_subdev_link_validate() helper. > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> This looks like a bugfix. Shouldn't this be backported?
On Sat, Jun 22, 2024 at 04:44:15PM +0000, Sakari Ailus wrote: > On Wed, Jun 19, 2024 at 04:23:50AM +0300, Laurent Pinchart wrote: > > The sun4i_csi driver doesn't implement link validation for the subdev it > > registers, leaving the link between the subdev and its source > > unvalidated. Fix it, using the v4l2_subdev_link_validate() helper. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > This looks like a bugfix. Shouldn't this be backported? I'll add Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver")
On Wed, Jun 26, 2024 at 12:09:28AM +0300, Laurent Pinchart wrote: > On Sat, Jun 22, 2024 at 04:44:15PM +0000, Sakari Ailus wrote: > > On Wed, Jun 19, 2024 at 04:23:50AM +0300, Laurent Pinchart wrote: > > > The sun4i_csi driver doesn't implement link validation for the subdev it > > > registers, leaving the link between the subdev and its source > > > unvalidated. Fix it, using the v4l2_subdev_link_validate() helper. > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > > This looks like a bugfix. Shouldn't this be backported? > > I'll add > > Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Please also: Cc: stable@vger.kernel.org
On Tue, Jun 25, 2024 at 09:49:20PM +0000, Sakari Ailus wrote: > On Wed, Jun 26, 2024 at 12:09:28AM +0300, Laurent Pinchart wrote: > > On Sat, Jun 22, 2024 at 04:44:15PM +0000, Sakari Ailus wrote: > > > On Wed, Jun 19, 2024 at 04:23:50AM +0300, Laurent Pinchart wrote: > > > > The sun4i_csi driver doesn't implement link validation for the subdev it > > > > registers, leaving the link between the subdev and its source > > > > unvalidated. Fix it, using the v4l2_subdev_link_validate() helper. > > > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > > > > This looks like a bugfix. Shouldn't this be backported? > > > > I'll add > > > > Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") > > Please also: > > Cc: stable@vger.kernel.org Done.
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c index 097a3a08ef7d..dbb26c7b2f8d 100644 --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c @@ -39,6 +39,10 @@ static const struct media_entity_operations sun4i_csi_video_entity_ops = { .link_validate = v4l2_subdev_link_validate, }; +static const struct media_entity_operations sun4i_csi_subdev_entity_ops = { + .link_validate = v4l2_subdev_link_validate, +}; + static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier, struct v4l2_subdev *subdev, struct v4l2_async_connection *asd) @@ -214,6 +218,7 @@ static int sun4i_csi_probe(struct platform_device *pdev) subdev->internal_ops = &sun4i_csi_subdev_internal_ops; subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE; + subdev->entity.ops = &sun4i_csi_subdev_entity_ops; subdev->owner = THIS_MODULE; snprintf(subdev->name, sizeof(subdev->name), "sun4i-csi-0"); v4l2_set_subdevdata(subdev, csi);