summaryrefslogtreecommitdiff
path: root/tests/kms_plane_lowres.c
AgeCommit message (Collapse)Author
2022-06-14tests/kms_plane_lowres: Test cleanupKarthik B S
Add test cleanup function and call it outside the dynamic subtest, so that the cleanup happens even in case of subtest failure. v2: -Move igt_display_reset() and igt_output_set_pipe() outside the plane loop (Bhanu) -Add igt_display_require_output() in fixture (Bhanu) Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
2022-06-14tests/kms_plane_lowres: Convert test to dynamicKarthik B S
Covert the existing subtests to dynamic subtests at pipe/output level. v2: -Use array of structures to populate subtests to avoid code duplication (Bhanu) -Update subtest name (Bhanu) v3: -Pass 'modifier' variable while calling test_planes_on_pipe (Bhanu) -Add '\n' in igt_describe (Bhanu) Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
2022-03-09igt/tests: Add support for Tile4(TileF) format to tests/kms_plane_lowresJeevan B
Adding subtest to test new tiling format. Signed-off-by: Jeevan B <jeevan.b@intel.com> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
2021-10-11igt: s/DRM_FORMAT_MOD_NONE/DRM_FORMAT_MOD_LINEAR/Ville Syrjälä
DRM_FORMAT_MOD_LINEAR is the more sensible name for DRM_FORMAT_MOD_NONE. Use the better name. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-07-15Nuke local versions of DRM_FORMAT and DRM_MODELucas De Marchi
Use the definition from kernel headers. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-15Remove local copies of I915 macrosLucas De Marchi
Just use the one from the kernel headers. Updated with: git grep -l LOCAL_I915 | \ xargs sed -i -e '/^#define LOCAL_I915/d' -e 's/LOCAL_\(I915[[:alnum:]_]*\)/\1/g' Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-06-07lib/i915: Add intel_display_ver() and use it in display tests/libsMatt Roper
Display code should check the display version of the platform rather than the graphics version; on some platforms these versions won't be the same. v2: - Continue to use intel_gen() in draw_rect_blt() since it's checking the version of the blitter engine (graphics) rather than the display version. (Jose) - Rename some gen -> display_ver in kms_universal_plane too. (Jose) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2021-05-31tests/kms_plane_lowres: Use lowest mode for testingMika Kahola
Search and use the lowest possible mode, when switching resolutions from the default to the lowest mode and back. While at it, reset display after each subtest run. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2021-05-19tests/kms_plane_lowres: Reset the state before exiting the testBhanuprakash Modem
Before starting the next subtest, clean up the states to default values, those are assumed by other tests. This patch will also fix few redundant checks. Cc: Imre Deak <imre.deak@intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
2021-04-19Added test description for kms testsNidhi Gupta
Added description for following tests: tests/kms_atomic.c tests/kms_concurrent.c tests/kms_content_protection.c tests/kms_fbcon_fbt.c tests/kms_getfb.c tests/kms_lease.c tests/kms_panel_fitting.c tests/kms_pipe_b_c_ivb.c tests/kms_plane_lowres.c tests/kms_plane_scaling.c tests/kms_prop_blob.c tests/kms_rmfb.c tests/kms_sequence.c tests/kms_vrr.c tests/kms_pipe_crc_basic.c tests/kms_plane_alpha_blend.c tests/kms_draw_crc.c tests/kms_tv_load_detect.c tests/kms_busy.c tests/kms_force_connector_basic.c tests/kms_setmode.c Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2020-07-21tests/kms: Skip kms test cases for disabled pipesMohammed Khajapasha
Skip the kms test cases for disabled pipes with non-contiguous pipe display. Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-07-07lib/igt_fb: remove extra parameters from igt_put_cairo_ctxMelissa Wen
The function igt_put_cairo_ctx currently requires three parameters, but only one of them is used in it. This patch removes the useless parameters, making the code more readable and cohesive. It also applies the change to all occurrences of the function in the code. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-02-04tests/kms_plane_lowres: Fix CRC mismatchMika Kahola
Mixing SDR and HDR planes yields to CRC mismatch. The patch computes the reference image and CRC with the main plane matching the SDR/HDR plane type. v2: HDR planes are not defined for gen9 and older (CI) References: https://gitlab.freedesktop.org/drm/intel/issues/899 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2019-12-03tests/i915/kms: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from all the kms tests since this feature is not supported anymore. v2: Rebase Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-11-29tests/kms_plane_lowres: Stop relying in debugfs display_infoVille Syrjälä
Switch the test to rely purely on crcs instead of parsing stuff from the debugfs display_info file. Such parsin is fragile and will cause test failures whenever anyone tries to adjust the file layout. Let's trust that crcs are good enough to catch cases where we misconfigure the planes. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-11-29tests/kms_plane_lowres: Nuke unused definesVille Syrjälä
MAX_CRCS and LOOP_FOREVER are unused. Get rid of them. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-08-30tests/kms_plane_lowres: Skip if no suitable mode is possibleMatt Roper
When choosing a low resolution mode to switch to, we search the connector's mode list for a mode that's small enough that a plane positioned in the bottom left corner of the screen in the original mode will be fully offscreen in the new, smaller mode. However if no suitable modes are found in the modelist, we blindly fall back to a 10x7 mode without actually checking that the canary plane will now be offscreen. If, for example, the original mode was 13x7, then switching to 10x7 will leave the plane visible onscreen, causing the test to fail. Before falling back to a 10x7 mode, check whether that's actually small enough. If it isn't just skip this subtest. v2: Restructure the skip condition to make it more obvious why this size limitation is important. (Simon) Cc: Simon Ser <simon.ser@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105581 Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-05-27tests: Remove redundant igt_exit() callsPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-04-01tests/plane_lowres: Test each plane individuallyJosé Roberto de Souza
ICL has some many planes per pipe that it is causing this test to skip due bandwidth limitation when combined with 4K displays. The objective of this test is test the visibility of the planes when switching between high and low resolution, more information in the patch that added this test 12e34d8c909a ("tests/kms_plane_lowres: Plane visibility after atomic modesets"). So it was setting all the planes the tested pipe in the bottom left of the display using the height of high resolution, checking the visibility and then switching to the low resolution mode and checking again the visibility and now it is expected that all planes would be invisible. So to overcome ICL bandwidth issues, here it is testing each plane individually. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01lib: Share the 1024x768 mode among testsJosé Roberto de Souza
Three test were duplicating this 1024x768 mode so lets move it to lib and share it. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01tests/kms_plane_lowres: Search for modes of the connector being testedJosé Roberto de Souza
get_lowres_mode() was looking for the desired mode over all connectors what could cause commit to fail due incompatibility. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-01-08tests/kms_plane_lowres: Don't fail tests when missing format/mod supportNicholas Kazlauskas
The kms_plane_lowres subtests will fail on non-i915 hardware because of the devid lookups and tiling format requirements. This patch makes use of the igt_display_has_format_mod() helper to check for support before failing fb creation. The tests still won't fully run yet on i915 hardware because they'll skip during calls to igt_assert_plane_visible - those require an i915 extension to get the CRTC/plane set for a given pipe. v2: Use igt_display_has_format_mod helper (Ville) v3: Move variable declarations to loop scope (Ville) Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-10-01igt: Require a display (KMS enabled) for KMS testsChris Wilson
Simple rule of thumb, if a kms_* test calls igt_display_init() in its global fixture, skip the entire test if the driver has disabled KMS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-08-14tests: Replace calls to igt_pipe_crc_drain + get_single with ↵Maarten Lankhorst
igt_pipe_crc_get_current() This is a more race free of accomplishing the same. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-02-26tests/kms_plane_lowres: Drain pipe before reading CRCMika Kahola
In CI runs we every now and then fail to read correct CRC yielding an error when comparing reference and grabbed CRC's. Let's first fix the test so that we drain the pipe first and then read the correct CRC. References: https://bugs.freedesktop.org/show_bug.cgi?id=103166 Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
2017-12-13test/kms_plane_lowres: Fix display_commit_mode() so it returns the crcArkadiusz Hiler
Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of returning the value through the parameter that is only a single pointer. This causes only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten. Let's fix that! Also add missing hires crc comparison (M. Kahola). v2: make display_commit_mode return just the last CRC v3: Don't do memory allocations, it's hard. (Maarten) v4: Use igt_pipe_crc_collect_crc() instead, cleans up crc handling a lot. Cc: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-23tests/kms_plane_lowres: Rework tests to work without fbcon, v3.Maarten Lankhorst
kmstest_get_crtc was skipping because at that point the crtc was not active yet, instead we should only use igt_assert_plane_visible directly. Unexport kmstest_get_crtc, since nothing here should need it. While at it fix a small leak in igt_assert_plane_visible, the only remaining user. Additionally, it' s not allowed to obtain crc on a disabled pipe, so wait until the pipe is enabled before allocating the crc. Changes since v1: - Move igt_pipe_crc_new until after pipe is enabled. - Move test_init() into test_setup(), it's redundant.. - Remove pipe_crc from data, no need to have it there. Changes since v2: - Increment fb pointer for igt_plane_set_fb, in order to set a different fb on each plane correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-08-14lib/kms: Add for_each_pipe_staticDaniel Vetter
for_each_pipe cannot be used for enumerating testcases, so provide something that can. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-16tests: Rename I915_MAX_PIPES to IGT_MAX_PIPESLeo (Sunpeng) Li
Name should not be driver-specific. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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-31tests/kms_plane_lowres: Add support for dynamic number of planesRobert Foss
Add changes reflecting the new support for dynamic number of planes per pipe. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-01-31lib/igt_kms: Rename kmstest properties nplanes and planeRobert Foss
Rename these properties to have them use the same naming convention as the igt_*_t structs. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-01-31lib/igt_kms: Add index property to kmstest_plane structRobert Foss
Add an index property which helps accessing the corresponding igt_plane_t structure through the igt_*_get_plane() functions. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-01-13tests/kms_plane_lowres: Plane visibility after atomic modesetsMika Kahola
Testcase for plane visibility after atomic modesets. The idea of the test is the following: - draw a blue screen with high resolution - enable a yellow plane, visible, in lower-left corner - set a new lower resolution mode (1024x768) that makes plane invisible - check from debugfs 'i915_display_info' that the plane is invisible - switch back to higher resolution mode - check from debugfs 'i915_display_info' that the plane is visible again - repeat number of iterations, default 64 v2: allow test to be run on non-Intel drivers (Daniel) moved test for plane visibility to as helper function (Daniel) moved get_vblank() function to be part of helper functions (Daniel) rename 'tiling' parameter as 'modifier' (Daniel) select a mode from a list so that the plane should be invisible. use default 1024x768 mode only as a fallback if decent mode has not been found (Daniel) add tiling MODE_NONE (Daniel) v3: draw as many overlay planes as the platform supports + cursor plane on top of each other on lower-left corner skip the test if i915_display_info file is not available test plane visibility with igt_assert_plane_visibility() function drop option for multiple test iterations (Daniel Vetter) v4: switch 'for_each_connected_output()' to 'for_each_valid_output_on_pipe()' skip Y and Yf tiling for generations older than 9 (Maarten) Cc: Daniel Stone <daniel@fooishbar.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>