All of lore.kernel.org
 help / color / mirror / Atom feed
* Please help test the new v4l-subdev support in v4l2-compliance
@ 2018-02-03 15:56 Hans Verkuil
  2018-02-05 16:21 ` Tim Harvey
  2018-02-06  7:16 ` Tim Harvey
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Verkuil @ 2018-02-03 15:56 UTC (permalink / raw)
  To: Linux Media Mailing List, Tim Harvey, Jacopo Mondi
  Cc: Laurent Pinchart, Mauro Carvalho Chehab

Hi Tim, Jacopo,

I have now finished writing the v4l2-compliance tests for the various v4l-subdev
ioctls. I managed to test some with the vimc driver, but that doesn't implement all
ioctls, so I could use some help testing my test code :-)

To test you first need to apply these patches to your kernel:

https://patchwork.linuxtv.org/patch/46817/
https://patchwork.linuxtv.org/patch/46822/

Otherwise the compliance test will fail a lot.

Now run v4l2-compliance -u /dev/v4l-subdevX (or -uX as a shortcut) and see what
happens.

I have tested the following ioctls with vimc, so they are likely to be correct:

#define VIDIOC_SUBDEV_G_FMT                     _IOWR('V',  4, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_S_FMT                     _IOWR('V',  5, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_ENUM_MBUS_CODE            _IOWR('V',  2, struct v4l2_subdev_mbus_code_enum)
#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE           _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)

All others are untested:

#define VIDIOC_SUBDEV_G_FRAME_INTERVAL          _IOWR('V', 21, struct v4l2_subdev_frame_interval)
#define VIDIOC_SUBDEV_S_FRAME_INTERVAL          _IOWR('V', 22, struct v4l2_subdev_frame_interval)
#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL       _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
#define VIDIOC_SUBDEV_G_CROP                    _IOWR('V', 59, struct v4l2_subdev_crop)
#define VIDIOC_SUBDEV_S_CROP                    _IOWR('V', 60, struct v4l2_subdev_crop)
#define VIDIOC_SUBDEV_G_SELECTION               _IOWR('V', 61, struct v4l2_subdev_selection)
#define VIDIOC_SUBDEV_S_SELECTION               _IOWR('V', 62, struct v4l2_subdev_selection)
#define VIDIOC_SUBDEV_G_EDID                    _IOWR('V', 40, struct v4l2_edid)
#define VIDIOC_SUBDEV_S_EDID                    _IOWR('V', 41, struct v4l2_edid)
#define VIDIOC_SUBDEV_S_DV_TIMINGS              _IOWR('V', 87, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_G_DV_TIMINGS              _IOWR('V', 88, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS           _IOWR('V', 98, struct v4l2_enum_dv_timings)
#define VIDIOC_SUBDEV_QUERY_DV_TIMINGS          _IOR('V', 99, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_DV_TIMINGS_CAP            _IOWR('V', 100, struct v4l2_dv_timings_cap)

I did the best I could, but there may very well be bugs in the test code.

I will also test the timings and edid ioctls myself later next week at work.

The v4l2-compliance utility can now also test media devices (-m option), although that's
early days yet. Eventually I want to be able to walk the graph and test each device in
turn.

I have this idea of making v4l2-compliance, cec-compliance and media-compliance
frontends that can all share the actual test code. And perhaps that can include a new
dvb-compliance as well.

However, that's future music, for now I just want to get proper ioctl test coverage
so driver authors can at least have some confidence in their code by running these
tests.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-03 15:56 Please help test the new v4l-subdev support in v4l2-compliance Hans Verkuil
@ 2018-02-05 16:21 ` Tim Harvey
  2018-02-05 16:27   ` Hans Verkuil
  2018-02-05 16:37   ` Mauro Carvalho Chehab
  2018-02-06  7:16 ` Tim Harvey
  1 sibling, 2 replies; 15+ messages in thread
From: Tim Harvey @ 2018-02-05 16:21 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> Hi Tim, Jacopo,
>
> I have now finished writing the v4l2-compliance tests for the various v4l-subdev
> ioctls. I managed to test some with the vimc driver, but that doesn't implement all
> ioctls, so I could use some help testing my test code :-)
>
> To test you first need to apply these patches to your kernel:
>
> https://patchwork.linuxtv.org/patch/46817/
> https://patchwork.linuxtv.org/patch/46822/
>
> Otherwise the compliance test will fail a lot.
>
> Now run v4l2-compliance -u /dev/v4l-subdevX (or -uX as a shortcut) and see what
> happens.
>
> I have tested the following ioctls with vimc, so they are likely to be correct:
>
> #define VIDIOC_SUBDEV_G_FMT                     _IOWR('V',  4, struct v4l2_subdev_format)
> #define VIDIOC_SUBDEV_S_FMT                     _IOWR('V',  5, struct v4l2_subdev_format)
> #define VIDIOC_SUBDEV_ENUM_MBUS_CODE            _IOWR('V',  2, struct v4l2_subdev_mbus_code_enum)
> #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE           _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
>
> All others are untested:
>
> #define VIDIOC_SUBDEV_G_FRAME_INTERVAL          _IOWR('V', 21, struct v4l2_subdev_frame_interval)
> #define VIDIOC_SUBDEV_S_FRAME_INTERVAL          _IOWR('V', 22, struct v4l2_subdev_frame_interval)
> #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL       _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
> #define VIDIOC_SUBDEV_G_CROP                    _IOWR('V', 59, struct v4l2_subdev_crop)
> #define VIDIOC_SUBDEV_S_CROP                    _IOWR('V', 60, struct v4l2_subdev_crop)
> #define VIDIOC_SUBDEV_G_SELECTION               _IOWR('V', 61, struct v4l2_subdev_selection)
> #define VIDIOC_SUBDEV_S_SELECTION               _IOWR('V', 62, struct v4l2_subdev_selection)
> #define VIDIOC_SUBDEV_G_EDID                    _IOWR('V', 40, struct v4l2_edid)
> #define VIDIOC_SUBDEV_S_EDID                    _IOWR('V', 41, struct v4l2_edid)
> #define VIDIOC_SUBDEV_S_DV_TIMINGS              _IOWR('V', 87, struct v4l2_dv_timings)
> #define VIDIOC_SUBDEV_G_DV_TIMINGS              _IOWR('V', 88, struct v4l2_dv_timings)
> #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS           _IOWR('V', 98, struct v4l2_enum_dv_timings)
> #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS          _IOR('V', 99, struct v4l2_dv_timings)
> #define VIDIOC_SUBDEV_DV_TIMINGS_CAP            _IOWR('V', 100, struct v4l2_dv_timings_cap)
>
> I did the best I could, but there may very well be bugs in the test code.
>
> I will also test the timings and edid ioctls myself later next week at work.
>
> The v4l2-compliance utility can now also test media devices (-m option), although that's
> early days yet. Eventually I want to be able to walk the graph and test each device in
> turn.
>
> I have this idea of making v4l2-compliance, cec-compliance and media-compliance
> frontends that can all share the actual test code. And perhaps that can include a new
> dvb-compliance as well.
>
> However, that's future music, for now I just want to get proper ioctl test coverage
> so driver authors can at least have some confidence in their code by running these
> tests.
>

