renesas/vsp-tests.git
8 months agoRemove dependency on a particular yavta branch master
Laurent Pinchart [Fri, 22 Feb 2019 10:00:58 +0000 (12:00 +0200)]
Remove dependency on a particular yavta branch

All the changes required by the VSP test suite have been integrated in
the master branch of yavta. There is no need to depend on the vsp branch
anymore, remove the corresponding paragraph from the documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
9 months agotests: Provide copy test to validate 1xN streams
Kieran Bingham [Tue, 4 Dec 2018 15:51:41 +0000 (15:51 +0000)]
tests: Provide copy test to validate 1xN streams

Validate that a 1xN stream can be read through the RPF and written
through the WPF.

The test framework does not currently support processing images where
the stride does not match the output width - so the testing is currently
limited to testing only the vertical direction in this aspect.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Drop 1024x768 and 128x128 resolutions]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 months agotests: Add pseudo platform test
Kieran Bingham [Tue, 4 Dec 2018 15:51:40 +0000 (15:51 +0000)]
tests: Add pseudo platform test

Provide an initial test which can run as part of the test suite.
This test will report the platform and kernel version, along with
the identified paths of required utilities.

This will aid in ensuring that required tools are available on a
running platform - and report the kernel and platform details in
any test suite output for clarification of results.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Don't depend on columns]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 months agovsp-lib: Reset controls to defaults on each test run
Kieran Bingham [Tue, 4 Dec 2018 15:51:46 +0000 (15:51 +0000)]
vsp-lib: Reset controls to defaults on each test run

Some of our tests set flipping and rotation controls, and the VSP
instance can be used again by later tests. If these controls are not
reset, then that operation is applied to later tests incorrectly causing
those tests to fail.

In an ideal world, tests should clean up after themselves, and leave the
system in a known state. However the world is not ideal and we would not
be able to guarantee any previous system state before a test was run
anyway. Therefore it is more effective to reset state at the beginning
of a test.

To repair this - reset all control values to their defaults at the start
of every test during test_init()

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 months agovsp-lib: trivial: Fix spelling of Reference
Kieran Bingham [Tue, 4 Dec 2018 15:51:43 +0000 (15:51 +0000)]
vsp-lib: trivial: Fix spelling of Reference

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
18 months agotests: suspend/resume: Increase number of processed frames
Laurent Pinchart [Sat, 19 May 2018 20:00:49 +0000 (23:00 +0300)]
tests: suspend/resume: Increase number of processed frames

The suspend/resume test starts a run of 300 frames and suspends the
system one second later. On some SoCs (namely H3 ES2.0) the VSP
bandwidth is high enough to complete processing of 300 frames in less
than a second. The test thus suspends and resumes the system with the
VSP idle instead of running, defeating the purpose of the test.

Fix this by increasing the number of frames to process to 1000. The
frame count is now passed as an argument to the
test_extended_wpf_packing function to ease future changes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
Changes since v1:

- Don't explicitly state at which frame suspend/resume is expected to
occur as that's device-dependent

- Compare the last three frames instead of just one

18 months agovsp-lib: Capture the kernel log messages in test log files
Laurent Pinchart [Sat, 19 May 2018 19:54:31 +0000 (22:54 +0300)]
vsp-lib: Capture the kernel log messages in test log files

It can be useful to capture kernel log messages in test log files for
diagnostic purpose. Add a simple mechanism to do so by capturing the
full kernel log at the end of the test. The kernel log is cleared first
before starting the test to avoid capturing unrelated messages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Don't clear the kernel log

2 years agotests: Add BRS test
Laurent Pinchart [Thu, 25 May 2017 14:04:49 +0000 (17:04 +0300)]
tests: Add BRS test

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2 years agovsp-lib: Add support for RPF-BRS-WPF pipelines
Laurent Pinchart [Thu, 25 May 2017 14:01:48 +0000 (17:01 +0300)]
vsp-lib: Add support for RPF-BRS-WPF pipelines

Reuse the BRU code, using the brx generic name to cover both BRU and
BRS.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2 years agovsp-lib: Use the correct media device name to count BRU inputs
Laurent Pinchart [Thu, 25 May 2017 14:03:01 +0000 (17:03 +0300)]
vsp-lib: Use the correct media device name to count BRU inputs

