summaryrefslogtreecommitdiff
path: root/tests/kms_draw_crc.c
AgeCommit message (Collapse)Author
2018-10-04igt: Check drmModeGetResources()Chris Wilson
If KMS is not supported on the device, drmModeGetResources() will return NULL, often this is an indication that we should not attempt to run the test. Although it would be preferred to use something like igt_require_display() as the canonical check and assert that drmModeGetResources() did not hit an error, it is not always practical as the tests do not utilize the common igt_display abstraction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-09-25lib/kms: Pass the number of planes explicitly to __kms_addfb()Ville Syrjälä
Currently __kms_addfb() assumes that only the first plane can be at offset 0. I don't particularly like such assumptions so let's just pass in the number of planes explicitly. We'll also require offsets[] to be passed in always. Nothing really to gain by making it optional. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/kms: Pass strides[] to __kms_addfbVille Syrjälä
Make __kms_addfb() usable with planar formats by passing in the stride for each plane. v2: Handle strides[1] for planar formats in kms_available_modes_crc Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-02-01lib/fb: Add support for creating planar framebuffers, v3.Maarten Lankhorst
Add support to create planar framebuffers, but don't add formats that support them yet. This first requires conversion to the RGB24 format. Changes since v1: - Don't crash in igt_create_bo_with_dimensions(). Changes since v2: - Zero offsets for dumb fb too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> [mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
2017-10-09tests/kms_draw_crc: Skip tests for unsupported formatsVille Syrjälä
10bpc formats aren't supported on all platforms, so skip the test when we can't create the framebuffer. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-08tests/kms_draw_crc: Skip mmap_wc tests if the platforms doesn't support mmap_wcVille Syrjälä
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-07-25tests/kms_draw_crc: add support for Y tilingPaulo Zanoni
This is the program that's supposed to test lib/igt_draw. We just added Y tiling support for the library, so add the tests now. Reviewed-by: Praveen Paneri <praveen.paneri@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-04tests/kms_draw_crc: remove unnecessary mode unset callsPaulo Zanoni
I couldn't think of a reason why we would need to unset the CRTCs before doing the modesets on this test, so remove all the mode unset calls. Before: $ time -p sudo ./kms_draw_crc real 44.74 $ time -p for i in $(sudo ./kms_draw_crc --list-subtests); do sudo ./kms_draw_crc --run-subtest $i; done real 121.61 After: $ time -p sudo ./kms_draw_crc real 7.40 $ time -p for i in $(sudo ./kms_draw_crc --list-subtests); do sudo ./kms_draw_crc --run-subtest $i; done real 14.32 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-04tests/kms_draw_crc: remove hardcoded PIPE_APaulo Zanoni
The test used to assume pipe A was being used for everything, and we tried to fix this in commit "tests: fix CRTC assignment for a few tests", but the pipe CRC code was forgotten. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-03-03tests: fix CRTC assignment for a few testsPaulo Zanoni
All the tests I wrote always assumed that every connector supported CRTC 0. This is not the case for BSW and possibly others, so fix the tests before the CI reports more failures. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-12-04lib/kms+tests: Use cached connector stateDaniel Vetter
Speeds up testcases except for those where we want to exercise the probing itself. The only exceptions left where we do a full probe are - pm_rpm: We use it to make sure the kernel doesn't get things wrong with power domains, so we really want to exercise the full probe paths. And there the only place really is the specific validation done with the data gathered by get_drm_info. - kmstest_force_ functions: Newer kernels should be better at re-probing state when the force sysfs fields change, but better safe than sorry. v2: I also consolidated the start_n_modes and start_connectors while at it - move one of the fixup hunks to this patch that accidentally got misplaced (Thomas). Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-11-03tests: Run igt.cocciDaniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-14lib/igt_draw: add support for RGB565 and XRGB2101010Paulo Zanoni
We need to test those pixel formats on the FBC code, so let's make sure the drawing library works on them first. v2: Update the gtkdoc (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-14lib/debugfs: wait_for_keypress("crc") when collecting CRCPaulo Zanoni
Let's just steal the "crc" namespace and add this by default to igt_pipe_crc_collect_crc() instead of adding more calls to other tests. If tests want special waits on just some of their collect_crc() calls, they can use another name instead of "crc". This is very useful when developing, especially when the CRC we get is wrong: we want to look at the screen to see what's going on before we can think about how to fix the problem. So let's add this to the lib instead of adding this to every single test I need to debug. v2: Add some documentation (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-05-07lib: add igt_drawPaulo Zanoni
For all those IGT tests that need an easy way to draw rectangles on buffers using different methods. Current planned users: FBC and PSR CRC tests. There is also a tests/kms_draw_crc program to check if the library is sane. v2: - Move the test from lib/tests to tests/ (Daniel). - Add igt_require() to filter out the swizzling/tiling methods we don't support (Daniel). - Simplify reloc handling on the BLT case (Daniel). - Document enum igt_draw_method (Daniel). - Document igt_draw_get_method_name() (Paulo). v3: - Add IGT_DRAW_MMAP_WC (Chris). - Implement the other trivial swizzling methods (Chris). - Remove the gem_sync() calls (Chris). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>