summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-01lib/igt_fb: Add igt_put_cairo_ctx as counter to igt_get_cairo_ctxMaarten Lankhorst
This will allow support for NV12 in the future, where igt_get_cairo_ctx will return a RGB image to draw with, which will be converted in igt_put_cairo_ctx so tests don't have to add special support for NV12. This is the same as cairo_destroy + checking for errors, but not all tests use this correctly so it's better to have a single handler for it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-02-01tests: Remove kms_renderMaarten Lankhorst
This was a test that required manual verification to see whether FBC, was handled correctly. But the automated testing has been added with kms_frontbuffer_tracking, so this test no longer serves a purpose. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Imre Deak <imre.deak@intel.com>
2018-02-01igt/gem_exec_params: Drop drm master privileges only on drm master fdsAntonio Argenziano
Subtest 'secure-non-master' tries to drop drm-master privileges on a non drm-master fd. Instead drop master privileges after the subtest acquires it so that other subtests are not affected by it. v2: - Require root privilege for the sub-test. (Chris) V3: - Cosmetic refactoring. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-01-31tools/intel_reg: Add reading and writing registers through engineMika Kuoppala
Add option to specify engine for register read/write operation. If engine is specified, use MI_LOAD_REGISTER_IMM and MI_STORE_REGISTER_IMM to write and read register using a batch targeted at that engine. v2: no MI_NOOP after BBE (Chris) v3: use modern engine names (Chris), use global fd v4: strcasecmp (Chris) v5: use register definition format for engine (Jani) Cc: Jani Nikula <jani.nikula@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v4) Acked-by: Jani Nikula <jani.nikula@intel.com>
2018-01-30tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modesetVille Syrjälä
Since kernel commit e995ca0b8139 ("drm/i915: Provide a device level .mode_valid() hook") i915 will bluntly reject the HSKEW mode flag. Thus we can't abuse it to force a modeset. Since we don't particularly care about the visual results here we can risk making the display unhappy by eg. flipping the hsync polarity instead. Also add a comment documenting why we're doing this. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104848 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-01-30igt/prime_mmap_coherency: Close dmabuf after useChris Wilson
As we loop over the coherency tests many times, we need to close the dmabufs opened on every pass to prevent a fd leak and the test exploding when it hits the process limit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103649 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-01-26lib: Refactor igt_wait() to use library timersChris Wilson
Use the timer routines for computing elapsed time from igt_core for smaller code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-01-26tests/gem_reset_stats: Fix retrieval of hangcheck stats expectationAntonio Argenziano
The test expected IOCTL 'I915_GET_RESET_STATS' would return an error when not root. That is no longer true in the driver since commit 4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore the test was incorrectly failing. v2: - Add the commit that changed the behaviour in the Driver to the commit message. (Michel) v3: - Reuse get_reset_count instead of implementing a new function. (Michel) Cc: Michel Thierry <michel.thierry@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
2018-01-25tests/kms_ccs: Grab the CRC when the plane is actually enabledVille Syrjälä
Don't turn off the plane we want to test before we grab the CRC. Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104724 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
2018-01-25meson: Use absolute path for IGT_DATADIRPetri Latvala
IGT_DATADIR needs to be an absolute path instead of relative to prefix or data files can only be found if cwd is exactly prefix. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104723 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-24igt/kms_frontbuffer_tracking: Show FBC status during the waitChris Wilson
Currently, we have a sporadic failure in the multidraw tests where it sometimes fails to start FBC in a timely fashion (and at other times works fine). Try to get a little more information as wait it is waiting for by showing the fbc status at each stage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24kms_vblank: Remove teardown code from cleanup_crtcMaarten Lankhorst
New way of doing things is calling igt_display_reset() before any setup code. This way if the configuration stays the same, the initial modeset will be a noop. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24kms_flip: Remove redundant vblank tests.Maarten Lankhorst
wf_vblank is redundant with wf_vblank-ts-check, which also performs a check but runs in the same way. The -EINVAL vblank tests are reproduced in kms_vblank, as are the vblank-vs-* tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24kms_vblank: Add tests implemented in kms_flipMaarten Lankhorst
In kms_flip there are some tests for testing whether the vblank counter is monotonically increasing. Add these subtests to kms_vblank, where they belong. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24tests/kms_flip: Move kms_flip.vblank-vs-hang to kms_vblank, v4.Maarten Lankhorst
There's no need to test this more than once. Add a NOHANG flag which can be used to specify that a subtest can not be run when hanging. If it's set on either the subtest or the mode, the -hang test for this combination will not be generated. Changes since v1: - Merge the patch that renamed HANG to NOHANG. - Rebase after 'reorganize subtests by type'. - Allow subtests to specify NOHANG too. Changes since v2: - Mark accuracy test with NOHANG, gpu reset disables interrupts, causing the test to fail. Changes since v3: - Rebase on top of subtest split changes. - Add nohang comment to accuracy test. (Daniel) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24kms_vblank: Reorganize subtests by pipe, v2.Maarten Lankhorst
Changes since v1: - Move per-pipe subtests to its own function and fix indent. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-24tests/kms_flip: Remove blt/rcs flip tests.Maarten Lankhorst
With the removal of mmio flips, blt and rcs flips are no longer different from doing busy testing in kms_busy. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-23tools/intel_vbt_decode: add --describe optionJani Nikula
Print description of the form <bdb-version>-<vbt-signature> that could be used for e.g. filenames. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-01-23tools/intel_vbt_decode: add --header option to only print headerJani Nikula
Sometimes it's useful just to print the VBT and BDB headers. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-01-23tools/intel_vbt_decode: print child device countJani Nikula
Sometimes useful. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-01-23man: Update for new igt-dev mailing listRhys Kidd
Reflect new mailing list and author in man page documentation. Change made ahead of the eventual project name switch to "IGT GPU Tools". v2: Also update author (Jani Nikula) Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-23doc: Update CONTRIBUTING for new igt-dev mailing listRhys Kidd
v2: Modify comments for feedback received (Petri Latvala) Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-23doc: Correct sentence in READMERhys Kidd
Usage of 'save for/safe for' here could be confusing for non-native English speakers. Rather than fix the typo, let's use the more commonly understand 'except'. Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-23lib/igt.cocci: Fix typoRhys Kidd
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-23doc: Fix typos in CONTRIBUTINGRhys Kidd
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-22igt/pm_rps: Include related kernel RPS infoChris Wilson
Dump i915_rps_boost_info for debug assertion failures, as that contains all the pertinent information the kernel has for RPS tuning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-19tools/intel_vbt_decode: update vbt defs from kernelJani Nikula
Sync up with the following intel_vbt_defs.h changes in kernel: c4fb60b9aba9 ("drm/i915/bios: add DP max link rate to VBT child device struct") d6038611aa3d ("drm/i915: Parse max HDMI TMDS clock from VBT") 6e8fbf8d19e4 ("drm/i915/vbt: Fix HDMI level shifter and max data rate bitfield sizes") 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.") Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-01-19intel_vbt_decode: Typo fixesAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-01-18igt/pm_rps: Increase load for waitboostingChris Wilson
The waitboost subtests encode internal knowledge of the kernel, and should we wish to change how the kernel functions, we also need to update the test (or reconfigure it somehow to express desired latencies for certain workloads). One such change proposed is to remove the waitboost if the target request is also completed, so update the test to not wait on the current batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-01-17igt/gem_tiled_fence_blits: Allocate bo arrayChris Wilson
As we allow more buffers to be allocated to fill larger apertures, we may exceed the static allocation of 4096 buffers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104669 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-01-17meson: Refactor get_option() calls for directoriesPetri Latvala
Fetch the configuration values in the toplevel meson.build for all subdirs to share. v2: Also remember tests/intel-ci/meson.build Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-01-17CONTRIBUTING: Fix spelling mistake and line lengthSean Paul
Noticed while I was reading it. Makes for a good first contribution, I guess. Changes in v2: - None Changes in v3: - None Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2018-01-17tests/kms_plane_scaling: test for multi pipe with scaling, v3.Jyoti Yadav
Add a subtest to display primary and overlay planes on two connected pipes and runs scaling test on both pipes Changes since v1: - Commit first before trying any scaling. (Maarten) - Use the same logic as kms_cursor_legacy to find a pipe and output. (Maarten) - Rework test to work with how cleanup is handled. (Maarten) Changes since v2: - Use get_num_scalers() to only use 2 scalers if available. (Maarten) Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: test scaler with clipping clamping, v3.Jyoti Yadav
This patch adds subtest to test scaler clipping and clamping scenario. Changes since v1: - Modify test to work with the changes to kms_plane_scaling. (Maarten) Changes since v2: - Use get_num_scalers() to skip when needed. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: test scaling with tiling rotation and pixel ↵Jyoti Yadav
formats, v3. This patch adds subtest for testing scaling in combination with rotation and pixel formats. Changes since v1: - Rework test to work with the other changes to kms_plane_scaling. (Maarten) - Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten) Changes since v2: - Put rotation and tiling in an array. (Maarten) Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: Clean up tests to work better with igt_kms, v2.Maarten Lankhorst
The test only runs on gen9+, so we can safely replace all calls with COMMIT_ATOMIC. Also perform some cleanups by making fb an array, and cleaning up in prepare_crtc. This way failed subtests won't cause failures in other subtests. Changes since v1: - Rebase on top of num_scalers changes. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: Move get_num_scalers to a function, v2.Maarten Lankhorst
The number of scalers can depend on the pipe, so require at least 1 scaler before running any subtests. Changes since v1: - More closely match kernel implementation. (Mika) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: Convert from simple test to full testMaarten Lankhorst
Convert the test to run subtests per pipe, before we start adding more subtests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: Fix basic scaling test, v3.Mahesh Kumar
PIPEC doesnt have 3rd plane in GEN9. So, we skip the 3rd plane related scaling test where 2nd OVERLAY plane is not available. Restricting downscaling to (9/10)x original size of the image to avoid "Max pixel rate limitation" of the hardware. When testing with a resolution of 1024x768, the test fails in iterate_plane_scaling because height becomes out of bounds. Lastly, instead of a fixed test image, generate a test pattern at runtime to not run into bxt's hardware limits for scaling. Later patches in this series will cover corner cases of scaling. Changes since v1: - Move out the code reshuffle to a separate commit. (Maarten) This makes it more clear what's fixed. Changes since v2: - Fix iterate_plane_scaling on 1024x768. (Maarten) - Instead of upscaling a test image, use the test pattern with a color. (Maarten) Using a 600x600 test pattern doesn't run into BXT's hardware limits for scaling. Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-17tests/kms_plane_scaling: Move the actual test to its own function.Maarten Lankhorst
We will add more subtests in the future, it's more clear if we split out the actual test to its own function first. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-16igt/gem_linear_blits: Compute GTT size using 4G limitChris Wilson
Both gem_linear_blits and gem_tiled_blit do not request the full 48b GTT layout for their objects, restricting themselves to 4G. The underlying test that they trigger eviction is unaffected by this restriction, so we can simply reduce their memory requirements to fill the low 4G GTT space and so allow them to run on 48b machines. v2: gem_tiled_fenced_blits as well Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-16Update NEWS, bump version to 1.21.Petri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-16meson: Name the project intel-gpu-toolsPetri Latvala
Eventually we're switching the official name to "IGT GPU Tools", but right now there's still a lot of hardcoding to intel-gpu-tools that is to be fixed in the near future. Rename the project in toplevel meson.build to intel-gpu-tools to get meson to generate tarballs roughly the same as autotools in 'dist'. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-16meson: Add quotes in assembler/test/run-test.shPetri Latvala
If the directories contain spaces, run-test.sh fails. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-16meson: Add quotes in man/rst2man.shPetri Latvala
If the directories contain spaces, rst2man.sh fails. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-16meson: Build cnl_compute_wrpllPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-15tests/kms_plane: Run test for all supported pixel formats, v2.Mahesh Kumar
This patch adds a subtest related to pixel format testing. The test tries to create framebuffer with all supported pixel formats on every plane, and tries to draw them using cairo and commits the same on display. Changes since v1: - Make the test more generic and try on all planes, including legacy cursor. Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-15lib/igt_kms: Add more braces around macrosMaarten Lankhorst
The next patch wants to call for_each_pipe_with_valid_output with *pipe and *output, this fails miserably without these braces. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-15tests/perf_pmu: Exercise busy stats and lite-restoreTvrtko Ursulin
While developing a fix for an accounting hole in busy stats we realized lite-restore is a potential edge case which would be interesting to check is properly handled. It is unfortnately quite timing sensitive to hit lite-restore in the fashion test needs, so downside of this test is that it sufferes from a high rate of false negatives. v2: * Make the sleep unconditional and use scientific notiation for large constants. (Chris Wilson) * Use gem_quiscent_gpu instead of gem_sync+usleep to ensure context complete was received under execlists. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-01-15tests/perf_pmu: Verify busyness when PMU is enabled after engine got busyTvrtko Ursulin
Make sure busyness is correctly reported when PMU is enabled after the engine is already busy with a single long batch. v2: * Make the sleep unconditional and use scientific notiation for large constants. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>