Hans,

I'm failing compile (of master 4ee9911) with:

  CXX      v4l2_compliance-media-info.o
media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
media-info.cpp:79:39: error: no matching function for call to
‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
  std::ifstream uevent_file(uevent_path);
                                       ^
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:495:7: note: candidate:
std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*,
std::ios_base::openmode) [with _CharT = char; _Traits =
std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/5/fstream:495:7: note:   no known conversion for
argument 1 from ‘std::__cxx11::string {aka
std::__cxx11::basic_string<char>}’ to ‘const char*’
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:481:7: note: candidate:
std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT =
char; _Traits = std::char_traits<char>]
       basic_ifstream() : __istream_type(), _M_filebuf()
       ^
/usr/include/c++/5/fstream:481:7: note:   candidate expects 0
arguments, 1 provided
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:455:11: note: candidate:
std::basic_ifstream<char>::basic_ifstream(const
std::basic_ifstream<char>&)
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/include/c++/5/fstream:455:11: note:   no known conversion for
argument 1 from ‘std::__cxx11::string {aka
std::__cxx11::basic_string<char>}’ to ‘const
std::basic_ifstream<char>&’
media-info.cpp: In function ‘std::__cxx11::string
media_get_device(__u32, __u32)’:
media-info.cpp:120:39: error: no matching function for call to
‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
  std::ifstream uevent_file(uevent_path);
                                       ^
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:495:7: note: candidate:
std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*,
std::ios_base::openmode) [with _CharT = char; _Traits =
std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/5/fstream:495:7: note:   no known conversion for
argument 1 from ‘std::__cxx11::string {aka
std::__cxx11::basic_string<char>}’ to ‘const char*’
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:481:7: note: candidate:
std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT =
char; _Traits = std::char_traits<char>]
       basic_ifstream() : __istream_type(), _M_filebuf()
       ^
/usr/include/c++/5/fstream:481:7: note:   candidate expects 0
arguments, 1 provided
In file included from media-info.cpp:35:0:
/usr/include/c++/5/fstream:455:11: note: candidate:
std::basic_ifstream<char>::basic_ifstream(const
std::basic_ifstream<char>&)
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/include/c++/5/fstream:455:11: note:   no known conversion for
argument 1 from ‘std::__cxx11::string {aka
std::__cxx11::basic_string<char>}’ to ‘const
std::basic_ifstream<char>&’
Makefile:746: recipe for target 'v4l2_compliance-media-info.o' failed
make[3]: *** [v4l2_compliance-media-info.o] Error 1
make[3]: Leaving directory '/usr/src/v4l-utils/utils/v4l2-compliance'
Makefile:469: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/usr/src/v4l-utils/utils'
Makefile:582: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/src/v4l-utils'
Makefile:509: recipe for target 'all' failed
make: *** [all] Error 2
tharvey@tharvey:/usr/src/v4l-utils$  git logshort | head
4ee9911 (HEAD -> master, origin/master, origin/HEAD) v4l2-ctl: improve
the fps calculation when streaming
b2f8f90 v4l2-compliance: add type/function/intf_type checks
ed953f6 v4l2-compliance: improve pad flags tests
91e63b2 v4l2-compliance: improve G/S_EDID test
0561fdb v4l2-compliance: add -M option to test all /dev/mediaX interfaces
0b0cb31 v4l2-compliance/v4l2-ctl: more device detection improvements
a2c1b75 v4l2-compliance: move the main test code into a separate function
a209f23 v4l2-info: move mi_is_subdevice() to v4l2-info.cpp
824fa2d v4l2-compliance: refactor device handling
0aedeab cec: renamed cec-common to cec-info

I ran a 'make distclean; ./bootstrap.sh && ./configure && make'

last version I built successfully was '1bb8c70 v4l2-ctl: mention that
--set-subdev-fps is for testing only'

I haven't dug into the failure at all. Are you using something new
with c++ requiring a new lib or specific version of something that
needs to be added to configure?

Regards,

Tim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:21 ` Tim Harvey
@ 2018-02-05 16:27   ` Hans Verkuil
  2018-02-05 16:49     ` Tim Harvey
  2018-02-05 16:37   ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2018-02-05 16:27 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On 02/05/2018 05:21 PM, Tim Harvey wrote:

<snip>

> 
> I ran a 'make distclean; ./bootstrap.sh && ./configure && make'
> 
> last version I built successfully was '1bb8c70 v4l2-ctl: mention that
> --set-subdev-fps is for testing only'

That's a lot of revisions ago. I've been busy last weekend :-)

Do a new git pull and try again. I remember hitting something similar during
the weekend where I was missing a C++ include.

> 
> I haven't dug into the failure at all. Are you using something new
> with c++ requiring a new lib or specific version of something that
> needs to be added to configure?

Nope, bog standard C++. Real C++ pros are probably appalled by the code.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:21 ` Tim Harvey
  2018-02-05 16:27   ` Hans Verkuil
@ 2018-02-05 16:37   ` Mauro Carvalho Chehab
  2018-02-05 16:55     ` Mauro Carvalho Chehab
  2018-02-05 16:58     ` Hans Verkuil
  1 sibling, 2 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2018-02-05 16:37 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Hans Verkuil, Linux Media Mailing List, Jacopo Mondi,
	Laurent Pinchart

Em Mon, 5 Feb 2018 08:21:54 -0800
Tim Harvey <tharvey@gateworks.com> escreveu:

> Hans,
> 
> I'm failing compile (of master 4ee9911) with:
> 
>   CXX      v4l2_compliance-media-info.o
> media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
> media-info.cpp:79:39: error: no matching function for call to
> ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
>   std::ifstream uevent_file(uevent_path);
>                                        ^

Btw, while on it, a few days ago, I noticed several class warnings when
building v4l-utils on Raspbian, saying that it was using some features
that future versions of gcc would stop using at qv4l2. See enclosed.

I didn't have time to look on them.

Thanks,
Mauro

In file included from /usr/include/c++/6/map:60:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
                 from qv4l2.h:25,
                 from ctrl-tab.cpp:20:
/usr/include/c++/6/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
/usr/include/c++/6/bits/stl_tree.h:1928:5: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
     _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_tree.h: In function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const unsigned int&>, std::tuple<>}; _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