Use the media device under test, not the default media0.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2 years agoREADME: Document need for killall command
Kieran Bingham [Wed, 23 Aug 2017 22:41:04 +0000 (23:41 +0100)]
README: Document need for killall command

The killall command is provided by the psmisc package on debian based systems.
On other systems it should be built or added to the filesystem as appropriate.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Use POSIX '.' as 'source'
Kieran Bingham [Wed, 23 Aug 2017 22:41:03 +0000 (23:41 +0100)]
tests: Use POSIX '.' as 'source'

On posix shells, only the '.' command is supported.

Even when running on a full bash shell, the file to source should be
either fully or locally qualified to avoid picking up a stray version
available in $PATH.

Fix both issues by swapping to the posix standard

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Don't perform HSV capture test on Gen3 hardware
Laurent Pinchart [Tue, 28 Feb 2017 23:01:03 +0000 (01:01 +0200)]
tests: Don't perform HSV capture test on Gen3 hardware

The Gen3 VSP doesn't support HSV formats on the RPF or WPF. Skip the
test.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Add HGT test
Niklas Söderlund [Wed, 17 Aug 2016 16:38:02 +0000 (16:38 +0000)]
tests: Add HGT test

Test HGT histogram during video streaming.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Add option to specify histogram type
Niklas Söderlund [Wed, 17 Aug 2016 16:29:49 +0000 (16:29 +0000)]
vsp-lib: Add option to specify histogram type

There are two kinds of histogram that can be generated, HGO and HGT. Let
the histogram compare function know which type it should use.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agogen-image: Add generation of HGT reference frame
Niklas Söderlund [Tue, 13 Sep 2016 15:51:06 +0000 (15:51 +0000)]
gen-image: Add generation of HGT reference frame

Add a new histogram type HGT to be able to compute HGT histogram frame
from RGB data. This is needed to test the HGT module together with the
HST module in the VSP pipeline to convert a image from RGB to HSV.

This also includes a new command line option to be able to specify the
user configuration of the HGT hue areas. This is needed to verify that the
HGT driver can operate with different hue area configurations.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agogen-image: Add option to specify histogram type
Niklas Söderlund [Wed, 7 Sep 2016 07:51:38 +0000 (09:51 +0200)]
gen-image: Add option to specify histogram type

The VSP hardware can compute both 1D (HGO) and 2D (HGT) histograms. The
gen-image utility needs to know which histogram type it should generate
a reference frame for. Add a command line option which allows the user
to set the type.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Fix typo in comment
Laurent Pinchart [Fri, 3 Mar 2017 18:02:19 +0000 (20:02 +0200)]
vsp-lib: Fix typo in comment

HSV is not written HSB.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoscripts: bin2png.sh: Fix POSIX shell compliance
Kieran Bingham [Wed, 22 Feb 2017 15:52:43 +0000 (15:52 +0000)]
scripts: bin2png.sh: Fix POSIX shell compliance

The string manipulations of the form ${VAR/search/replace} are not posix
compliant. Use string deletion, and append instead.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoREADME: List the stress tool as an optional dependency
Laurent Pinchart [Tue, 14 Feb 2017 03:00:57 +0000 (05:00 +0200)]
README: List the stress tool as an optional dependency

The tool is required to run tests vsp-unit-test-0021.sh and
vsp-unit-test-0022.sh.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Add extended stress testing
Kieran Bingham [Sat, 11 Feb 2017 14:43:06 +0000 (14:43 +0000)]
tests: Add extended stress testing

Duplicate the functionality of vsp-unit-test-0020, to provide a longer
duration task for the hardware to run, whilst we load the system using the
'stress' utility.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Add basic stress testing
Kieran Bingham [Sat, 11 Feb 2017 14:43:05 +0000 (14:43 +0000)]
tests: Add basic stress testing

Duplicate the functionality of vsp-unit-test-0001, to provide a set of
work for the hardware to run, whilst we load the system using the
'stress' utility.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Test suspend/resume on active pipelines
Kieran Bingham [Thu, 1 Dec 2016 21:31:49 +0000 (21:31 +0000)]
tests: Test suspend/resume on active pipelines

