summaryrefslogtreecommitdiff
path: root/tests/kms_panel_fitting.c
AgeCommit message (Collapse)Author
2022-06-22tests/kms_panel_fitting: Convert test to dynamicSwati Sharma
Convert the existing subtests to dynamic subtests at pipe/output level. v2: -Fixed if-else block -Removed redundant check Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
2022-04-29tests/kms_panel_fitting: Skip atomic-fastset for non-i915Alex Hung
In kernel function drm_atomic_check_only checks allow_modeset, and it can return -EINVAL (-22) for non-i915 devices. Therefore, let's skip atomic-fastset subtest for non-i915 until specific implementation is added for each gpu driver. Signed-off-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Rodrigo.Siqueira <Rodrigo.Siqueira@amd.com>
2022-04-29tests/kms_panel_fitting: Use 800x600 as lowest resolution for AMD devicesAlex Hung
800x600 is lowest resolution for recent AMD devices. Signed-off-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Rodrigo.Siqueira <Rodrigo.Siqueira@amd.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-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-18tests/kms_panel_fitting: Move Intel GEN check under a is_i915_deviceMark Yacoub
Encapsulate intel-only operations such as intel_get_drm_devid under a is_i915_device check. This allows the subtests to run on non-i915 devices. Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.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-05-20Always pass device to igt_params_setChris Wilson
Don't second guess, require the user to provide the device that wish to set the module parameter for. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2019-12-18tests: Open DRM_MASTER for display operationsChris Wilson
To configure the display, one is required to be the DRM_MASTER. Closes: https://gitlab.freedesktop.org/drm/intel/issues/855 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.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-09-02tests/kms_panel_fitting: Fix plane scaling avoidance on gen7/gen8Matt Roper
Most gen7 and gen8 platforms can't do plane scaling, so we need to ensure the test doesn't try to do plane scaling on those platforms. The legacy non-atomic subtest bakes these platform characteristics into the test itself since legacy modesetting interfaces don't provide a way to probe platform capabilities like atomic does. Maarten previously tried to address this with commit 24c5e0778 ("tests/kms_panel_fitting: Do not use scaling on gen7 and gen8, v2."), but he augmented an existing test for gen9+pipeC which comes too late since we've already turned on the plane at that point. We can fix this by moving the test up higher; not only before we enable panel fitting, but also before we turn on the sprite. Note that this still isn't a great subtest since it's very Intel-specific, despite being part of a generic KMS test that's intended for all vendors. A future enhancement might be to try to probe the platform capabilities with a TEST_ONLY atomic operation before using the legacy interfaces to actually program them. While touching the code, I also added some slight restructuring, added additional comments, and broke up >80 char lines to add clarity to what's going on. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.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-07-25tests/kms_panel_fitting: Do not use scaling on gen7 and gen8, v2.Maarten Lankhorst
Except for ivy bridge, those platforms don't support scaling the sprite planes, so we fail with -ERANGE. Do the same as we do for gen9 pipe C, and do not attempt to scale the sprite plane. It will fail, and the kernel will no longer hide the failure from us. Changes since v1: - Extend from haswell to all of gen7/gen8 (except IVB). Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106606 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-05-24tests/kms_panel_fitting: Make test pass on gen9's pipe CMaarten Lankhorst
The legacy test fails because it tries scaling on pipe C, because the single scaler is already used for CRTC scaling. On other pipes and newer gens we have 2 scalers, so special case pipe C here. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105456 [mlankhorst: Add ickles comment.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-12tests/kms_panel_fitting: Test cleanups.Maarten Lankhorst
Use igt_display_reset() to reset the state, instead of doing it at the end of each subtest. Also remove the usage of a file, and instead allocate a test pattern like the other tests do. We now also have a way to find out if panel fitting property is supported without performing a kmstest call. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-12tests: Always call igt_remove_fb without checking.Maarten Lankhorst
This cleans up the tests slightly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
2018-02-05tests/kms_panel_fitting: Remove dead codeMaarten Lankhorst
fb3 is unused, and fb_id1/2 are also set in igt_framebuffer, so it doesn't need separate member values. image_w/h are also unused and create_fb will always succeed, so more elimination of dead code. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework connector properties to be more atomic, v2.Maarten Lankhorst
In the future I want to allow tests to commit more properties, but for this to work I have to fix all properties to work better with atomic commit. Instead of special casing each property make a bitmask for all property changed flags, and try to commit all properties. Changs since v1: - Mention which properties we set to what. - Assert the property to be set is valid. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-02tests: Stop looking at plane private membersMaarten Lankhorst
Most of these tests have no reason to look at those members, so try other ways of getting the information. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-09-22tests/kms_panel_fitting: Use igt_cairo_image_surface_create_from_png_file()Ville Syrjälä
Switch to using igt_cairo_image_surface_create_from_png_file() over the raw cairo version so that the test can actually find the image file no matter where we run it from. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-01-31tests/kms_panel_fitting: 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>
2016-11-28kms_panel_fitting: Add some more tests for fastset testing.Maarten Lankhorst
Instead of only testing native resolution to a scaled resolution, test the following sequence: Native -> scaled -> scaled (different) -> native. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-27lib/debugs: nuke igt_crc_equal againDaniel Vetter
This was intentionally left out of the abi since CRC have fairly low entropy and can't be reliably compared for inequality in testcases. Spotted while fixing up warnigns in docs, but given that igt_assert_crc_equal has a big comment explaining why only the positive assert exists I'm not sure all those docs are all that useful :( Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-07-26kms_panel_fitting: Add tests for fastboot.Maarten Lankhorst
This is a small testcase to ensure fastboot works as intended. When I removed the pipe updates in intel_update_pipe_config the test started failing, so I think it's useful to keep. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26igt_kms: Remove pan members from igt_plane, v2.Maarten Lankhorst
They're duplicates with src_x/y, so just use those. Changes since v1: - Fix order of parameters in calls to igt_fb_set_position. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
2016-07-26tests/kms: Clean up more users of unassigned pipes.Maarten Lankhorst
Use for_each_pipe_with_valid_output instead. This may increase test time slightly on the affected tests, because now outputs will be tested on every pipe instead of the first pipe. This will increase test coverage to all usable pipes though, so it shouldn't be an issue. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
2016-05-03kms_panel_fitting: Enable connectors with "scaling mode" property set.Robert Foss
Enable testing on all connectors that have the "scaling mode" property set. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93012 Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Enabled test on non-Intel hardware.Robert Foss
Switched from DRIVER_INTEL to DRIVER_ANY to enable test on all hardware. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Switched DRM format to a hardware agnostic alternative.Robert Foss
Changed the DRM format to LOCAL_DRM_FORMAT_MOD_NONE since it is hardware agnostic. Also fixed formatting/tabs. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-used variable.Robert Foss
ref_crc is never assigned or read, and can be safely removed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-read variable pipe_crc.Robert Foss
pipe_crc in data_t is assigned an allocated memory space and then later free'd. But it is never used for any comparisons. It should therefore be safe to remove pipe_crc and the crc requirement. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-read variable.Robert Foss
Remove devid from data_t since it is never read. Also remove one assignment to devid. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: skips if there's a non-eDP display connected. Fix it.Robert Foss
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93012 Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-01-08lib: Extract some common fb create+fill methods into helpersVille Syrjälä
Several tests do one or more of the following: * igt_create_fb() + igt_paint_test_pattern() * igt_create_color_fb() + igt_paint_test_pattern() * igt_create_fb() + igt_paint_image() Extract them into new helpers: igt_create_pattern_fb(), igt_create_color_pattern_fb(), igt_create_image_fb(). v2: Fix typos, and improve API docs (Thomas) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.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-05-12i-g-t: Update kms_panel_fitting to work on other platformschandra konduru
kms_panel_fitting currently enabled for SKL only, but as panel_fitters are available on prior platforms, enable this kms test for them too. Signed-off-by: chandra konduru <chandra.konduru@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-14i-g-t: Adding panel fitting test casechandra konduru
This patch is adding i-g-t test case to test panel fitting usages. v2: -use new tiled types when calling igt_create_fb (me) Signed-off-by: chandra konduru <chandra.konduru@intel.com> [Thomas: convert test to use igt_simple_main] Signed-off-by: Thomas Wood <thomas.wood@intel.com>