summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-01-19lib: add __gem_createDaniel Vetter
Useful for when a gem_create ioctl is expected to fail. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19lib: extract igt_drop_rootDaniel Vetter
Useful in other tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07lib: Use INSTDONE_I965 and INSTDONE_1 for gen6Damien Lespiau
The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old names (this is what the kernel does). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07lib: Move the INSTDONE bit definitions to instdone.cDamien Lespiau
This is the only place where they are used and we've even started using 1 << n constants with gen 7. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07instdone: Add an assert to make sure we never overflow instdone_bitsDamien Lespiau
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07intel_reg: Renamed INST_DONE to INSTDONEDamien Lespiau
That's how the registers are named in the kernel defines. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07drmtest: don't leak memory when parsing the argumentsPaulo Zanoni
Found this while investigating memory leaks on kms_flip. Detected by Valgrind. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-31kmstest: Fix up lifetimes of cairo objectsChris Wilson
cairo_t is the short lived drawing context, whereas cairo_surface_t is the heavyweight object that persists and is also tied to underlying GEM objects. So make the kmstest API reflect the different weights and fix the lifetime and underlying object reference leaks. Based on the fix by Paulo Zanoni. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-13lib: Include the necessary stdint.h in gen6_render.hDamien Lespiau
Instead of assuming someone else will do it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-10rendercopy/bdw: Fix length of a bunch of zeroed out packets.Kenneth Graunke
A bunch of packets were too short. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Damien Lespiau <damien.lespiau@intel.com>
2013-12-10rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.Kenneth Graunke
We don't want depth/stencil fast clears or HiZ resolves; we want normal drawing. Without this, the pixel pipeline doesn't work. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Damien Lespiau <damien.lespiau@intel.com>
2013-12-10lib: igt_simple_main/init for subtest-less testsDaniel Vetter
Atm only used to print the version information. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10lib: print uname information in the version stringDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10lib: Add host platform to version stringDaniel Vetter
This is import on systems where we compile 32bit tests that run on 64bit platforms. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10intel-gpu-tools: Version informationBen Widawsky
Provide two arguments version, and verbose, which allow printing from an arbitrary igt test. It will show system information (from build time, not runtime), as well as the git SHA being used. This will help reduce errors when people try to reproduce problems. As an example if I want to verify someone is running the correct version of a test, I could ask them to do: bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --verbose gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) Time to exec x 1: 35.000µs (ring=render) Time to exec x 2: 28.000µs (ring=render) Time to exec x 4: 20.000µs (ring=render) Time to exec x 8: 14.625µs (ring=render) Time to exec x 16: 11.188µs (ring=render) Time to exec x 32: 11.125µs (ring=render) Time to exec x 64: 10.328µs (ring=render) Time to exec x 128: 10.172µs (ring=render) Time to exec x 256: 10.234µs (ring=render) Time to exec x 512: 10.232µs (ring=render) Time to exec x 1024: 10.121µs (ring=render) Time to exec x 2048: 10.151µs (ring=render) Time to exec x 4096: 11.474µs (ring=render) Time to exec x 8192: 9.432µs (ring=render) Time to exec x 16384: 6.003µs (ring=render) Time to exec x 32768: 5.029µs (ring=render) Time to exec x 65536: 4.206µs (ring=render) Time to exec x 131072: 3.630µs (ring=render) Subtest render: SUCCESS --verbose is provided for completeness, but doesn't seem too useful at the moement. bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --version gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) I've put version.h in the root directory so that any subdir can access it. I've added the tests usage since it's immediately useful, and done easily via Daniels igt infrastructure work. v2: - Always print the version number. - We want to print uname at runtime. - Also prefix the i-g-t release version. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10lib: Always print errno in igt assert/require macrosDaniel Vetter
Useful to figure out why things have failed. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06lib: rename some power well bit namesPaulo Zanoni
I did the same change in the Kernel a few months ago. This should help not getting confused about which bit does what. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-06lib: make igt_pipe_crc_start never failDaniel Vetter
It's what callers expect - pipe_crc_new is the function where we pass a potential failure back to callers. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06lib: add igt_pipe_crc_checkDaniel Vetter
No need to duplicate this all over the place. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06rendercopy/bdw: Set Instruction Buffer size Modify Enable to 1Xiang, Haihao
Otherwise it may result in GPU hang Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06lib: Clean the batch buffer store after resetXiang, Haihao
Otherwise the stale data in the buffer Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06tests/gem_media_fill: add support for gen7Xiang, Haihao
v2: Fixed the source register used for the send with EOT Fixed the posted destination operand for the send with EOT Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06tests/gem_media_fill: add support for gen8Xiang, Haihao
v2: Fixed the source register used for the send with EOT Fixed the posted destination operand for the send with EOT v3: Workaround: Insert MEDIA_STATE_FLUSH after MEDIA_OBJECT. Fixed the cache agent used in media_block_write message Set Instruction Buffer size Modify Enable to 1, otherwise it may result in GPU hang Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06tests: add gem_media_fillXiang, Haihao
It is to check whether media pipeline on render ring works. Codes are copied and modified from the rendercopy case which uses 3D pipeline. However media pipeline is simpler than 3D pipeline and there is few changes between gen6,gen7 and gen8 Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-05gen8 rendercpy: temporarily disableBen Widawsky
We don't yet have this working, and the excessive hangs are annoying. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05Kill XY_COLOR_BLT_CMDBen Widawsky
Since we now always want a length for this command, and we've created a non-length variant, remove the #define to prevent further foot shooting. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05gem_pipe_control_store_loop: BDW updateBen Widawsky
I've opted to not use the PIPE_CONTROL w/a for now. I am unclear if it is actually required (the test does pass). Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05lib: add gem_available_aperture_size helperDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-05Update dpio read/write to take in extra PHY parameter.Chon Ming Lee
The extra parameter is for future platform. Signed-off-by: Chon Ming Lee <chon.ming.lee@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-12-04lib/drmtest: Fix filedesc leak on gem_quiescent_gpuMika Kuoppala
to not run out of filedescs as some tests call gem_quiescent_gpu directly. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03Revert "lib/drmtest: ducttape over fork race"Tvrtko Ursulin
This reverts commit a031a1bf93b828585e7147f06145fc5030814547. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Conflicts: lib/drmtest.c Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03Revert "test/gem_concurrent_blt"Daniel Vetter
This reverts commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1. Oops, accidentally commit a bit of wip changes.
2013-12-03drmtest: Avoid wrong PID/TID after clone racesTvrtko Ursulin
Various C library implementations have various races with regards to caching getpid() or TID inside pthread_kill() implementations. For example see clone(2) glibc man page and pthread_kill Bionic C library source. Work around that by making sure correct PID/TGID and TID values are retrieved from the kernel when re-raising the signal. It can be delivered immediately after the clone system call while C library cached copies have not yet been updated. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03build: Make sure asserts are enabled for testsTvrtko Ursulin
Tests depend on assertions being enabled since they can, and do, contain actual test steps. They are also mandatory for ensuring sane test case behaviour. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03test/gem_concurrent_bltDaniel Vetter
Limit working set size also with available ram. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03lib: Don't put functional code into assertsDaniel Vetter
Android apparently compiles with NDEBUG. Which is strongly advised against, since the big pile of asserts mostly check correct usage of the helper code in testcases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03drmtest: Fix weird signage on errnoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction lengthDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction lengthDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction lengthDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the STATE_SIP instruction lengthDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-27lib: Add gem_bo_busyVille Syrjälä
Move gem_bo_busy() from gem_wait_render_timeout.c to lib. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27lib: Add gem_sw_finish()Ville Syrjälä
Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish() Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27rendercopy: Pass context to rendercopy functionsVille Syrjälä
rendercopy does the batch buffer flush internally, so if we want to use it with multiple contexts, we need to pass the context in from caller. v2: Modify rendercopy_gen8 as well Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27lib: Fix pipe_crc->ctl_fd assertVille Syrjälä
Use the correct fd in the assert(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-20tools/reg_dumper: Add FW_BLC regsDaniel Vetter
Debugging watermark issues on gen2/3 without them is hard ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-14tests: More bdw falloutDaniel Vetter
2013-11-14tests/gem_cs_prefetch: Fix bdw damageDaniel Vetter
v2: Fix more. Cc: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-14lib: adjust oom_scoreDaniel Vetter
This way the igt test will always be killed first (hopefully), preventing mayhem when one of the memory thrashing tests treatens to take down the entire system. To avoid any burden on test writers we adjust the oom score on drm_open, any of the fork helpers and subtest init. That should cover everything. v2: Fix it up. Cc: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12lib/igt_display: workaround a name conflict in AndroidOscar Mateo
PLANE_A/PLANE_B are used by libdrm's i915_drm.h in Android. v2: Changes suggested by Daniel Vetter and Damien Lespiau: - Pimp up comment with a FIXME. - Reword commit message. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>