Provide a test to verify the hardware completes a functional test whilst
performing a suspend resume cycle in parallel. Make use of the
/sys/power/pm_test functionality provided by CONFIG_PM_DEBUG to perform
the testing

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Test suspend/resume on idle pipelines
Kieran Bingham [Thu, 1 Dec 2016 21:31:48 +0000 (21:31 +0000)]
tests: Test suspend/resume on idle pipelines

Provide a test to verify the hardware is functional both before and
after entering a suspend / resume cycle. Make use of the
/sys/power/pm_test functionality provided by CONFIG_PM_DEBUG to perform
the testing

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agologger: Log to the FTrace buffer if tracing is enabled
Kieran Bingham [Thu, 1 Dec 2016 21:31:47 +0000 (21:31 +0000)]
logger: Log to the FTrace buffer if tracing is enabled

Extend the logger such that it will detect the tracing system, and also
append print statement to this ring buffer.

This provides the relevant logging output interspersed in the ftrace
logs for an effective solution to identifying the actions that caused
the traces to occur

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoscripts: bin2png: Support conversion of all files in a directory
Laurent Pinchart [Mon, 13 Feb 2017 14:14:05 +0000 (16:14 +0200)]
scripts: bin2png: Support conversion of all files in a directory

When the first argument is a directory name instead of a file name,
convert all test script output binaries in that directory.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoscripts: Provide bin2png.sh helper
Kieran Bingham [Thu, 1 Dec 2016 21:31:46 +0000 (21:31 +0000)]
scripts: Provide bin2png.sh helper

Identify the size and format from the test output filename, and pass
to raw2rgbpnm for conversion to a PNM file.

From there we can convert easily to a PNG output file.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoscripts: Add statistics to test suite runner
Laurent Pinchart [Mon, 13 Feb 2017 12:37:39 +0000 (14:37 +0200)]
scripts: Add statistics to test suite runner

Print the number of passed, failed and skipped tests.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agoscripts: Test suite runner
Kieran Bingham [Thu, 1 Dec 2016 21:31:45 +0000 (21:31 +0000)]
scripts: Test suite runner

Provide a utility script to execute all vsp unit tests, as well
as the option to execute multiple iterations of the suite.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Add sru-uds and uds-sru pipelines
Laurent Pinchart [Mon, 13 Feb 2017 18:27:39 +0000 (20:27 +0200)]
vsp-lib: Add sru-uds and uds-sru pipelines

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Add pipeline description to the frame file name
Laurent Pinchart [Mon, 13 Feb 2017 18:31:29 +0000 (20:31 +0200)]
vsp-lib: Add pipeline description to the frame file name

If different pipelines from the same test generate the same output frame
size and format from the same input format, the frame binary file names
will collide. To avoid overwriting output files, add the pipeline
description to the file name.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Initialize __vsp_wpf_index to default value in pipe_reset()
Laurent Pinchart [Mon, 13 Feb 2017 18:25:43 +0000 (20:25 +0200)]
vsp-lib: Initialize __vsp_wpf_index to default value in pipe_reset()

This avoids having to store the index in all pipe configuration
functions, as the vast majority of them use WPF.0.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Fix reference frame generation for HSV input formats
Laurent Pinchart [Mon, 13 Feb 2017 15:45:28 +0000 (17:45 +0200)]
vsp-lib: Fix reference frame generation for HSV input formats

gen-image doesn't support processing HSV input frames. Fortunately the
HSV tests don't require it either, when they take an HSV input frame
they just pass it straight to the WPF. We can thus set the input format
to RGB for reference frame generation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agotests: Add RPF cropping test
Kieran Bingham [Fri, 10 Feb 2017 13:30:08 +0000 (13:30 +0000)]
tests: Add RPF cropping test

Test both the input cropping size and position

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Support RPF frame cropping
Kieran Bingham [Fri, 10 Feb 2017 13:30:07 +0000 (13:30 +0000)]
vsp-lib: Support RPF frame cropping

Pass the optional '--crop (X,Y)/WxH' parameter through reference_frame
allowing the input to be cropped for comparison

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agogen-image: Implement option to parse an input crop
Kieran Bingham [Fri, 10 Feb 2017 13:30:06 +0000 (13:30 +0000)]
gen-image: Implement option to parse an input crop

Allow the user to specify an input crop in the form (X,Y)/WxH

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: Filter non-filesystem regular characters
Kieran Bingham [Fri, 10 Feb 2017 13:30:05 +0000 (13:30 +0000)]
vsp-lib: Filter non-filesystem regular characters

