summaryrefslogtreecommitdiff
path: root/lib/igt_vc4.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-22lib/*.h: ensure that all includes will be thereMauro Carvalho Chehab1-0/+5
Headers should be self-contained, having all includes they need to built. Add the missing ones (alphabetically sorted). Checking what includes were missed was done with the help of this small script: for i in $(ls lib/*.h|grep -v igt_freebsd.h|sort); do gcc -I . -I build/ -I include/ -I ./include/drm-uapi/ -I lib/ -I /usr/include/cairo/ -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include/ -c $i done While at this also sorted includes and added a missing logic to detect duplicated includes at igt_tread. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-01-26lib/igt_vc4: Rework igt_vc4_get_param()Maíra Canal1-1/+1
Instead of returning the error code of the DRM_IOCTL_VC4_GET_PARAM ioctl, make igt_vc4_get_param() return the value of the parameter, considering that the current return is not being used and the value of the parameter is being used. If an invalid parameter is passed to the ioctl, return 0. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-12-19tests/vc4_perfmon: Create test for VC4's Perfmon IOCTLsMaíra Canal1-0/+4
Add igt_subtests for the VC4's Perfmon IOCTLs: DRM_IOCTL_VC4_PERFMON_CREATE, DRM_IOCTL_VC4_PERFMON_DESTROY and DRM_IOCTL_VC4_PERFMON_GET_VALUES. The tests aim to make sure that the performance monitors are being properly created and destroyed and to ensure that improper parameters return an errno. Signed-off-by: Maíra Canal <mcanal@igalia.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Melissa Wen <mwen@igalia.com>
2022-12-19tests/vc4: Skip VC4 tests if they are running on BCM2711/RaspberryPi4Maíra Canal1-0/+1
Currently, if the VC4 tests are run on BCM2711/Raspberry Pi 4, they will fail with no warning. So, add igt_require to the VC4 tests to check if VC4 has rendering capabilities before running the tests. In order to check if VC4 is running on BCM2711/Raspberry Pi 4, create a function that checks if the vc4 driver has syncobj capabilities. If not so, it means that the tests are being run on BCM2711/Raspberry Pi 4, as vc5 doesn't have syncobj capabilities. Signed-off-by: Maíra Canal <mcanal@igalia.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Melissa Wen <mwen@igalia.com>
2022-12-19lib/igt_vc4: Add PAGE_SIZE macro to VC4Maíra Canal1-0/+2
Some VC4 tests use the page memory size, so create a macro to define the page size as 4096 and replace this value for the macro in the VC4 tests. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Melissa Wen <mwen@igalia.com>
2022-12-19tests/vc4: Remove unused or redundant includesMaíra Canal1-0/+2
The VC4 test files contain some includes that aren't required for compilation: some includes are simply not used and others are included through other headers. Simplify the code by removing unused includes. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Melissa Wen <mwen@igalia.com>
2019-05-16lib/igt_fb: Use cairo conversion in igt_fb_convert_with_stride, v4.Maarten Lankhorst1-7/+5
Ever since commit 3fa65f4b532bd9a5b ("fb: Add support for conversions through pixman") we can generate a valid cairo surface for any plane, use this to avoid having to implement our own conversion routine. Instead of duplicating this functionality in igt_fb_convert_with_stride, we can simply convert this to a few cairo calls, because we now support cairo calls to any of the supported framebuffer formats. This is required to make this function more generic, and convert from any format/modifier to any other format/modifier. Changes since v1: - Return fb_id in the cairo case. Changes since v2: - Remove the manual conversion fallback. Changes since v3: - Integrate VC4 conversion routines. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2019-02-26lib/igt_vc4: Add helpers for converting linear to SAND-tiled buffersPaul Kocialkowski1-0/+4
In order to test buffers with SAND tiling, it is useful to convert linear buffers to SAND tiling mode. Introduce helpers to assist in that direction, one that calculates the memory offset in the SAND-tiled buffer for a given pixel position and one that makes use of the latter for framebuffer conversion. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Acked-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-26lib/igt_vc4: Add helpers for converting linear to T-tiled RGB buffersPaul Kocialkowski1-0/+4
In order to integrate testing of T-tiled buffers, the easiest path is to generate patterns (with the already-existing functions) in linear buffers and convert them to T-tiled subsequently. Add helpers to do that conversion, with a first helper that returns the memory offset for a given position in a T-tiled buffer and a second helper that uses it for converting between framebuffers. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Acked-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-02-22igt: Add igt_vc4_get_param() helperBoris Brezillon1-0/+1
v2: Rebase on get/set_tiling helpers (by anholt). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-02-22igt/vc4: Add a helper function to mark BOs purgeableBoris Brezillon1-0/+1
v2: Rebase on get/set_tiling helpers (by anholt). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-11-21igt/vc4_tiling: Test vc4's new set/get_tiling ioctls.Eric Anholt1-0/+3
This just checks that the appropriate errors get thrown, and that the modifier can be set/get successfully, and that the modifier doesn't leak to other BO allocations. Testing of scanout will be done with the writeback support that Boris is building. The modifier has no effect on V3D rendering, so no need to test that. v2: Add to the meson build. Signed-off-by: Eric Anholt <eric@anholt.net>
2016-02-08igt: Add a helper function for creating VC4 BOs.Eric Anholt1-0/+1
v2: Use do_ioctl(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-08igt: Add a helper function for mapping VC4 BOs.Eric Anholt1-0/+1
v2: Use do_ioctl(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-08igt: Add a helper function for getting a VC4 BO that's been drawn to.Eric Anholt1-0/+29
v2: Use do_ioctl(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>