summaryrefslogtreecommitdiff
path: root/tests/kms_vrr.c
AgeCommit message (Collapse)Author
2022-04-11tests/kms_vrr: Create dynamic subtestsBhanuprakash Modem
Create dynamic subtests with crtc/connector combinations Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@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-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>
2021-03-09tests/kms_vrr: Extend to cover full VRR rangeBhanuprakash Modem
As we are restricting the vrr max to current mode vrefresh, we are not covering the full vrr range with default mode. So, instead of running tests on default mode, loop through the all connector modes and find the mode with max refresh rate to exercise full vrr range. V2: * Add a check if vrr vmax >= connector mode vrefresh (Manasi) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Latvala Petri <petri.latvala@intel.com> Suggested-by: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2021-03-04Revert "tests/kms_vrr: Extend to cover full VRR range"Petri Latvala
Accidentally merged commit that wasn't supposed to be merged yet. This reverts commit be98e1076cae305755e2903788aa0ddd26d836db. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
2021-03-04tests/kms_vrr: Extend to cover full VRR rangeBhanuprakash Modem
As we are restricting the vrr max to current mode vrefresh, we are not covering the full vrr range with default mode. So, instead of running tests on default mode, loop through the all connector modes and find the mode with max refresh rate to exercise full vrr range. V2: * Add a check if vrr vmax >= connector mode vrefresh (Manasi) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Latvala Petri <petri.latvala@intel.com> Suggested-by: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2021-03-04tests/kms_vrr: Optimize to read vrr debugfsBhanuprakash Modem
Instead of reading the vrr_range debugfs for every refresh rate, read at strting of the test and preserve the data for entire subtest. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2021-02-08tests/kms_vrr: Update condition checks for flipline testBhanuprakash Modem
This patch includes below updates * For Flipline test: if refresh_rate <= Vrr_min then - Expected returned refresh rate would be vrr_max - At least 35% of the flips should be in threshold * Update "igt_display_commit_atomic" with "igt_display_commit2" * Calculate the target timestamp based on the delta between event timestamps & whatever the time left to reach the expected rate. * Add few debug prints V2: * Rebase V3: * Compute the target timestamp based on the delta (Ville) V4: * Add a comment to justify the result with refresh rate < 40Hz (Manasi) V5: * Align the starting point with flip completion event (Manasi) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2021-01-01kms_vrr: Avoid falling through an empty/uninitialised 'else'Chris Wilson
../tests/kms_vrr.c:298:12: warning: variable 'diff_ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (rate_ns < vtest_ns.max) ^~~~~~~~~~~~~~~~~~~~~~ ../tests/kms_vrr.c:301:13: note: uninitialized use occurs here if (llabs(diff_ns) < 50000ll) ^~~~~~~ ../tests/kms_vrr.c:298:8: note: remove the 'if' if its condition is always true else if (rate_ns < vtest_ns.max) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-10-14tests/kms_vrr: Add new subtest to validate Flipline modeBhanuprakash Modem
Check flipline mode by making sure that flips happen at flipline decision boundary. Example: if monitor vrr range is 40 - 60Hz and * flip at refresh_rate > 60Hz: Flip should happen at the flipline boundary & returned refresh rate would be 60Hz. * flip at refresh_rate == 50Hz: Flip should happen right away so returned refresh rate is 50Hz. * flip at refresh_rate < 40Hz: Flip should happen at the vmax so the returned refresh rate would be 40Hz. v2: * s/*vblank_ns/*event_ns/ (Manasi) * Reset vrr_enabled state before enabling it (Manasi) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2020-10-14tests/kms_vrr: Use atomic API for page flipBhanuprakash Modem
We should avoid using drmModePageFlip as it'll only be used for legacy drivers, instead, use igt_display_commit_atomic() API to page flip for atomic display code path. v2: * Look for the page flip event not for the vblank event (Nicholas) * Fix to flip with different FBs (Bhanu) v3: * s/get_vblank_event_ns/get_kernel_event_ns/ (Manasi) * Add a comment to capture the flip event (Manasi) * Make sure we are reading valid event (Bhanu) * Test clean-up (Bhanu) v4: * s/*vblank_ns/*event_ns/ (Manasi) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
2020-08-06tests: use an empty brace initializerCarlos Santa
In some sandboxes the toolchain complains about missing braces around initializer, however, using an empty initializer is enough to shut out the compiler. ../tests/kms_plane_cursor.c: In function '__real_main_302': ../tests/kms_plane_cursor.c:305:2 error: missing braces around initializer [-Werror=missing-braces] data_t data = { 0 }; v2: Use an empty initializer { } instead of { 0 } <Petri Latvala> Signed-off-by: Carlos Santa <carlos.santa@intel.com> Reviewed-by: Petri Latvala <petri.latvala@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-01-16tests/kms_vrr: Fix compiler warn on 32bitVille Syrjälä
../tests/kms_vrr.c:307:11: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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-04-16tests/kms_vrr: fix compilation with ClangSimon Ser
Clang fails to compile this file with this error: ../tests/kms_vrr.c:203:20: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] drmVBlank vbl = { 0 }; ^ {} As discussed in [1], using an empty initializer list is the preferred way to fix this. [1]: https://lists.freedesktop.org/archives/igt-dev/2019-March/010841.html Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-01-28tests: Add variable refresh rate testsNicholas Kazlauskas
There are 3 tests for basic variable refresh rate functionality. The tests measure flipping at the average between the current mode refresh rate and the minimum supported variable refresh rate. It tests that VRR is enabled and that the difference between flip timestamps converges to the requested rate. It also tests this under both S3 and DPMS. Potential ideas for future tests: - Test behavior inside VRR range with a stepping test - Test behavior outside of VRR range - Multi-monitor (limited by no async pageflips in DRM atomic API) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>