Parameters can contain characters not suited to use in filenames.

Add '=','(', and ')' to the filtering, and replace with '_'

This reduces extra escaping, and quoting when working with the output
filenames of failed tests and VSP_KEEP_FRAMES=1

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 years agovsp-lib: sort output frames correctly
Kieran Bingham [Wed, 8 Feb 2017 14:03:56 +0000 (14:03 +0000)]
vsp-lib: sort output frames correctly

In the event of failed frames, or VSP_KEEP_FRAMES being set, the output
file names do not sort such that the reference frame is next to the
failed frame.

This can make comparing reference frames and the relevant output frames
tedious and difficult.

Re-arrange the output filenames such that the sort order will match the
option parameters correctly, followed by either the reference frame
identifier, or the frame number at the end of the filename string

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add YVU 3-planar formats in RGB and WPF tests
Laurent Pinchart [Mon, 24 Oct 2016 12:54:41 +0000 (15:54 +0300)]
tests: Add YVU 3-planar formats in RGB and WPF tests

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add HSV capture and conversion test
Laurent Pinchart [Tue, 6 Sep 2016 23:57:36 +0000 (02:57 +0300)]
tests: Add HSV capture and conversion test

Test conversion from RGB to HSV with output in both HSV24 and HSV32
formats as well as HSV to HSV pass-through.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add support for RPF-HST-WPF pipeline
Laurent Pinchart [Tue, 6 Sep 2016 23:56:07 +0000 (02:56 +0300)]
vsp-lib: Add support for RPF-HST-WPF pipeline

This will be used to test RGB to HSV conversion.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Add conversion from RGB to HSV support
Laurent Pinchart [Tue, 6 Sep 2016 22:54:45 +0000 (01:54 +0300)]
gen-image: Add conversion from RGB to HSV support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Skip VYUY tests on Gen3 platforms
Laurent Pinchart [Thu, 15 Sep 2016 21:08:30 +0000 (00:08 +0300)]
tests: Skip VYUY tests on Gen3 platforms

The Gen3 platforms don't support VYUY, skip the related tests.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Print a message when a test can't be run
Laurent Pinchart [Wed, 14 Sep 2016 10:45:44 +0000 (13:45 +0300)]
vsp-lib: Print a message when a test can't be run

Tests that can't be run due to lack of mandatory features are currently
silent, make them print a message to avoid confusing the user.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Fix fuzzy comparison
Laurent Pinchart [Wed, 14 Sep 2016 10:22:37 +0000 (13:22 +0300)]
vsp-lib: Fix fuzzy comparison

A typo caused fuzzy comparison to be used in all tests. Fix it, and make
sure the fuzzy comparison gets properly enabled when using rotation.

Fixes: ccd867a84863 ("vsp-lib: SRU and rotation are not perfectly emulated by gen-image")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: SRU and rotation are not perfectly emulated by gen-image
Laurent Pinchart [Tue, 13 Sep 2016 17:39:33 +0000 (20:39 +0300)]
vsp-lib: SRU and rotation are not perfectly emulated by gen-image

Turn on fuzzy comparison for rotation and for the SRU regardless of the
scaling ratio.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add flipping/rotation test with UDS
Laurent Pinchart [Tue, 13 Sep 2016 13:13:13 +0000 (16:13 +0300)]
tests: Add flipping/rotation test with UDS

Insert a UDS in the pipeline to force image partitioning on Gen3
hardware and test all flipping and rotation combinations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Provide SRU unit test
Kieran Bingham [Tue, 13 Sep 2016 12:44:10 +0000 (13:44 +0100)]
tests: Provide SRU unit test

Provide a pipeline configuration in vsp-lib, and simple tests for the
SRU processing unit

Signed-off-by: Kieran Bingham <kieran@bingham.xyz>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Make local variables local
Laurent Pinchart [Tue, 13 Sep 2016 13:10:12 +0000 (16:10 +0300)]
tests: Make local variables local

