summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-09tests: Add color space support to RGB <-> YUV conversion testcscLaurent Pinchart
Run the YUV <-> RGB conversion test with all four color spaces supported by the VSP. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09tests: Add WPF RGB to YUV conversion testLaurent Pinchart
Add a test case to validate RGB <-> YUV conversion in the RPF and WPF. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09vsp-lib: Add support for color spaceLaurent Pinchart
Support configuring the color space when setting formats on subdev pads and on video devices. As the VSP only cares about the encoding and quantization, the colorspace and transfer function parameters are not handled. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09vsp-lib: Use canonical media bus code namesLaurent Pinchart
The media-ctl utility names media bus codes by stripping the MEDIA_BUS_FMT_ prefix from the kernel macro name. For a small set of formats, alternative names are supported for historical reasons. Their usage is discouraged, so use the canonical names in the tests. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09vsp-lib: Centralize pad format setting in functionLaurent Pinchart
Create a new vsp1_entity_set_format() function to set a pad format, and use it through the code. This prepares for automating configuration of colour space parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09vsp-lib: Support specifying pipeline internal format for RPF -> WPFLaurent Pinchart
The RPF can perform color space conversion, converting between RGB and YUV formats. Testing this feature requires specifying different formats on the RPF input and output. Add a --midfmt argument to the format_rpf_wpf() function to specify the RPF output format, and propagate it through the pipeline up to the WPF input. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09vsp-lib: Save RPF input frames upon errorLaurent Pinchart
When a test fail, it can be useful to inspect the frames input to the RPFs. Save them along the frames output by the WPFs and the reference frames. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09gen-image: Add support for YUV to RGB conversionLaurent Pinchart
Support YUV to RGB conversion, to emulate the RPF and WPF CSC. As for RGB to YUV conversion, the coefficients have been reverse-engineered. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09gen-image: Don't copy CSC conversion matrixLaurent Pinchart
Merge the csc_matrix() function into image_convert_rgb_to_yuv() to avoid unnecessary copies of the matrix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09gen-image: Centralize format conversion codeLaurent Pinchart
Create an image_convert() function that encapsulates all format conversion, and use it to replace direct calls to other converter functions. This prepares for extending the supported conversions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09gen-image: Split struct params into CSC and packing parametersLaurent Pinchart
To prepare for improvements to the format conversion code, split the struct params into CSC parameters and packing parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-09gen-image: Update the RGB to YCbCr conversion to match VSP hardwareLaurent Pinchart
RGB to YCbCr conversion is only used at the moment to generate images for test cases that run fully YUV pipelines. The exact value of the RGB to YCbCr conversion matrices hasn't mattered much so far. However, this will change with introduction of tests that perform RGB to YCbCr conversion. To achieve pixel-perfect match between the reference and hardware frames, reference images need to be generated with the exact method used by the VSP. Replace the current coefficients by values obtained from reverse-engineering of the RGB to YCbCr conversion performed by the VSP1. Remove support for SMPTE240 and BT.2020, as the VSP hardware supports BT.601 and BT.709 only. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-05gen-image: Round sub-sampled chroma towards zeroLaurent Pinchart
Based on tests, the VSP1 hardware seems to round averaged chroma values towards 0 when subsampling YUV formats. Replicate the same calculation in gen-image. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-04Use correct .ppm extension for PPM imagesLaurent Pinchart
The reference images used by the test scripts are in PPM format, not PNM. Use the correct file extension. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-04Convert from make to mesonLaurent Pinchart
Meson makes cross compilation easier. Replace the make-based build system with meson. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2025-04-04gen-lut.py: Replace tabs with spacesLaurent Pinchart
Python source code is typically indented with 4 spaces instead of tabs. Update gen-lut.py accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-11-22scripts: Take all skipped tests into accountHEADmasterLaurent Pinchart
Some skipped tests print a "skip" message, while other print "skipped". This leads to some of them not being counted. Standardize on "skip". Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2023-11-22scripts: Fix computation of the total number of testsLaurent Pinchart
If a test scripts outputs a line that doesn't match the pass/fail/skipped criteria, the line is counted in the total number of tests run, but not attributed to any individual category. This results in a summary message such as 189 tests: 170 passed, 0 failed, 3 skipped Fix it by ignoring those lines. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2022-02-28tests: Add RPF cropping test for YUV formatsLaurent Pinchart
YUV formats can be subsampled, which interact with cropping. Add a test to verify that the VSP driver handles this correctly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2022-02-28gen-image: Crop input image before format conversion to YUVLaurent Pinchart
When converting the input image to a subsampled YUV format, chroma components are averaged horizontally to emulate the VSP internal conversion to YUV444. If the image is subsequently cropped to emulate the RPF cropping, the edge chroma values end up effectively taking into account pixels outside of the crop rectangle. This doesn't match the hardware mode of operation which crops the image when reading it through DMA, before performing any other operation. Fix this by cropping the image just after reading it, before format conversion. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2022-02-28tests: Add SPDX headers to vsp-unit-test-0026.shLaurent Pinchart
vsp-unit-test-0026.sh is missing SPDX headers. Add them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2022-02-28scripts/logger: Use new monotonic-ts toolKieran Bingham
Utilise the new monotonic timestamping tool to remove the manual parsing of timestamps via /proc/timer_list which can only be read by root. This also simplifies the processing required and contains all timestamping actions within a single process space. 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>
2022-02-28src: monotonic-ts: Monotonic timestamp loggingKieran Bingham
Introduce a new utility which prefixes a monotonic timestamp rendered in the same format as the kernel logs to all lines fed in through stdin. 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>
2022-02-28gen-lut: Update for python3Kieran Bingham
Python2 has now gone end-of-life and is discontinued. Update the gen-lut utility to use python3 directly, converting xrange usages to range, and using bytearray to store the tables and write them directly removing the discontinued file object. 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>
2020-09-16tests: Provide {un,}bind testingKieran Bingham
Perform unbind-bind testing of the VSP devices to validate successful removal of the drivers. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-07-14gen-image: Replace copyright text with SPDX tagsLaurent Pinchart
Standardize on the usage of SPDX tags. No change in copyright is included. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2020-07-14Add license and copyright informationLaurent Pinchart
Add SPDX tags to describe license and copyright information to all files in the repository. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2019-02-23Remove dependency on a particular yavta branchLaurent Pinchart
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>
2019-02-19tests: Provide copy test to validate 1xN streamsKieran Bingham
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>
2019-02-19tests: Add pseudo platform testKieran Bingham
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>
2019-02-19vsp-lib: Reset controls to defaults on each test runKieran Bingham
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>
2019-02-19vsp-lib: trivial: Fix spelling of ReferenceKieran Bingham
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>
2018-05-21tests: suspend/resume: Increase number of processed framesLaurent Pinchart
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
2018-05-21vsp-lib: Capture the kernel log messages in test log filesLaurent Pinchart
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
2017-08-30tests: Add BRS testLaurent Pinchart
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>
2017-08-30vsp-lib: Add support for RPF-BRS-WPF pipelinesLaurent Pinchart
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>
2017-08-30vsp-lib: Use the correct media device name to count BRU inputsLaurent Pinchart
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>
2017-08-24README: Document need for killall commandKieran Bingham
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>
2017-08-24tests: Use POSIX '.' as 'source'Kieran Bingham
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>
2017-04-26tests: Don't perform HSV capture test on Gen3 hardwareLaurent Pinchart
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>
2017-03-03tests: Add HGT testNiklas Söderlund
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>
2017-03-03vsp-lib: Add option to specify histogram typeNiklas Söderlund
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>
2017-03-03gen-image: Add generation of HGT reference frameNiklas Söderlund
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>
2017-03-03gen-image: Add option to specify histogram typeNiklas Söderlund
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>
2017-03-03vsp-lib: Fix typo in commentLaurent Pinchart
HSV is not written HSB. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2017-02-22scripts: bin2png.sh: Fix POSIX shell complianceKieran Bingham
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>
2017-02-14README: List the stress tool as an optional dependencyLaurent Pinchart
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>
2017-02-13tests: Add extended stress testingKieran Bingham
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>
2017-02-13tests: Add basic stress testingKieran Bingham
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>
2017-02-13tests: Test suspend/resume on active pipelinesKieran Bingham
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>