summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-12-04lib: Add GPGPU fillZhenyu Wang
This is to add fill operation using GPGPU pipeline which is similar to current media fill. This can be used to simply verify GPGPU pipeline and help to enable it on newer HW, currently it works on Gen7 only and will add support on later platform. Now this sets very simply thread group dispatch for one thread per thread group on SIMD16 dispatch. So the fill shader just uses thread group ID for buffer offset. v2: No new fill func typedef but adapt to igt_fillfunc_t. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-12-04lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_tZhenyu Wang
This makes fill function more general to prepare for other fill method using GPGPU pipeline. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-11-25lib: ensure subtests are not added to simple testsThomas Wood
Simple tests do not support subtests, so fail if igt_subtest is used in one. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25lib: fix symbol names in documentation commentsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25demos/intel_sprite_on: Added support to compile intel_sprite_on on Android.Gagandeep S Arora
Added Android.mk for intel_sprite_on. v2: Addressed review comments by Daniel Vetter. - Moved the cairo independent functions from igt_kms.c to igt_aux.c. Signed-off-by: Gagandeep S Arora <gagandeep.s.arora@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25lib: fix igt_reset_connectorsThomas Wood
Use igt_debugfs_open to open the connector file, since the forced_connectors array now only stores the connector path relative to the debugfs path. Also add some extra error checking to ensure a test failure if the reset fails. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829 Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-24lib/igt_debugfs: Don't setup crc in _newDaniel Vetter
The problem is that this causes writes to registers, and if the pipe is off they might go nowhere (e.g. when runtime pm is enabled). Furthermore we can only really check once the modeset setup is done, but again most tests set up the CRC structure before calling igt_commit and friends. We could add crc restore support to the kernel's rpm code, but that will end up being rather invasive and fragile hard-to-test code. Now originally this was needed back when CRC support wasn't available everywhere. But that's fixed now. So given all this just drop that sanity check and make sure that we only touch the debugfs file (and so the hw state) when we know the pipe is running in the desired configuration. A complementary kernel patch will try to catch offenders by returning -EIO if the pipe is off. v2: Forgot to git add one hunk. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-18lib/aux: Make it clear that rtcwake failures aren't bugsDaniel Vetter
Because QA has a bunch of shitty machines with old distros and tends to re-port this all the time. References: https://bugs.freedesktop.org/show_bug.cgi?id=82232 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17lib/os: Push simulation test down into intel_require_memoryDaniel Vetter
This has the upside that we'll never forget to add it to thrashing tests. But we'll also never miss to move it when adding basic functionality tests to existing binaries. Chris already started this refining work in e.g. commit d77eda6614a1955717f224be023dedf74eb7735d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Nov 14 07:45:40 2014 +0000 igt/gem_linear_blits: Require that we do the full test by moving igt_skip_on_simulation into subtests. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17lib/os: Pust igt_require into memory check functionDaniel Vetter
More in line with the usual igt pattern and simplifies the code - every called just wrapped it in igt_require. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-14tests/pm_rpm: add gem-evict-pwrite subtestImre Deak
This triggers a device suspended WARN in the kernel in gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl. The sequence is suggested by Daniel. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-13lib: only skip subsequent tests if a timeout occurs outside of a subtestThomas Wood
Make timeout behaviour more consistent with igt_fail, where subsequent subtests are only skipped if the failure occurs outside of a subtest. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718 Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-13lib/tests: add a test for igt_set_timeoutThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06tests: use igt_debugfs where possibleThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib: add the ability to include a description with a testThomas Wood
The IGT_TEST_DESCRIPTION macro can be used to define a description for a test. v2: Remove semicolon from end of macro (Damien Lespiau) Add API documentation for the macro. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib/tests: don't use hard error status to indicate test failureThomas Wood
An exit status of 99 is reported separately in the test summary as an error, rather than as a test failure. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib/tests: fix tests and test list locationThomas Wood
The igt_command_line.sh script was moved by commit 685e577 (Move library selftests to lib/tests), but the location of the tests and the test lists was not updated. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06Mediafill/skl: Remove redundant field to fix GPU hangZhao Yakui
After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the OUT_RELOC is updated on Broadwell and later, which is to handle the 64-bit field of gfx address internally. In such case some commands should be fixed, otherwise GPU hang will be triggered when running gem_media_fill. (It is already fixed on Broadwell) Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-11-06Rendercopy/skl: Remove redundant field to fix GPU hangZhao Yakui
After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the OUT_RELOC is updated on Broadwell and later, which is to handle the 64-bit field of gfx address internally. In such case some commands should be fixed, otherwise GPU hang will be triggered when running rendercopy. (It is already fixed on Broadwell) Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-11-04ioctl_wrappers: Pass in offset to CPU mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-31lib/igt_core.h: add debug messages for test requirementsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-31lib/igt_core.h: fix igt_skip_on_f requirement messageThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29lib/tests: use the "check_" prefix for testsThomas Wood
The "check_" prefix ensures the test programs are not installed and are only built when "make check" is run. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29build: fix distcheckThomas Wood
Fix distcheck issues introduced by commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29lib: ensure the library is built before the testsThomas Wood
This fixes the build problems introduced by commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29Move library selftests to lib/testsDaniel Vetter
Again they're not really igt testcases so are in the way of running spatch unconditionally. Move them someplace else. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-23lib: fix #define maxMika Kuoppala
Regression from: commit be4710a541b517b5f8663448bffed5656d59b47b Author: Thomas Wood <thomas.wood@intel.com> Date: Fri Oct 10 11:20:35 2014 +0100 lib: add common min and max macros Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85218 Tested-by: Guo Jinxian <jinxianx.guo@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-22lib/igt_aux: move audio RPM code to igt_setup_runtime_pm()Paulo Zanoni
If we don't enable audio runtime PM, the audio driver won't release its reference, the refcount won't ever become zero, so we will never actually runtime suspend. So move this code from pm_rpm.c to igt_aux.c, so kms_flip - and any other IGT test case using RPM - can benefit from it. Previously, if you ran pm_rpm before running the other tests - or if you just didn't have snd_hda_intel loaded - you wouldn't notice this bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-21tests/gem_exec_parse: test for chained batch buffersBrad Volkin
libva makes extensive use of chained batch buffers. The batch buffer copy portion of the command parser has the potential to break chained batches, so add a simple test to make sure that doesn't happen. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-17lib/igt_aux: make igt_wait_for_pm_status() resist the signal helperPaulo Zanoni
If the signal helper is active, the usleep() calls return earlier, and we may end up returning false way before the 10s timeout, failing the subtests. This currently happens on the kms_flip RPM interruptible subtests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-17lib: add common min and max macrosThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-17lib: various documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-10tools/null_state_gen: Add GEN9 golden context batch buffer creationArmin Reese
Modifications to 'null_state_gen' so it can generate GEN9 golden context batch buffer source for SKL. v2: - rebased on top of gen8 changes (Mika) - fixed state base address command size (Mika) - base address size macro as pages (Mika) v3: - rebased on top of current master (Mika) - removed obsolete #includes (Mika) - added copyright (Mika) - render and component packing added (Mika) Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Armin Reese <armin.c.reese@intel.com> Cc: Volkin, Bradley D <bradley.d.volkin@intel.com> Reviewed-by: Volkin, Bradley D <bradley.d.volkin@intel.com> (v2) Signed-off-by: Armin Reese <armin.c.reese@intel.com> (v1) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-09tools/null_state_gen: Add Gen8 golden stateMika Kuoppala
Previously we didn't have a clear understanding what is necessary for a pipeline state to be properly initialized. So we had to improvise and use a stripped out render copy. Now we have a more clear understanding so switch out render copy based frankenstate to state we can call golden state. v2: - export intel_batch_state_offset - add 3DSTATE_RASTER (Bradley Volkin) Cc: Volkin, Bradley D <bradley.d.volkin@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-02lib/Android.mk: add define of IGT_DATADIR for igt_fb.cTim Gore
Since the igt_create_stereo_fb function moved into igt_fb.c we need to add the definition of IGT_DATADIR in the Android makefile in order to build the cairo dependent tests. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-01lib/igt_core.c: disable lowmemorykiller during testsTim Gore
Several IGT tests cycle through a lot of GEM memory and when running these tests on Android they tend to get killed by the lowmemorykiller. The lowmemorykiller really is not usefull in this context and is just preventing the test from doing its job. This commit adds a function to disable the lowmemorykiller by writing "9999" to its oom adj parameter, which means it will never "select" any process to kill. The normal linux oom killer is still there to protect the kernel. The low memory killer is disabled during the common init function and then re-enabled by the exit handler. To make this work for single tests the exit handler is now installed in the common init function also so that it is invoked for all tests. This is just a hack to get round the fact that the i915 driver uses the concept of purgeable memory which is not understood by the lowmemorykiller. If this ever gets fixed then this patch can be removed. Signed-off-by: Tim Gore <tim.gore@intel.com> [danvet: A bit of polish (coding style, static and rename check_igt_exit to common_exit_handler, drop the is_disabled check since we only call this once now).] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-30lib/aux: Print progress output at INFO levelDaniel Vetter
With the structured logging it makes more sense to tune this down a bit. Also, this way it is consistent with Thomas Wood's new activity indicator helper. Spotted while discussing Thomas' patch with him. v2: Thomas noticed that I've forgotten the fflush. Extract igt_interactive_info for both igt_progress and igt_print_activity. v3: Interactive output should go to stderr. Also extract the "is this a terminal" check. Cc: Thomas Wood <thomas.wood@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-30lib: add a function to indicate activityThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30lib: ensure any buffers are flushed before forkThomas Wood
Flush any buffers before forking to prevent duplicated output. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30doc: various spelling and typo fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30tests/pm_rpm: factor out drm_open_any_masterImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-09-30lib/skl: Return the render copy and media fill functionsXiang, Haihao
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> [Ben: Reordered if tree] Signed-off-by: Ben Widawsky <benjamin.widawsky@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow spec to configure media sampler DOP clock gating in ↵Zhao Yakui
PIPELINE_SELECTION Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow spec to configure FORCE_MEDIA_AWAKE in PIPELINE_SELECTIONZhao Yakui
The FORCE_MEDIA_AWAKE bit is added for the PIPELINE_SELECTION command and some instructions requires that the media enginee is awake. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow the spec to add pipeline_select maskZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: follow the spec to update STATE_BASE_ADDRESS commandZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Start the gen9 media_fill from the gen8 versionZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Set the URB VS start address to 4Xiang, Haihao
A value less than 4 might result in GPU hang on simulation Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Follow the spec to add the Pipeline selection maskZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Emit 3DSTATE_WM_HZ_OPZhao Yakui
This is from that on BDW. Without it, the pixel pipeline can't work well. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>