Avoid interfering with the vsp-lib namespace by making local variables
local.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Test identity scaling in UDS test
Laurent Pinchart [Tue, 13 Sep 2016 01:30:40 +0000 (04:30 +0300)]
tests: Test identity scaling in UDS test

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add RPF unpacking tests in RGB and YUV
Laurent Pinchart [Mon, 12 Sep 2016 20:11:24 +0000 (23:11 +0300)]
tests: Add RPF unpacking tests in RGB and YUV

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Lower flip test resolution
Laurent Pinchart [Mon, 12 Sep 2016 20:10:12 +0000 (23:10 +0300)]
tests: Lower flip test resolution

Testing all combinations of flipping and rotation is time consuming,
speed it up by lowering the resolution to 640x480.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Don't convert formats in flip tests
Laurent Pinchart [Mon, 12 Sep 2016 20:08:36 +0000 (23:08 +0300)]
tests: Don't convert formats in flip tests

Use the same input and output formats to disable format conversion as
the purpose of the tests is to test flipping.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Reset the rotation control before running the flip tests
Laurent Pinchart [Mon, 12 Sep 2016 20:07:15 +0000 (23:07 +0300)]
tests: Reset the rotation control before running the flip tests

The rotation control can be set to a non-default value by a previously
run test, reset it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add option to keep all frames when tests succeed
Laurent Pinchart [Mon, 12 Sep 2016 22:03:32 +0000 (01:03 +0300)]
vsp-lib: Add option to keep all frames when tests succeed

When the environment variable VSP_KEEP_FRAMES is set to 1, all frames
will be kept regardless of the test results.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Don't average chroma when generating test input frames
Laurent Pinchart [Mon, 12 Sep 2016 21:20:08 +0000 (00:20 +0300)]
vsp-lib: Don't average chroma when generating test input frames

This avoids double-averaging due to chroma interpolation at the RPF.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Use the gen-image -i argument
Laurent Pinchart [Mon, 12 Sep 2016 20:04:52 +0000 (23:04 +0300)]
vsp-lib: Use the gen-image -i argument

Replace the now defunct -y argument with -i.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Fix alpha value handling
Laurent Pinchart [Mon, 12 Sep 2016 19:33:14 +0000 (22:33 +0300)]
vsp-lib: Fix alpha value handling

Take both the input and output formats into account to compute the alpha
value effectively output by the hardware.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Use both input and output formats to name frame files
Laurent Pinchart [Mon, 12 Sep 2016 19:27:32 +0000 (22:27 +0300)]
vsp-lib: Use both input and output formats to name frame files

Tests can run with a single output format and different input formats.
If multiple failures are recorded the frame files overwrite each others.
Fix this by naming them with both the input and output formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Subsample YUV chroma on input
Laurent Pinchart [Mon, 12 Sep 2016 21:36:59 +0000 (00:36 +0300)]
gen-image: Subsample YUV chroma on input

When the input format is YUV, subsample the chroma during RGB to YUV
conversion based on the YUV format parameters. This matches the RGB to
YUV conversion performed to generate the test input frame fed to the
RPF.

A better fix would be to add support for unpacking all RGB and YUV
formats instead of converting the .pnm reference frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Add -C argument to disable chroma averaging on output
Laurent Pinchart [Mon, 12 Sep 2016 21:16:20 +0000 (00:16 +0300)]
gen-image: Add -C argument to disable chroma averaging on output

gen-image averages consecutive chroma values when subsampling chroma
horizontally. This matches the hardware behaviour, but isn't desired to
produce test input frames in subsampled formats as otherwise the
hardware will average the values a second time in the RPF to interpolate
missing chroma components.

Add a -C argument to disable chroma averaging on output, to be used to
generate test input frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Add input format configuration
Laurent Pinchart [Mon, 12 Sep 2016 20:03:45 +0000 (23:03 +0300)]
gen-image: Add input format configuration

Replace the -y argument with a more flexible -i argument that allows
specifying the input format. This is useful to generate reference frames
based on an RGB  pipeline input format that uses less than 8 bits per
pixel.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoDo not use for loop in data/frames/Makefile
Niklas Söderlund [Fri, 2 Sep 2016 14:15:13 +0000 (16:15 +0200)]
Do not use for loop in data/frames/Makefile

This construct depends on the shell used and do not work for all shells.
Instead use make rules to find and extract all *.pnm.gz frames.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoDon't try to install non-existent script file vsp1.sh
Niklas Söderlund [Fri, 2 Sep 2016 14:15:12 +0000 (16:15 +0200)]
Don't try to install non-existent script file vsp1.sh

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Only remove binaries related to current test
Laurent Pinchart [Sun, 26 Jun 2016 12:25:45 +0000 (15:25 +0300)]
vsp-lib: Only remove binaries related to current test

