Re: v4l2-compliance tests for cache flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/07/2020 15:33, Dave Stevenson wrote:
> Hi Hans, Sergey, & the list.
> 
> I'm running the latest v4l2-compliance (85ec2917 "v4l2-compliance: fix
> stateful encoder tests") against the Raspberry Pi vendor 5.4 kernel
> tree. That means the kernel isn't supporting
> V4L2_BUF_FLAG_NO_CACHE_[INVALIDATE|CLEAN] flags on the buffers, nor is
> anything advertising V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS. I'm
> getting failures in setupMmap.
> 
> With patch "784be6a v4l2-utils: test cache_hints for MMAP queues" the
> test deliberately sets V4L2_BUF_FLAG_NO_CACHE_INVALIDATE and
> V4L2_BUF_FLAG_NO_CACHE_CLEAN on the buffers that it queues.
> Nothing in the kernel is expecting to manipulate those flags as the
> behaviour wasn't really defined before, but the test is failed if they
> aren't cleared. The v4l2 core would only clear them if the kernel
> includes the patch "f5f5fa7 media: videobuf2: handle V4L2 buffer cache
> flags", which currently means only linuxtv/master as that patch isn't
> even in 5.8-rc3.
> 
> Is it really valid to look at the V4L2_BUF_FLAG_NO_CACHE_* flags at
> all if V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS isn't set? If the
> capability isn't advertised, surely the state of those bits is
> undefined.

v4l2-compliance tests are in sync with our master and it expects that
that kernel is used.

It is possible in rare cases to add a version check (use the version
field returned by QUERYCAP) to determine if a feature is in the latest
kernel. It's not done anywhere in the current compliance test, but I'd
accept a patch that disables this test for kernels < 5.9 (since this feature
will land in 5.9).

Regards,

	Hans



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux