All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Gregor Jasny <gjasny@googlemail.com>
Subject: [v4l-utils] [PATCH 8/8] v4l2-compliance: Test IMMUTABLE route flag
Date: Tue,  2 Apr 2024 03:00:33 +0300	[thread overview]
Message-ID: <20240402000033.4007-9-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20240402000033.4007-1-laurent.pinchart@ideasonboard.com>

Accept the new V4L2_SUBDEV_ROUTE_FL_IMMUTABLE route flag when testing
routing, and verify that immutable routes are active as mandated by the
routing API specification.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/v4l2-compliance/v4l2-test-subdevs.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
index 714857021fc6..e26d09ed8586 100644
--- a/utils/v4l2-compliance/v4l2-test-subdevs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
@@ -579,7 +579,8 @@ int testSubDevSelection(struct node *node, unsigned which, unsigned pad, unsigne
 
 int testSubDevRouting(struct node *node, unsigned which)
 {
-	const uint32_t all_route_flags_mask = V4L2_SUBDEV_ROUTE_FL_ACTIVE;
+	const uint32_t all_route_flags_mask = V4L2_SUBDEV_ROUTE_FL_ACTIVE
+					    | V4L2_SUBDEV_ROUTE_FL_IMMUTABLE;
 	struct v4l2_subdev_routing routing = {};
 	struct v4l2_subdev_route routes[NUM_ROUTES_MAX] = {};
 	unsigned int i;
@@ -629,6 +630,8 @@ int testSubDevRouting(struct node *node, unsigned which)
 			fail_on_test(!(sink->flags & MEDIA_PAD_FL_SINK));
 			fail_on_test(!(source->flags & MEDIA_PAD_FL_SOURCE));
 			fail_on_test(route->flags & ~all_route_flags_mask);
+			fail_on_test((route->flags & V4L2_SUBDEV_ROUTE_FL_IMMUTABLE) &&
+				     !(route->flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE));
 		}
 	}
 
-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2024-04-02  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  0:00 [v4l-utils] [PATCH 0/8] Support for the generic line-based metadata support Laurent Pinchart
2024-04-02  0:00 ` [v4l-utils] [PATCH 1/8] utils: media-ctl: Print MUST_CONNECT pad flags Laurent Pinchart
2024-04-03  8:40   ` Laurent Pinchart
2024-04-03  8:43     ` Tomi Valkeinen
2024-04-03  8:56       ` Hans Verkuil
2024-04-04 20:17         ` Sakari Ailus
2024-04-04 22:04           ` Laurent Pinchart
2024-04-02  0:00 ` [v4l-utils] [PATCH 2/8] v4l2-compliance: Constify pointers and references in formats tests Laurent Pinchart
2024-04-03  8:44   ` Tomi Valkeinen
2024-04-03  8:46   ` Hans Verkuil
2024-04-02  0:00 ` [v4l-utils] [PATCH 3/8] v4l-utils: sync-with-kernel Laurent Pinchart
2024-04-02  0:00 ` [v4l-utils] [PATCH 4/8] utils: media-ctl: Support changed routing API Laurent Pinchart
2024-04-02  0:00 ` [v4l-utils] [PATCH 5/8] utils: media-ctl: Also print INTERNAL pad flag Laurent Pinchart
2024-04-02  0:00 ` [v4l-utils] [PATCH 6/8] v4l2-compliance: Support the changed routing API Laurent Pinchart
2024-04-02 10:54   ` Tomi Valkeinen
2024-04-05  6:37     ` Sakari Ailus
2024-04-02  0:00 ` [v4l-utils] [PATCH 7/8] v4l2-compliance: Add tests for V4L2_FMT_FLAG_META_LINE_BASED flag Laurent Pinchart
2024-04-02  0:00 ` Laurent Pinchart [this message]

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=20240402000033.4007-9-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=gjasny@googlemail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    --cc=tomi.valkeinen@ideasonboard.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 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.