This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-compliance/test-media: add new -Z option for expbuf bus_info Author: Hans Verkuil <[email protected]> Date: Thu Jul 16 09:34:05 2026 +0200 Currently v4l2-compliance uses the -z option as bus_info for both the device to be tested, and the 'expbuf' device, i.e. the device from which to export buffers. But they can be different, and so a new -Z option was added to provide the bus_info of the 'expbuf' device. The test-media script was also modified accordingly. This fixes broken test-media tests where -z and -Z actually have different values. Because of that the DMABUF streaming tests would be skipped for all non-vivid test drivers. Signed-off-by: Hans Verkuil <[email protected]> contrib/test/test-media | 14 +++++++------- utils/v4l2-compliance/v4l2-compliance.1.in | 16 +++++++++++----- utils/v4l2-compliance/v4l2-compliance.cpp | 24 ++++++++++++++++++------ 3 files changed, 36 insertions(+), 18 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=078c602a25935a1d604863591f93d2d745db5d98 diff --git a/contrib/test/test-media b/contrib/test/test-media index 8309321f8ed7..6effb4c46d27 100755 --- a/contrib/test/test-media +++ b/contrib/test/test-media @@ -290,12 +290,12 @@ if [ $vivid -eq 1 -a $setup -eq 0 ]; then echo vivid compliance tests, contiguous planes | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -m platform:vivid-000 -z platform:vivid-002 -e vivid-002-vid-cap -P -s10 -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -m platform:vivid-000 -Z platform:vivid-002 -e vivid-002-vid-cap -P -s10 -a 2>&1 | tee -a $tmp echo echo vivid compliance tests, non-contiguous planes | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -m platform:vivid-001 -z platform:vivid-002 -e vivid-002-vid-out -P -s10 -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -m platform:vivid-001 -Z platform:vivid-002 -e vivid-002-vid-out -P -s10 -a 2>&1 | tee -a $tmp echo echo echo @@ -450,7 +450,7 @@ if [ $vim2m -eq 1 -a $setup -eq 0 ]; then echo vim2m compliance tests | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -m platform:vim2m -z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -m platform:vim2m -Z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp echo echo echo @@ -482,7 +482,7 @@ if [ $vim2m -eq 1 -a $setup -eq 0 ]; then echo vim2m multiplanar compliance tests | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -m platform:vim2m -z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -m platform:vim2m -Z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp echo echo echo @@ -574,7 +574,7 @@ if [ $vimc -eq 1 -a $setup -eq 0 ]; then echo vimc compliance tests | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -m $vimc_device -z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -m $vimc_device -Z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp echo echo echo @@ -696,12 +696,12 @@ if [ $vicodec -eq 1 -a $setup -eq 0 ]; then echo vicodec encoder compliance tests | tee /dev/kmsg echo date - stdbuf -oL $v4l2_compliance -z platform:vicodec -d stateful-encoder-source -z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp + stdbuf -oL $v4l2_compliance -z platform:vicodec -d stateful-encoder-source -Z platform:vivid-002 -e vivid-002-vid-cap -s10 -P -a 2>&1 | tee -a $tmp echo echo vicodec decoder compliance tests | tee /dev/kmsg echo - decful_opts='-z platform:vicodec -d stateful-decoder-source -z platform:vivid-002 -e vivid-002-vid-cap' + decful_opts='-z platform:vicodec -d stateful-decoder-source -Z platform:vivid-002 -e vivid-002-vid-cap' date stdbuf -oL $v4l2_compliance $decful_opts --stream-from-hdr=$tmpdir/comp.hdr.yu12.1280.24 -s24 -P -a 2>&1 | tee -a $tmp date diff --git a/utils/v4l2-compliance/v4l2-compliance.1.in b/utils/v4l2-compliance/v4l2-compliance.1.in index fa12ae2d89b4..c23e5323451e 100644 --- a/utils/v4l2-compliance/v4l2-compliance.1.in +++ b/utils/v4l2-compliance/v4l2-compliance.1.in @@ -84,18 +84,24 @@ with the bus info string as specified by the \fB-z\fR option. \fB\-u\fR, \fB\-\-subdev\-device\fR \fI<dev>\fR Use device \fI<dev>\fR as the v4l-subdevX device. If \fI<dev>\fR is a number, then /dev/v4l-subdev\fI<dev>\fR is used. Otherwise if \fB-z\fR was specified earlier, then \fI<dev>\fR is the entity name +.TP +\fB-z\fR, \fB--media-bus-info\fR \fI<bus-info>\fR +Find the media device with the given bus info string. If set, then +the options above can use the entity name or interface ID to refer to the +device nodes. Example: v4l2-compliance -z platform:vivid-000 -d vivid-000-vid-cap +.TP \fB\-e\fR, \fB\-\-exp\-buf\-device\fR \fI<dev>\fR Use device \fI<dev>\fR as the video device used to export DMABUFfers for doing DMABUF streaming tests. If \fI<dev>\fR is a number, then /dev/video\fI<dev>\fR is used. -Otherwise if \fB-z\fR was specified earlier, then \fI<dev>\fR is the entity name +Otherwise if \fB-Z\fR was specified earlier, then \fI<dev>\fR is the entity name or interface ID (if prefixed with 0x) as found in the topology of the media device -with the bus info string as specified by the \fB-z\fR option. +with the bus info string as specified by the \fB-Z\fR option. If this option is not specified, then the DMABUF streaming tests will be skipped. .TP -\fB-z\fR, \fB--media-bus-info\fR \fI<bus-info>\fR +\fB-Z\fR, \fB--expbuf-media-bus-info\fR \fI<bus-info>\fR Find the media device with the given bus info string. If set, then -the options above can use the entity name or interface ID to refer to the -device nodes. Example: v4l2-compliance -z platform:vivid-000 -d vivid-000-vid-cap +the \fB-e\fR option above can use the entity name or interface ID to refer to the +device nodes. Example: v4l2-compliance -Z platform:vivid-000 -d vivid-000-vid-cap .TP \fB\-m\fR, \fB\-\-media\-device\fR \fI<dev>\fR Use device \fI<dev>\fR as the media controller device. Besides this device it also tests diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index cf523b9fefa0..9e0b5c3f9fa1 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -65,6 +65,7 @@ enum Option { OptUseWrapper = 'w', OptExitOnWarn = 'W', OptMediaBusInfo = 'z', + OptExpBufMediaBusInfo = 'Z', OptStreamFrom = 128, OptStreamFromHdr, OptVersion, @@ -127,6 +128,7 @@ static struct option long_options[] = { {"media-device", required_argument, nullptr, OptSetMediaDevice}, {"media-device-only", required_argument, nullptr, OptSetMediaDeviceOnly}, {"media-bus-info", required_argument, nullptr, OptMediaBusInfo}, + {"expbuf-media-bus-info", required_argument, nullptr, OptExpBufMediaBusInfo}, {"help", no_argument, nullptr, OptHelp}, {"verbose", no_argument, nullptr, OptVerbose}, {"color", required_argument, nullptr, OptColor}, @@ -202,14 +204,20 @@ static void usage() printf(" Use device <dev> as the v4l-subdev device.\n"); printf(" If <dev> starts with a digit, then /dev/v4l-subdev<dev> is used.\n"); printf(" See the -d description of how <dev> is used in combination with -z.\n"); - printf(" -e, --expbuf-device <dev>\n"); - printf(" Use video device <dev> to obtain DMABUF handles.\n"); - printf(" If <dev> starts with a digit, then /dev/video<dev> is used.\n"); - printf(" See the -d description of how <dev> is used in combination with -z.\n"); printf(" -z, --media-bus-info <bus-info>\n"); printf(" Find the media device with the given bus info string. If set, then\n"); printf(" the options above can use the entity name or interface ID to refer\n"); printf(" to the device nodes.\n"); + printf(" -e, --expbuf-device <dev>\n"); + printf(" Use video device <dev> to obtain DMABUF handles.\n"); + printf(" If <dev> starts with a digit, then /dev/video<dev> is used.\n"); + printf(" Otherwise if -Z was specified earlier, then <dev> is the entity name\n"); + printf(" or interface ID (if prefixed with 0x) as found in the topology of the\n"); + printf(" media device with the bus info string as specified by the -Z option.\n"); + printf(" -Z, --expbuf-media-bus-info <bus-info>\n"); + printf(" Find the media device for the -e option with the given bus info string.\n"); + printf(" If set, then the -e option above can use the entity name or interface ID to\n"); + printf(" refer to the device node.\n"); printf(" -m, --media-device <dev>\n"); printf(" Use device <dev> as the media controller device. Besides this\n"); printf(" device it also tests all interfaces it finds.\n"); @@ -1651,8 +1659,9 @@ int main(int argc, char **argv) int i; struct node node; media_type type = MEDIA_TYPE_UNKNOWN; - struct node expbuf_node; std::string media_bus_info; + struct node expbuf_node; + std::string expbuf_media_bus_info; const char *env_media_apps_color = getenv("MEDIA_APPS_COLOR"); /* command args */ @@ -1739,8 +1748,11 @@ int main(int argc, char **argv) case OptMediaBusInfo: media_bus_info = optarg; break; + case OptExpBufMediaBusInfo: + expbuf_media_bus_info = optarg; + break; case OptSetExpBufDevice: - expbuf_device = make_devname(optarg, "video", media_bus_info); + expbuf_device = make_devname(optarg, "video", expbuf_media_bus_info); break; case OptStreaming: if (optarg) _______________________________________________ linuxtv-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