Removing all .bin files when starting a test removes not only the result
of previous runs of the current test as desired, but also the result of
all tests run previously. Fix it by only removing binaries related to
the current test.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Write frames to temporary directory by default
Laurent Pinchart [Mon, 20 Jun 2016 21:47:56 +0000 (00:47 +0300)]
vsp-lib: Write frames to temporary directory by default

This speeds up tests by avoiding the need to access flash memory or,
worse, NFS.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add WPF flip update tests
Laurent Pinchart [Sun, 19 Jun 2016 22:15:31 +0000 (01:15 +0300)]
tests: Add WPF flip update tests

Test updating the vertical and horizontal flip controls during video
streaming.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add WPF rotation and flip tests
Laurent Pinchart [Fri, 27 May 2016 14:08:34 +0000 (17:08 +0300)]
tests: Add WPF rotation and flip tests

Test all combinations of horizontal flip, vertical flip and rotation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add CLU and LUT test
Laurent Pinchart [Fri, 27 May 2016 14:08:34 +0000 (17:08 +0300)]
tests: Add CLU and LUT test

Test CLU and LUT operation in both RGB and YUV modes with different look
up tables.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoAdd LUT generation script
Laurent Pinchart [Thu, 16 Jun 2016 22:41:54 +0000 (01:41 +0300)]
Add LUT generation script

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add support for pausing and resuming yavta
Laurent Pinchart [Sun, 19 Jun 2016 21:44:41 +0000 (00:44 +0300)]
vsp-lib: Add support for pausing and resuming yavta

When the --pause argument to vsp_runner() is specified, the
corresponding yavta instance will pause after capturing or outputting
the given number of frames and wait for a signal before resuming. The
new vsp_runner_wait() and vsp_runner_resume() functions can be used to
respectively wait for yavta to pause and instruct it to resume.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Replace vsp-runner script with a function from vsp-lib
Laurent Pinchart [Fri, 17 Jun 2016 23:23:36 +0000 (02:23 +0300)]
vsp-lib: Replace vsp-runner script with a function from vsp-lib

This allows reusing variables internal to vsp-lib and getting rid of the
mdev and format arguments to the vsp-runner invocations.

As part of the transition, handle additional options with an explicit
list of supported options instead of passing them straight to yavta.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add CLU and LUT pipelines support
Laurent Pinchart [Thu, 16 Jun 2016 22:41:28 +0000 (01:41 +0300)]
vsp-lib: Add CLU and LUT pipelines support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add support for passing parameters to reference frame generator
Laurent Pinchart [Thu, 16 Jun 2016 21:31:10 +0000 (00:31 +0300)]
vsp-lib: Add support for passing parameters to reference frame generator

The parameters currently supported are horizontal and vertical flipping,
rotation, LUT and CLU.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Store the scaling configuration internally
Laurent Pinchart [Thu, 16 Jun 2016 21:22:11 +0000 (00:22 +0300)]
vsp-lib: Store the scaling configuration internally

This allows deciding whether to compare output frames using the exact or
fuzzy algorithm internally, removing the need for an explicit argument
to the compare_frames function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Perform scaling verification in fuzzy mode
Laurent Pinchart [Wed, 15 Jun 2016 22:52:04 +0000 (01:52 +0300)]
tests: Perform scaling verification in fuzzy mode

The reference frame generator scaling algorithm doesn't match the VSP
scaler in a pixel-perfect fashion, use fuzzy comparision of the result.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Remove unneeded legacy pipeline configuration from HGO test
Laurent Pinchart [Wed, 15 Jun 2016 22:51:25 +0000 (01:51 +0300)]
tests: Remove unneeded legacy pipeline configuration from HGO test

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Use YUV444M instead of UYVY for YUV input formats
Laurent Pinchart [Wed, 15 Jun 2016 23:08:19 +0000 (02:08 +0300)]
tests: Use YUV444M instead of UYVY for YUV input formats