/usr/include/c++/6/bits/stl_tree.h:2193:7: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
       _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/map:61:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
                 from qv4l2.h:25,
                 from ctrl-tab.cpp:20:
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setWhat(QWidget*, unsigned int, const QString&)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setWhat(QWidget*, unsigned int, long long int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
In file included from /usr/include/c++/6/map:60:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
                 from qv4l2.h:25,
                 from ctrl-tab.cpp:20:
/usr/include/c++/6/bits/stl_tree.h: In function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<unsigned int&&>, std::tuple<>}; _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
/usr/include/c++/6/bits/stl_tree.h:2193:7: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
       _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/map:61:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
                 from qv4l2.h:25,
                 from ctrl-tab.cpp:20:
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setVal64(unsigned int, long long int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘long long int ApplicationWindow::getVal64(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setString(unsigned int, const QString&)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘QString ApplicationWindow::getString(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘int ApplicationWindow::getVal(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setVal(unsigned int, int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::refresh(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::updateCtrl(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setDefaults(unsigned int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::ctrlAction(int)’:
/usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::updateCtrlRange(unsigned int, __s32)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::addTabs(int)’:
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:27   ` Hans Verkuil
@ 2018-02-05 16:49     ` Tim Harvey
  0 siblings, 0 replies; 15+ messages in thread
From: Tim Harvey @ 2018-02-05 16:49 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On Mon, Feb 5, 2018 at 8:27 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On 02/05/2018 05:21 PM, Tim Harvey wrote:
>
> <snip>
>
>>
>> I ran a 'make distclean; ./bootstrap.sh && ./configure && make'
>>
>> last version I built successfully was '1bb8c70 v4l2-ctl: mention that
>> --set-subdev-fps is for testing only'
>
> That's a lot of revisions ago. I've been busy last weekend :-)

right... I was up to date Thursday morning! ;)

>
> Do a new git pull and try again. I remember hitting something similar during
> the weekend where I was missing a C++ include.
>

Yes, I tried that on my x86 dev host - same failure as from my target.

>>
>> I haven't dug into the failure at all. Are you using something new
>> with c++ requiring a new lib or specific version of something that
>> needs to be added to configure?
>
> Nope, bog standard C++. Real C++ pros are probably appalled by the code.
>

Google to the rescue: The ifstream constructor expects a const char*,
so you need to do ifstream file(filename.c_str()); to make it work.

the following patch fixes it:

diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index eef743e..39da9b8 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -76,7 +76,7 @@ media_type media_detect_type(const char *device)
        uevent_path += num2s(major(sb.st_rdev), false) + ":" +
                num2s(minor(sb.st_rdev), false) + "/uevent";

-       std::ifstream uevent_file(uevent_path);
+       std::ifstream uevent_file(uevent_path.c_str());
        if (uevent_file.fail())
                return MEDIA_TYPE_UNKNOWN;

@@ -117,7 +117,7 @@ std::string media_get_device(__u32 major, __u32 minor)
        sprintf(fmt, "%d:%d", major, minor);
        uevent_path += std::string(fmt) + "/uevent";

-       std::ifstream uevent_file(uevent_path);
+       std::ifstream uevent_file(uevent_path.c_str());
        if (uevent_file.fail())
                return "";

Tim

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:37   ` Mauro Carvalho Chehab
@ 2018-02-05 16:55     ` Mauro Carvalho Chehab
  2018-02-05 16:59       ` Hans Verkuil
  2018-02-05 16:58     ` Hans Verkuil
  1 sibling, 1 reply; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2018-02-05 16:55 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Hans Verkuil, Linux Media Mailing List, Jacopo Mondi,
	Laurent Pinchart

Em Mon, 5 Feb 2018 14:37:29 -0200
Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:

> Em Mon, 5 Feb 2018 08:21:54 -0800
> Tim Harvey <tharvey@gateworks.com> escreveu:
> 
> > Hans,
> > 
> > I'm failing compile (of master 4ee9911) with:
> > 
> >   CXX      v4l2_compliance-media-info.o
> > media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
> > media-info.cpp:79:39: error: no matching function for call to
> > ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
> >   std::ifstream uevent_file(uevent_path);
> >                                        ^  
> 
> Btw, while on it, a few days ago, I noticed several class warnings when
> building v4l-utils on Raspbian, saying that it was using some features
> that future versions of gcc would stop using at qv4l2. See enclosed.
> 
> I didn't have time to look on them.

FYI, it still happens with today's upstream's version:

	4ee99116d0ec (HEAD, origin/master, origin/HEAD) v4l2-ctl: improve the fps calculation when streaming

$ gcc --version
gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


> 
> Thanks,
> Mauro
> 
> In file included from /usr/include/c++/6/map:60:0,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
>                  from qv4l2.h:25,
>                  from ctrl-tab.cpp:20:
> /usr/include/c++/6/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
> /usr/include/c++/6/bits/stl_tree.h:1928:5: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>      _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/c++/6/bits/stl_tree.h: In function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const unsigned int&>, std::tuple<>}; _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
> /usr/include/c++/6/bits/stl_tree.h:2193:7: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>        _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/c++/6/map:61:0,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
>                  from qv4l2.h:25,
>                  from ctrl-tab.cpp:20:
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setWhat(QWidget*, unsigned int, const QString&)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setWhat(QWidget*, unsigned int, long long int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> In file included from /usr/include/c++/6/map:60:0,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
>                  from qv4l2.h:25,
>                  from ctrl-tab.cpp:20:
> /usr/include/c++/6/bits/stl_tree.h: In function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<unsigned int&&>, std::tuple<>}; _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
> /usr/include/c++/6/bits/stl_tree.h:2193:7: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>        _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/c++/6/map:61:0,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
>                  from qv4l2.h:25,
>                  from ctrl-tab.cpp:20:
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setVal64(unsigned int, long long int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘long long int ApplicationWindow::getVal64(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setString(unsigned int, const QString&)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘QString ApplicationWindow::getString(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘int ApplicationWindow::getVal(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setVal(unsigned int, int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::refresh(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::updateCtrl(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::setDefaults(unsigned int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::ctrlAction(int)’:
> /usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::updateCtrlRange(unsigned int, __s32)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h: In member function ‘void ApplicationWindow::addTabs(int)’:
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:483:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> /usr/include/c++/6/bits/stl_map.h:502:4: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>     __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
>     ^~~
> 



Thanks,
Mauro

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:37   ` Mauro Carvalho Chehab
  2018-02-05 16:55     ` Mauro Carvalho Chehab
@ 2018-02-05 16:58     ` Hans Verkuil
  1 sibling, 0 replies; 15+ messages in thread
From: Hans Verkuil @ 2018-02-05 16:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart

On 02/05/2018 05:37 PM, Mauro Carvalho Chehab wrote:
> Em Mon, 5 Feb 2018 08:21:54 -0800
> Tim Harvey <tharvey@gateworks.com> escreveu:
> 
>> Hans,
>>
>> I'm failing compile (of master 4ee9911) with:
>>
>>   CXX      v4l2_compliance-media-info.o
>> media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
>> media-info.cpp:79:39: error: no matching function for call to
>> ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
>>   std::ifstream uevent_file(uevent_path);
>>                                        ^
> 
> Btw, while on it, a few days ago, I noticed several class warnings when
> building v4l-utils on Raspbian, saying that it was using some features
> that future versions of gcc would stop using at qv4l2. See enclosed.
> 
> I didn't have time to look on them.
> 
> Thanks,
> Mauro
> 
> In file included from /usr/include/c++/6/map:60:0,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qmetatype.h:57,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtCore/qobject.h:54,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qwidget.h:44,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/qmainwindow.h:43,
>                  from /usr/include/arm-linux-gnueabihf/qt5/QtWidgets/QMainWindow:1,
>                  from qv4l2.h:25,
>                  from ctrl-tab.cpp:20:
> /usr/include/c++/6/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = unsigned int; _Val = std::pair<const unsigned int, v4l2_query_ext_ctrl>; _KeyOfValue = std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >; _Compare = std::less<unsigned int>; _Alloc = std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >]’:
> /usr/include/c++/6/bits/stl_tree.h:1928:5: note: parameter passing for argument of type ‘std::_Rb_tree<unsigned int, std::pair<const unsigned int, v4l2_query_ext_ctrl>, std::_Select1st<std::pair<const unsigned int, v4l2_query_ext_ctrl> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, v4l2_query_ext_ctrl> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const unsigned int, v4l2_query_ext_ctrl> >}’ will change in GCC 7.1
>      _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've seen it too, but I have no idea what to do with it. I'm not even sure that it is in my
code instead of in Qt headers or even c++ header.

It's not exactly an informative message.

Since I compile with g++ version 7.2 it appears that it is just fine since it doesn't complain.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:55     ` Mauro Carvalho Chehab
@ 2018-02-05 16:59       ` Hans Verkuil
  2018-02-05 17:01         ` Hans Verkuil
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2018-02-05 16:59 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart

On 02/05/2018 05:55 PM, Mauro Carvalho Chehab wrote:
> Em Mon, 5 Feb 2018 14:37:29 -0200
> Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:
> 
>> Em Mon, 5 Feb 2018 08:21:54 -0800
>> Tim Harvey <tharvey@gateworks.com> escreveu:
>>
>>> Hans,
>>>
>>> I'm failing compile (of master 4ee9911) with:
>>>
>>>   CXX      v4l2_compliance-media-info.o
>>> media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
>>> media-info.cpp:79:39: error: no matching function for call to
>>> ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
>>>   std::ifstream uevent_file(uevent_path);
>>>                                        ^  
>>
>> Btw, while on it, a few days ago, I noticed several class warnings when
>> building v4l-utils on Raspbian, saying that it was using some features
>> that future versions of gcc would stop using at qv4l2. See enclosed.
>>
>> I didn't have time to look on them.
> 
> FYI, it still happens with today's upstream's version:
> 
> 	4ee99116d0ec (HEAD, origin/master, origin/HEAD) v4l2-ctl: improve the fps calculation when streaming
> 
> $ gcc --version
> gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
> Copyright (C) 2016 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

My guess is that it is a bogus message from gcc 6.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 16:59       ` Hans Verkuil
@ 2018-02-05 17:01         ` Hans Verkuil
  2018-02-05 17:33           ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2018-02-05 17:01 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart

On 02/05/2018 05:59 PM, Hans Verkuil wrote:
> On 02/05/2018 05:55 PM, Mauro Carvalho Chehab wrote:
>> Em Mon, 5 Feb 2018 14:37:29 -0200
>> Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:
>>
>>> Em Mon, 5 Feb 2018 08:21:54 -0800
>>> Tim Harvey <tharvey@gateworks.com> escreveu:
>>>
>>>> Hans,
>>>>
>>>> I'm failing compile (of master 4ee9911) with:
>>>>
>>>>   CXX      v4l2_compliance-media-info.o
>>>> media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
>>>> media-info.cpp:79:39: error: no matching function for call to
>>>> ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
>>>>   std::ifstream uevent_file(uevent_path);
>>>>                                        ^  
>>>
>>> Btw, while on it, a few days ago, I noticed several class warnings when
>>> building v4l-utils on Raspbian, saying that it was using some features
>>> that future versions of gcc would stop using at qv4l2. See enclosed.
>>>
>>> I didn't have time to look on them.
>>
>> FYI, it still happens with today's upstream's version:
>>
>> 	4ee99116d0ec (HEAD, origin/master, origin/HEAD) v4l2-ctl: improve the fps calculation when streaming
>>
>> $ gcc --version
>> gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
>> Copyright (C) 2016 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> My guess is that it is a bogus message from gcc 6.
> 
> Regards,
> 
> 	Hans
> 

See: https://gcc.gnu.org/ml/gcc/2017-05/msg00073.html

Nothing to worry about.

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-05 17:01         ` Hans Verkuil
@ 2018-02-05 17:33           ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 15+ messages in thread
From: Mauro Carvalho Chehab @ 2018-02-05 17:33 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Tim Harvey, Linux Media Mailing List, Jacopo Mondi,
	Laurent Pinchart

Em Mon, 5 Feb 2018 18:01:34 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> On 02/05/2018 05:59 PM, Hans Verkuil wrote:
> > On 02/05/2018 05:55 PM, Mauro Carvalho Chehab wrote:  
> >> Em Mon, 5 Feb 2018 14:37:29 -0200
> >> Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:
> >>  
> >>> Em Mon, 5 Feb 2018 08:21:54 -0800
> >>> Tim Harvey <tharvey@gateworks.com> escreveu:
> >>>  
> >>>> Hans,
> >>>>
> >>>> I'm failing compile (of master 4ee9911) with:
> >>>>
> >>>>   CXX      v4l2_compliance-media-info.o
> >>>> media-info.cpp: In function ‘media_type media_detect_type(const char*)’:
> >>>> media-info.cpp:79:39: error: no matching function for call to
> >>>> ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
> >>>>   std::ifstream uevent_file(uevent_path);
> >>>>                                        ^    
> >>>
> >>> Btw, while on it, a few days ago, I noticed several class warnings when
> >>> building v4l-utils on Raspbian, saying that it was using some features
> >>> that future versions of gcc would stop using at qv4l2. See enclosed.
> >>>
> >>> I didn't have time to look on them.  
> >>
> >> FYI, it still happens with today's upstream's version:
> >>
> >> 	4ee99116d0ec (HEAD, origin/master, origin/HEAD) v4l2-ctl: improve the fps calculation when streaming
> >>
> >> $ gcc --version
> >> gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
> >> Copyright (C) 2016 Free Software Foundation, Inc.
> >> This is free software; see the source for copying conditions.  There is NO
> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
> > 
> > My guess is that it is a bogus message from gcc 6.
> > 
> > Regards,
> > 
> > 	Hans
> >   
> 
> See: https://gcc.gnu.org/ml/gcc/2017-05/msg00073.html
> 
> Nothing to worry about.

Hmm... as suggested there, it could be worth to add -Wno-psabi at qv4l2
Makefile if arch is arm[1], in order to avoid those warnings there.

[1] from what's said at https://gcc.gnu.org/gcc-7/changes.html, this is
due to a bug on gcc 5 for ARM.

> 
> 	Hans



Thanks,
Mauro

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-03 15:56 Please help test the new v4l-subdev support in v4l2-compliance Hans Verkuil
  2018-02-05 16:21 ` Tim Harvey
@ 2018-02-06  7:16 ` Tim Harvey
  2018-02-06  7:34   ` Hans Verkuil
  1 sibling, 1 reply; 15+ messages in thread
From: Tim Harvey @ 2018-02-06  7:16 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> Hi Tim, Jacopo,
>
> I have now finished writing the v4l2-compliance tests for the various v4l-subdev
> ioctls. I managed to test some with the vimc driver, but that doesn't implement all
> ioctls, so I could use some help testing my test code :-)
>
> To test you first need to apply these patches to your kernel:
>
> https://patchwork.linuxtv.org/patch/46817/
> https://patchwork.linuxtv.org/patch/46822/
>
> Otherwise the compliance test will fail a lot.
>
> Now run v4l2-compliance -u /dev/v4l-subdevX (or -uX as a shortcut) and see what
> happens.
>

Hans,

Here's the compliance results for my tda1997x driver:

v4l2-compliance SHA   : b2f8f9049056eb6f9e028927dacb2c715a062df8
Media Driver Info:
        Driver name      : imx-media
        Model            : imx-media
        Serial           :
        Bus info         :
        Media version    : 4.15.0
        Hardware revision: 0x00000000 (0)
        Driver version   : 4.15.0
Interface Info:
        ID               : 0x0300008f
        Type             : V4L Sub-Device
Entity Info:
        ID               : 0x00000003 (3)
        Name             : tda19971 2-0048
        Function         : Unknown
        Pad 0x01000004   : Source
          Link 0x0200006f: to remote pad 0x1000063 of entity
'ipu1_csi0_mux': Data, Enabled

Compliance test for device /dev/v4l-subdev1:

Allow for multiple opens:
        test second /dev/v4l-subdev1 open: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK
                fail: v4l2-test-io-config.cpp(375): doioctl(node,
VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
                fail: v4l2-test-io-config.cpp(392): EDID check failed
for source pad 0.
        test VIDIOC_DV_TIMINGS_CAP: FAIL
                fail: v4l2-test-io-config.cpp(454): ret && ret != EINVAL
                fail: v4l2-test-io-config.cpp(533): EDID check failed
for source pad 0.
        test VIDIOC_G/S_EDID: FAIL

Sub-Device ioctls (Source Pad 0):
        test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
                fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 ||
fmt.code == ~0U
                fail: v4l2-test-subdevs.cpp(342):
checkMBusFrameFmt(node, fmt.format)
        test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
        test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
        test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
        test Active VIDIOC_SUBDEV_G/S_FMT: OK
        test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
        test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)

Control ioctls:
        test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
        test VIDIOC_QUERYCTRL: OK (Not Supported)
        test VIDIOC_G/S_CTRL: OK (Not Supported)
        test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
        test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
        test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
        Standard Controls: 0 Private Controls: 0

Format ioctls:
        test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
root@ventana:~# cat foo
v4l2-compliance SHA   : b2f8f9049056eb6f9e028927dacb2c715a062df8
Media Driver Info:
        Driver name      : imx-media
        Model            : imx-media
        Serial           :
        Bus info         :
        Media version    : 4.15.0
        Hardware revision: 0x00000000 (0)
        Driver version   : 4.15.0
Interface Info:
        ID               : 0x0300008f
        Type             : V4L Sub-Device
Entity Info:
        ID               : 0x00000003 (3)
        Name             : tda19971 2-0048
        Function         : Unknown
        Pad 0x01000004   : Source
          Link 0x0200006f: to remote pad 0x1000063 of entity
'ipu1_csi0_mux': Data, Enabled

Compliance test for device /dev/v4l-subdev1:

Allow for multiple opens:
        test second /dev/v4l-subdev1 open: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 Audio Inputs: 0 Tuners: 0
        test VIDIOC_G/S_PARM: OK (Not Supported)
        test VIDIOC_G_FBUF: OK (Not Supported)
        test VIDIOC_G_FMT: OK (Not Supported)
        test VIDIOC_TRY_FMT: OK (Not Supported)
        test VIDIOC_S_FMT: OK (Not Supported)
        test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
        test Cropping: OK (Not Supported)
        test Composing: OK (Not Supported)
        test Scaling: OK (Not Supported)

Codec ioctls:
        test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
        test VIDIOC_G_ENC_INDEX: OK (Not Supported)
        test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
        test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
        test VIDIOC_EXPBUF: OK (Not Supported)

Total: 46, Succeeded: 43, Failed: 3, Warnings: 0
----

With regards to the 3 failures:

1. test VIDIOC_G/S_EDID: FAIL
This is a valid catch where I was returning -EINVAL when the caller
was simply querying the edid - I've fixed it in my driver

2. test VIDIOC_DV_TIMINGS_CAP: FAIL
fail: v4l2-test-io-config.cpp(375): doioctl(node,
VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
fail: v4l2-test-io-config.cpp(392): EDID check failed for source pad 0.

It looks like the purpose of the test is to do an ioctl with an
invalid pad setting to ensure -EINVAL is returned. However by the time
the VIDIOC_DV_TIMINGS_CAP ioctl used here gets routed to a
VIDIOC_SUBDEV_DV_TIMINGS_CAP the pad is changed to 0 which is valid.
I'm not following what's going on here.

3. test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(342): checkMBusFrameFmt(node, fmt.format)

This is reporting that a VIDIOC_SUBDEV_G_FMT with
which=V4L2_SUBDEV_FORMAT_TRY returns format->code = 0. The following
is my set_format:

static int tda1997x_get_format(struct v4l2_subdev *sd,
                               struct v4l2_subdev_pad_config *cfg,
                               struct v4l2_subdev_format *format)
{
        struct tda1997x_state *state = to_state(sd);

        v4l_dbg(1, debug, state->client, "%s pad=%d which=%d\n",
                __func__, format->pad, format->which);
        if (format->pad != TDA1997X_PAD_SOURCE)
                return -EINVAL;

        tda1997x_fill_format(state, &format->format);

        if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
                struct v4l2_mbus_framefmt *fmt;

                fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
                format->format.code = fmt->code;
        } else {
                format->format.code = state->mbus_code;
        }

        return 0;
}

I don't at all understand the V4L2_SUBDEV_FORMAT_TRY logic here which
I took from other subdev drivers as boilerplate. Is the test valid?

Regards,

Tim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-06  7:16 ` Tim Harvey
@ 2018-02-06  7:34   ` Hans Verkuil
  2018-02-06 18:48     ` Tim Harvey
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2018-02-06  7:34 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On 02/06/2018 08:16 AM, Tim Harvey wrote:
> On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> Hi Tim, Jacopo,
>>
>> I have now finished writing the v4l2-compliance tests for the various v4l-subdev
>> ioctls. I managed to test some with the vimc driver, but that doesn't implement all
>> ioctls, so I could use some help testing my test code :-)
>>
>> To test you first need to apply these patches to your kernel:
>>
>> https://patchwork.linuxtv.org/patch/46817/
>> https://patchwork.linuxtv.org/patch/46822/
>>
>> Otherwise the compliance test will fail a lot.
>>
>> Now run v4l2-compliance -u /dev/v4l-subdevX (or -uX as a shortcut) and see what
>> happens.
>>
> 
> Hans,
> 
> Here's the compliance results for my tda1997x driver:
> 
> v4l2-compliance SHA   : b2f8f9049056eb6f9e028927dacb2c715a062df8
> Media Driver Info:
>         Driver name      : imx-media
>         Model            : imx-media
>         Serial           :
>         Bus info         :
>         Media version    : 4.15.0
>         Hardware revision: 0x00000000 (0)
>         Driver version   : 4.15.0
> Interface Info:
>         ID               : 0x0300008f
>         Type             : V4L Sub-Device
> Entity Info:
>         ID               : 0x00000003 (3)
>         Name             : tda19971 2-0048
>         Function         : Unknown
>         Pad 0x01000004   : Source
>           Link 0x0200006f: to remote pad 0x1000063 of entity
> 'ipu1_csi0_mux': Data, Enabled
> 
> Compliance test for device /dev/v4l-subdev1:
> 
> Allow for multiple opens:
>         test second /dev/v4l-subdev1 open: OK
>         test for unlimited opens: OK
> 
> Debug ioctls:
>         test VIDIOC_LOG_STATUS: OK
> 
> Input ioctls:
>         test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>         test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>         test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>         test VIDIOC_ENUMAUDIO: OK (Not Supported)
>         test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>         test VIDIOC_G/S_AUDIO: OK (Not Supported)
>         Inputs: 0 Audio Inputs: 0 Tuners: 0
> 
> Output ioctls:
>         test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>         test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>         test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>         test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>         test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>         Outputs: 0 Audio Outputs: 0 Modulators: 0
> 
> Input/Output configuration ioctls:
>         test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>         test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK
>                 fail: v4l2-test-io-config.cpp(375): doioctl(node,
> VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
>                 fail: v4l2-test-io-config.cpp(392): EDID check failed
> for source pad 0.
>         test VIDIOC_DV_TIMINGS_CAP: FAIL
>                 fail: v4l2-test-io-config.cpp(454): ret && ret != EINVAL
>                 fail: v4l2-test-io-config.cpp(533): EDID check failed
> for source pad 0.
>         test VIDIOC_G/S_EDID: FAIL
> 
> Sub-Device ioctls (Source Pad 0):
>         test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
>                 fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 ||
> fmt.code == ~0U
>                 fail: v4l2-test-subdevs.cpp(342):
> checkMBusFrameFmt(node, fmt.format)
>         test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
>         test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
>         test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
>         test Active VIDIOC_SUBDEV_G/S_FMT: OK
>         test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
>         test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
> 
> Control ioctls:
>         test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
>         test VIDIOC_QUERYCTRL: OK (Not Supported)
>         test VIDIOC_G/S_CTRL: OK (Not Supported)
>         test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
>         test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
>         test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>         Standard Controls: 0 Private Controls: 0
> 
> Format ioctls:
>         test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
> root@ventana:~# cat foo
> v4l2-compliance SHA   : b2f8f9049056eb6f9e028927dacb2c715a062df8
> Media Driver Info:
>         Driver name      : imx-media
>         Model            : imx-media
>         Serial           :
>         Bus info         :
>         Media version    : 4.15.0
>         Hardware revision: 0x00000000 (0)
>         Driver version   : 4.15.0
> Interface Info:
>         ID               : 0x0300008f
>         Type             : V4L Sub-Device
> Entity Info:
>         ID               : 0x00000003 (3)
>         Name             : tda19971 2-0048
>         Function         : Unknown
>         Pad 0x01000004   : Source
>           Link 0x0200006f: to remote pad 0x1000063 of entity
> 'ipu1_csi0_mux': Data, Enabled
> 
> Compliance test for device /dev/v4l-subdev1:
> 
> Allow for multiple opens:
>         test second /dev/v4l-subdev1 open: OK
>         test for unlimited opens: OK
> 
> Debug ioctls:
>         test VIDIOC_LOG_STATUS: OK
> 
> Input ioctls:
>         test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>         test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>         test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>         test VIDIOC_ENUMAUDIO: OK (Not Supported)
>         test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>         test VIDIOC_G/S_AUDIO: OK (Not Supported)
>         Inputs: 0 Audio Inputs: 0 Tuners: 0
>         test VIDIOC_G/S_PARM: OK (Not Supported)
>         test VIDIOC_G_FBUF: OK (Not Supported)
>         test VIDIOC_G_FMT: OK (Not Supported)
>         test VIDIOC_TRY_FMT: OK (Not Supported)
>         test VIDIOC_S_FMT: OK (Not Supported)
>         test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>         test Cropping: OK (Not Supported)
>         test Composing: OK (Not Supported)
>         test Scaling: OK (Not Supported)
> 
> Codec ioctls:
>         test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
>         test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>         test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
> 
> Buffer ioctls:
>         test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
>         test VIDIOC_EXPBUF: OK (Not Supported)
> 
> Total: 46, Succeeded: 43, Failed: 3, Warnings: 0
> ----
> 
> With regards to the 3 failures:
> 
> 1. test VIDIOC_G/S_EDID: FAIL
> This is a valid catch where I was returning -EINVAL when the caller
> was simply querying the edid - I've fixed it in my driver
> 
> 2. test VIDIOC_DV_TIMINGS_CAP: FAIL
> fail: v4l2-test-io-config.cpp(375): doioctl(node,
> VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
> fail: v4l2-test-io-config.cpp(392): EDID check failed for source pad 0.
> 
> It looks like the purpose of the test is to do an ioctl with an
> invalid pad setting to ensure -EINVAL is returned. However by the time
> the VIDIOC_DV_TIMINGS_CAP ioctl used here gets routed to a

No, VIDIOC_SUBDEV_DV_TIMINGS_CAP == VIDIOC_DV_TIMINGS_CAP, i.e. the
v4l-subdev API reuses the same ioctl as is used in the 'main' V4L2 API.
See include/uapi/linux/v4l2-subdev.h at the end for a list of 'alias'
ioctls.

Looking at v7 your tda1997x_get_dv_timings_cap() function doesn't check
for a valid pad field. Same for tda1997x_enum_dv_timings().

> VIDIOC_SUBDEV_DV_TIMINGS_CAP the pad is changed to 0 which is valid.
> I'm not following what's going on here.
> 
> 3. test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
> fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 || fmt.code == ~0U
> fail: v4l2-test-subdevs.cpp(342): checkMBusFrameFmt(node, fmt.format)
> 
> This is reporting that a VIDIOC_SUBDEV_G_FMT with
> which=V4L2_SUBDEV_FORMAT_TRY returns format->code = 0. The following
> is my set_format:
> 
> static int tda1997x_get_format(struct v4l2_subdev *sd,
>                                struct v4l2_subdev_pad_config *cfg,
>                                struct v4l2_subdev_format *format)
> {
>         struct tda1997x_state *state = to_state(sd);
> 
>         v4l_dbg(1, debug, state->client, "%s pad=%d which=%d\n",
>                 __func__, format->pad, format->which);
>         if (format->pad != TDA1997X_PAD_SOURCE)
>                 return -EINVAL;
> 
>         tda1997x_fill_format(state, &format->format);
> 
>         if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
>                 struct v4l2_mbus_framefmt *fmt;
> 
>                 fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
>                 format->format.code = fmt->code;
>         } else {
>                 format->format.code = state->mbus_code;
>         }
> 
>         return 0;
> }
> 
> I don't at all understand the V4L2_SUBDEV_FORMAT_TRY logic here which
> I took from other subdev drivers as boilerplate. Is the test valid?

The test is valid, this really shouldn't return a 0 code. But I am not
sure what the right logic is. I'll need to do some digging myself.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-06  7:34   ` Hans Verkuil
@ 2018-02-06 18:48     ` Tim Harvey
  2018-02-06 19:05       ` Hans Verkuil
  0 siblings, 1 reply; 15+ messages in thread
From: Tim Harvey @ 2018-02-06 18:48 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On Mon, Feb 5, 2018 at 11:34 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On 02/06/2018 08:16 AM, Tim Harvey wrote:
>> On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
<snip>
>>
>> With regards to the 3 failures:
>>
>> 1. test VIDIOC_G/S_EDID: FAIL
>> This is a valid catch where I was returning -EINVAL when the caller
>> was simply querying the edid - I've fixed it in my driver
>>
>> 2. test VIDIOC_DV_TIMINGS_CAP: FAIL
>> fail: v4l2-test-io-config.cpp(375): doioctl(node,
>> VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
>> fail: v4l2-test-io-config.cpp(392): EDID check failed for source pad 0.
>>
>> It looks like the purpose of the test is to do an ioctl with an
>> invalid pad setting to ensure -EINVAL is returned. However by the time
>> the VIDIOC_DV_TIMINGS_CAP ioctl used here gets routed to a
>
> No, VIDIOC_SUBDEV_DV_TIMINGS_CAP == VIDIOC_DV_TIMINGS_CAP, i.e. the
> v4l-subdev API reuses the same ioctl as is used in the 'main' V4L2 API.
> See include/uapi/linux/v4l2-subdev.h at the end for a list of 'alias'
> ioctls.

Ah... thanks - I realized that was happening somehow but couldn't see how :)

>
> Looking at v7 your tda1997x_get_dv_timings_cap() function doesn't check
> for a valid pad field. Same for tda1997x_enum_dv_timings().

Right - I noticed this right off as well - I've added pad validation
but that didn't resolve the failure.

The test failing is:

        memset(&timingscap, 0, sizeof(timingscap));
        timingscap.pad = node->is_subdev() ? node->entity.pads : 1;
^^^^ this sets pad=node->entity.pads=1 which is invalid
        fail_on_test(doioctl(node, VIDIOC_DV_TIMINGS_CAP, &timingscap)
!= EINVAL);
^^^^ tda1997x_get_dv_timings_cap() gets called with cap->pad = 0 which
is valid to returns 0. I don't understand how the userspace pad=1 get
changed to pad=0 in my handler.

>
>> VIDIOC_SUBDEV_DV_TIMINGS_CAP the pad is changed to 0 which is valid.
>> I'm not following what's going on here.
>>
>> 3. test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
>> fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 || fmt.code == ~0U
>> fail: v4l2-test-subdevs.cpp(342): checkMBusFrameFmt(node, fmt.format)
>>
>> This is reporting that a VIDIOC_SUBDEV_G_FMT with
>> which=V4L2_SUBDEV_FORMAT_TRY returns format->code = 0. The following
>> is my set_format:
>>
>> static int tda1997x_get_format(struct v4l2_subdev *sd,
>>                                struct v4l2_subdev_pad_config *cfg,
>>                                struct v4l2_subdev_format *format)
>> {
>>         struct tda1997x_state *state = to_state(sd);
>>
>>         v4l_dbg(1, debug, state->client, "%s pad=%d which=%d\n",
>>                 __func__, format->pad, format->which);
>>         if (format->pad != TDA1997X_PAD_SOURCE)
>>                 return -EINVAL;
>>
>>         tda1997x_fill_format(state, &format->format);
>>
>>         if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
>>                 struct v4l2_mbus_framefmt *fmt;
>>
>>                 fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
>>                 format->format.code = fmt->code;
>>         } else {
>>                 format->format.code = state->mbus_code;
>>         }
>>
>>         return 0;
>> }
>>
>> I don't at all understand the V4L2_SUBDEV_FORMAT_TRY logic here which
>> I took from other subdev drivers as boilerplate. Is the test valid?
>
> The test is valid, this really shouldn't return a 0 code. But I am not
> sure what the right logic is. I'll need to do some digging myself.

I got lost in the v4l2_subdev_get_try_format implementation but closer
inspection shows me that v4l2_subdev_get_try_format returns the
try_fmt field of the v4l2_subdev_pad_config used for storing subdev
pad info. What I'm missing is how that struct/field gets initialized?
Do I need to implement an init_cfg op?

Regards,

Tim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-06 18:48     ` Tim Harvey
@ 2018-02-06 19:05       ` Hans Verkuil
  2018-02-06 19:31         ` Tim Harvey
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2018-02-06 19:05 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On 02/06/2018 07:48 PM, Tim Harvey wrote:
> On Mon, Feb 5, 2018 at 11:34 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> On 02/06/2018 08:16 AM, Tim Harvey wrote:
>>> On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> <snip>
>>>
>>> With regards to the 3 failures:
>>>
>>> 1. test VIDIOC_G/S_EDID: FAIL
>>> This is a valid catch where I was returning -EINVAL when the caller
>>> was simply querying the edid - I've fixed it in my driver
>>>
>>> 2. test VIDIOC_DV_TIMINGS_CAP: FAIL
>>> fail: v4l2-test-io-config.cpp(375): doioctl(node,
>>> VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
>>> fail: v4l2-test-io-config.cpp(392): EDID check failed for source pad 0.
>>>
>>> It looks like the purpose of the test is to do an ioctl with an
>>> invalid pad setting to ensure -EINVAL is returned. However by the time
>>> the VIDIOC_DV_TIMINGS_CAP ioctl used here gets routed to a
>>
>> No, VIDIOC_SUBDEV_DV_TIMINGS_CAP == VIDIOC_DV_TIMINGS_CAP, i.e. the
>> v4l-subdev API reuses the same ioctl as is used in the 'main' V4L2 API.
>> See include/uapi/linux/v4l2-subdev.h at the end for a list of 'alias'
>> ioctls.
> 
> Ah... thanks - I realized that was happening somehow but couldn't see how :)
> 
>>
>> Looking at v7 your tda1997x_get_dv_timings_cap() function doesn't check
>> for a valid pad field. Same for tda1997x_enum_dv_timings().
> 
> Right - I noticed this right off as well - I've added pad validation
> but that didn't resolve the failure.
> 
> The test failing is:
> 
>         memset(&timingscap, 0, sizeof(timingscap));
>         timingscap.pad = node->is_subdev() ? node->entity.pads : 1;
> ^^^^ this sets pad=node->entity.pads=1 which is invalid
>         fail_on_test(doioctl(node, VIDIOC_DV_TIMINGS_CAP, &timingscap)
> != EINVAL);
> ^^^^ tda1997x_get_dv_timings_cap() gets called with cap->pad = 0 which
> is valid to returns 0. I don't understand how the userspace pad=1 get
> changed to pad=0 in my handler.

Actually, you don't need to test the pad in the driver, I just looked at
the code in v4l2-core/v4l2-subdev.c and the pad is tested there already.

And I just found why it is cleared: it's a bug in v4l2-ioctl.c.

Look up VIDIOC_DV_TIMINGS_CAP in the big table and change this:

	INFO_FL_CLEAR(v4l2_dv_timings_cap, type)

to this:

	INFO_FL_CLEAR(v4l2_dv_timings_cap, pad)

We never noticed this because we never tested this for subdevs. And that's
why you write compliance tests!

> 
>>
>>> VIDIOC_SUBDEV_DV_TIMINGS_CAP the pad is changed to 0 which is valid.
>>> I'm not following what's going on here.
>>>
>>> 3. test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
>>> fail: v4l2-test-subdevs.cpp(303): fmt.code == 0 || fmt.code == ~0U
>>> fail: v4l2-test-subdevs.cpp(342): checkMBusFrameFmt(node, fmt.format)
>>>
>>> This is reporting that a VIDIOC_SUBDEV_G_FMT with
>>> which=V4L2_SUBDEV_FORMAT_TRY returns format->code = 0. The following
>>> is my set_format:
>>>
>>> static int tda1997x_get_format(struct v4l2_subdev *sd,
>>>                                struct v4l2_subdev_pad_config *cfg,
>>>                                struct v4l2_subdev_format *format)
>>> {
>>>         struct tda1997x_state *state = to_state(sd);
>>>
>>>         v4l_dbg(1, debug, state->client, "%s pad=%d which=%d\n",
>>>                 __func__, format->pad, format->which);
>>>         if (format->pad != TDA1997X_PAD_SOURCE)
>>>                 return -EINVAL;
>>>
>>>         tda1997x_fill_format(state, &format->format);
>>>
>>>         if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
>>>                 struct v4l2_mbus_framefmt *fmt;
>>>
>>>                 fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
>>>                 format->format.code = fmt->code;
>>>         } else {
>>>                 format->format.code = state->mbus_code;
>>>         }
>>>
>>>         return 0;
>>> }
>>>
>>> I don't at all understand the V4L2_SUBDEV_FORMAT_TRY logic here which
>>> I took from other subdev drivers as boilerplate. Is the test valid?
>>
>> The test is valid, this really shouldn't return a 0 code. But I am not
>> sure what the right logic is. I'll need to do some digging myself.
> 
> I got lost in the v4l2_subdev_get_try_format implementation but closer
> inspection shows me that v4l2_subdev_get_try_format returns the
> try_fmt field of the v4l2_subdev_pad_config used for storing subdev
> pad info. What I'm missing is how that struct/field gets initialized?
> Do I need to implement an init_cfg op?

See my review of v7.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Please help test the new v4l-subdev support in v4l2-compliance
  2018-02-06 19:05       ` Hans Verkuil
@ 2018-02-06 19:31         ` Tim Harvey
  0 siblings, 0 replies; 15+ messages in thread
From: Tim Harvey @ 2018-02-06 19:31 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, Jacopo Mondi, Laurent Pinchart,
	Mauro Carvalho Chehab

On Tue, Feb 6, 2018 at 11:05 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On 02/06/2018 07:48 PM, Tim Harvey wrote:
>> On Mon, Feb 5, 2018 at 11:34 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>>> On 02/06/2018 08:16 AM, Tim Harvey wrote:
>>>> On Sat, Feb 3, 2018 at 7:56 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> <snip>
>>>>
>>>> With regards to the 3 failures:
>>>>
>>>> 1. test VIDIOC_G/S_EDID: FAIL
>>>> This is a valid catch where I was returning -EINVAL when the caller
>>>> was simply querying the edid - I've fixed it in my driver
>>>>
>>>> 2. test VIDIOC_DV_TIMINGS_CAP: FAIL
>>>> fail: v4l2-test-io-config.cpp(375): doioctl(node,
>>>> VIDIOC_DV_TIMINGS_CAP, &timingscap) != EINVAL
>>>> fail: v4l2-test-io-config.cpp(392): EDID check failed for source pad 0.
>>>>
>>>> It looks like the purpose of the test is to do an ioctl with an
>>>> invalid pad setting to ensure -EINVAL is returned. However by the time
>>>> the VIDIOC_DV_TIMINGS_CAP ioctl used here gets routed to a
>>>
>>> No, VIDIOC_SUBDEV_DV_TIMINGS_CAP == VIDIOC_DV_TIMINGS_CAP, i.e. the
>>> v4l-subdev API reuses the same ioctl as is used in the 'main' V4L2 API.
>>> See include/uapi/linux/v4l2-subdev.h at the end for a list of 'alias'
>>> ioctls.
>>
>> Ah... thanks - I realized that was happening somehow but couldn't see how :)
>>
>>>
>>> Looking at v7 your tda1997x_get_dv_timings_cap() function doesn't check
>>> for a valid pad field. Same for tda1997x_enum_dv_timings().
>>
>> Right - I noticed this right off as well - I've added pad validation
>> but that didn't resolve the failure.
>>
>> The test failing is:
>>
>>         memset(&timingscap, 0, sizeof(timingscap));
>>         timingscap.pad = node->is_subdev() ? node->entity.pads : 1;
>> ^^^^ this sets pad=node->entity.pads=1 which is invalid
>>         fail_on_test(doioctl(node, VIDIOC_DV_TIMINGS_CAP, &timingscap)
>> != EINVAL);
>> ^^^^ tda1997x_get_dv_timings_cap() gets called with cap->pad = 0 which
>> is valid to returns 0. I don't understand how the userspace pad=1 get
>> changed to pad=0 in my handler.
>
> Actually, you don't need to test the pad in the driver, I just looked at
> the code in v4l2-core/v4l2-subdev.c and the pad is tested there already.
>
> And I just found why it is cleared: it's a bug in v4l2-ioctl.c.
>
> Look up VIDIOC_DV_TIMINGS_CAP in the big table and change this:
>
>         INFO_FL_CLEAR(v4l2_dv_timings_cap, type)
>
> to this:
>
>         INFO_FL_CLEAR(v4l2_dv_timings_cap, pad)
>
> We never noticed this because we never tested this for subdevs. And that's
> why you write compliance tests!

Indeed that fixes it. I'll add that patch to my series.

All of the items on your review of v7 make sense and I'll be posting a
v8 hopefully shortly.

Thanks!

Tim

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-02-06 19:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 15:56 Please help test the new v4l-subdev support in v4l2-compliance Hans Verkuil
2018-02-05 16:21 ` Tim Harvey
2018-02-05 16:27   ` Hans Verkuil
2018-02-05 16:49     ` Tim Harvey
2018-02-05 16:37   ` Mauro Carvalho Chehab
2018-02-05 16:55     ` Mauro Carvalho Chehab
2018-02-05 16:59       ` Hans Verkuil
2018-02-05 17:01         ` Hans Verkuil
2018-02-05 17:33           ` Mauro Carvalho Chehab
2018-02-05 16:58     ` Hans Verkuil
2018-02-06  7:16 ` Tim Harvey
2018-02-06  7:34   ` Hans Verkuil
2018-02-06 18:48     ` Tim Harvey
2018-02-06 19:05       ` Hans Verkuil
2018-02-06 19:31         ` Tim Harvey

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.