Depending on the test this lowers the conversion errors or ensures a
pixel-perfect match between the reference frame generator and the
hardware. In the latter case we can now use the faster exact output
verification method.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Add YUV422M and YUV444M support to YUV->YUV test
Laurent Pinchart [Wed, 15 Jun 2016 22:50:40 +0000 (01:50 +0300)]
tests: Add YUV422M and YUV444M support to YUV->YUV test

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agotests: Split RPF->WPF test
Laurent Pinchart [Fri, 27 May 2016 08:52:15 +0000 (11:52 +0300)]
tests: Split RPF->WPF test

The VSP instance that supports the largest number of RPF might not be
the same as the one that supports the largest number of WPF. To maximize
test coverage, split the test into RPF and WPF tests that can use
different VSP instances.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Store the number of BRU inputs internally
Laurent Pinchart [Thu, 16 Jun 2016 21:08:12 +0000 (00:08 +0300)]
vsp-lib: Store the number of BRU inputs internally

Instead of getting the number of BRU inputs from an explicit argument to
the compare_frames function, store it internally when configuring the
pipeline. This simplifies the test scripts by removing the reftype
argument to the compare_frames function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Don't pass WPF index and format to comparison functions
Laurent Pinchart [Thu, 16 Jun 2016 19:30:12 +0000 (22:30 +0300)]
vsp-lib: Don't pass WPF index and format to comparison functions

The information is already known to the pipeline configuration
functions, store it internally and reuse it instead of having to pass it
explicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Handle logging internally
Laurent Pinchart [Thu, 16 Jun 2016 20:24:24 +0000 (23:24 +0300)]
vsp-lib: Handle logging internally

Remove the need to pipe individual commands to the logger from the test
scripts by moving all logging code internally to vsp-lib and vsp-runner.

As an interesting side effect the removal of shell pipes from the test
scripts avoids running functions in subshells. This makes it possible
for the pipeline configuration functions to set variables that can be
used later.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Declare all local variables as local
Laurent Pinchart [Thu, 16 Jun 2016 20:46:30 +0000 (23:46 +0300)]
vsp-lib: Declare all local variables as local

Stop the global namespace pollution.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add set control support
Laurent Pinchart [Fri, 27 May 2016 12:58:16 +0000 (15:58 +0300)]
vsp-lib: Add set control support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Support controls as device features
Laurent Pinchart [Fri, 27 May 2016 12:57:36 +0000 (15:57 +0300)]
vsp-lib: Support controls as device features

Enhance the feature checking code to allow checking for the presence of
a particular control on a particular entity.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Create a function to get subdev from entity name
Laurent Pinchart [Fri, 27 May 2016 12:54:44 +0000 (15:54 +0300)]
vsp-lib: Create a function to get subdev from entity name

And use the function in the vsp-runner script instead of duplicating the
same code in multiple locations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Support optional features for tests
Laurent Pinchart [Fri, 27 May 2016 08:50:07 +0000 (11:50 +0300)]
vsp-lib: Support optional features for tests

Add a third argument to test_init() to pass a list of optional features.
If more than one media device supports all the required features, select
the one that supports the highest number of optional features.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Add YUV422M and YUV444M support
Laurent Pinchart [Wed, 15 Jun 2016 22:50:27 +0000 (01:50 +0300)]
vsp-lib: Add YUV422M and YUV444M support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agovsp-lib: Use gen-image to generate frames at runtime
Laurent Pinchart [Tue, 14 Jun 2016 02:25:33 +0000 (05:25 +0300)]
vsp-lib: Use gen-image to generate frames at runtime

Replace the build time reference frames generation system by runtime
generation of the frames. This saves a lot of disk space and allows
tests to easily use new reference frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Add horizontal and vertical flip support
Laurent Pinchart [Thu, 16 Jun 2016 19:18:56 +0000 (22:18 +0300)]
gen-image: Add horizontal and vertical flip support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agogen-image: Add look up table support
Laurent Pinchart [Thu, 16 Jun 2016 02:04:30 +0000 (05:04 +0300)]
gen-image: Add look up table support

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoAdd gen-image tool
Laurent Pinchart [Mon, 13 Jun 2016 01:22:58 +0000 (04:22 +0300)]
Add gen-image tool

The tool is used to generate test images in a variety of formats from a
PNM input image.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 years agoInitial commit
Laurent Pinchart [Mon, 16 May 2016 18:55:52 +0000 (21:55 +0300)]
Initial commit

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>