summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-12-05gem_pin: Skip with full ppgttBen Widawsky2-0/+17
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05gen8 rendercpy: temporarily disableBen Widawsky1-2/+4
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 Widawsky2-2/+0
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 Widawsky2-1/+17
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 Vetter2-0/+10
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-05Update dpio read/write to take in extra PHY parameter.Chon Ming Lee2-6/+17
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 Kuoppala1-0/+1
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 Ursulin1-10/+0
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 Vetter1-0/+4
This reverts commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1. Oops, accidentally commit a bit of wip changes.
2013-12-03drmtest: Avoid wrong PID/TID after clone racesTvrtko Ursulin1-1/+9
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 Ursulin1-0/+3
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 Vetter1-4/+0
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 Vetter1-6/+11
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 Wilson1-4/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction lengthDamien Lespiau1-1/+3
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction lengthDamien Lespiau1-1/+3
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction lengthDamien Lespiau1-17/+31
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28rendercopy/bdw: Fix the STATE_SIP instruction lengthDamien Lespiau1-3/+4
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-27lib: Add gem_bo_busyVille Syrjälä2-0/+12
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ä2-0/+12
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ä6-15/+29
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ä1-1/+1
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 Vetter1-0/+3
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 Vetter1-2/+2
2013-11-14tests/gem_cs_prefetch: Fix bdw damageDaniel Vetter1-1/+3
v2: Fix more. Cc: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-14lib: adjust oom_scoreDaniel Vetter1-0/+17
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 Mateo1-0/+4
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>
2013-11-12lib/drmtest: Get the correct basename() under AndroidOscar Mateo1-1/+5
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12build: Fix assorted compilation warningsOscar Mateo5-9/+9
As these files are compiled for every test, the warnings cluttered the Android build completely. v2: As suggested by Daniel Vetter, drop some of the fixes and fix the compilation flags instead. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12rendercopy: Remove rendercopy.cOscar Mateo3-52/+0
Move scratch_buf_write_to_png() to its only user, gem_render_copy.c. This makes the cairo dependencies easier to handle from the Android perspective, but if there is a good reason why this file exists I can try to handle it differently. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12lib: Move kms stuff from drmtest.c over to igt_kms.cOscar Mateo5-804/+869
This makes cairo dependencies easier to handle. Otherwise, we would have to litter drmtest all over with "#ifndef ANDROID" Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> [danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to intel_sprite_on.c] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12build: list all test/tool/lib source files in their own Makefile.sourcesOscar Mateo2-36/+38
In this way, all source files are listed in Makefile.sources and included from Makefile.am, thus enabling the reuse from Android makefiles. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-06rendercopy/bdw: Add AUB annotations for statesDamien Lespiau1-22/+152
This will hopefully help debugging things. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06rendercopy/bdw: Fix the original implementationDamien Lespiau2-79/+139
For posterity, I've squashed these commits against Damien's request. rendercopy/gen8: Fix the include guards rendercopy/gen8: Update the 3DSTATE_MULTISAMPLE opcode The opcode has changed in BDW. rendercopy/gen8: Add the VF_TOPOLOGY state The primitive type has moved out of the 3DPRIMITIVE to its own state, VF_TOPOLOGY. rendercopy/gen8: Fixup 3STATE_PS Update the state to the latest BSpec, in particular the thread count was using a wrong shift and we were missing kernel2 offset. rendercopy/gen8: Update 3DSTATE_BASE_ADDRESS This state has seen its fields moved around a bit, follow the BSpec. rendercopy/gen8: Allocate 64 VUEs The simulator screams at us if we try to allocate less than that. rendercopy/gen8: Surface states have to be 64 bytes a aligned rendercopy/gen8: Vertical/horizontal align 2 does not exist any more So set them to 4. This should not matter with rendercopy (which is not using compressed textures), but it makes the simulator moan. rendercopy/gen8: Make sure the vertex buffer is 8 bytes aligned rendercopy/gen8: Adjust 3DSTATE_VERTEX_BUFFERS for gen8 The address of the buffer is now on 48 bits. Also the size was computed as offset + size where the field is really the size of the buffer itself, not the end address. rendercopy/gen8: Update the SF/SBE states for gen8 gen8 has a few changes around those states and a new ones RASTER and SBE_SWIZ. rendercopy/gen8: Add the PS_EXTRA and PS_BLEND states rendercopy/gen8: Fix building with DEBUG_RENDERCOPY defined The forward declaration was missing the final ';'. Let's move the whole function at the top instead. rendercopy/gen8: Update the PS and CONSTANT_PS states rendercopy/gen8: Fix the red channel selection Make it output red. rendercopy/gen8: Update the write -1 shader With the latest assembler changes from Haihao. rendercopy/gen8: Remove blit.g8a There is no diff between this file and blig.g7a. Remove it. rendercopy/gen8: Fix the surface relocation offset The surface base address is now at dwords 8/9 so the relocation has to mirror the change. rendercopy/gen8: Add the VF_INSTANCING state Should work without, but doesn't hurt to add it. rendercopy/gen8: Set the Attribule enable field in PS_EXTRA When the SF is set up to output some attributes, the pixel shader also have to be told there's attributes to care about. rendercopy/gen8: Set the force bits to read URB offset/length If we want to override the URB offset/length in the SBE state itself, we need to set the force bits on (new in gen8) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06rendercopy/bdw: Add gen8_render.h to the file listDamien Lespiau1-0/+1
So it gets distributed with make dist. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06rendercopy/bdw: Initial gen8 rendercopyJesse Barnes5-0/+1095
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06bdw: Update obvious missing blit supportBen Widawsky4-4/+27
This provides a macro that allows us to update all the arbitrary blit commands we have stuck throughout the code. It assumes we don't actually use 64b relocs (which is currently true). This also allows us to easily find all the areas we need to update later when we really use the upper dword. This block was done mostly with a sed job, and represents the easier in test blit implementations. v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06bdw: Add gen8 specific instdone bitsDamien Lespiau1-1/+19
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06bdw: Add gen8 to intel_gen()Damien Lespiau1-0/+2
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06bdw: Add gen8 to the IS_9XX() macroDamien Lespiau1-1/+2
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06pciid/bdw: Add Broadwell PCI idsBen Widawsky1-5/+28
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06chipset: IS_I9XX macroBen Widawsky1-0/+6
This isnt useful in IGT, but it will allow us to keep the merge process with libdrm simpler. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-05lib/drmtest: Retire requests via drop caches after gem_quiescent_gpuOscar Mateo1-0/+2
This helps make sure that the GPU is really quiescent by getting rid of any residual stuff. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04lib: drop return value from igt_drop_cachesDaniel Vetter2-12/+6
No one actually cares, everyone expects it to just work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04lib: Add igt_drop_caches_set()Oscar Mateo2-0/+43
This is basically a "drop cache" interface to the igt_debugfs facilities. Also, update existing users. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: add igt_main macroDaniel Vetter1-0/+10
In the past new testcases with subtest often forgot to add the call to igt_exit at the end of their main() function. That is now caught with a bit more obnoxious asserts, but it's still a nuissance. This little igt_main macro takes care of that (and also of calling the subtest machinery initialization code correctly). If no one objects I'll roll this out for all the simple cases (i.e. those tests that don't have additional argv parsing on top of the subtest machinery). v2: Roll it out across the board. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: make igt_install_exit_handler never failDaniel Vetter3-10/+9
Most callers didn't bother checking, so just move the asserts into the function itself. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: make igt_set_vt_graphics_mode never failDaniel Vetter2-5/+4
All tests agree that this is a letal failure, so no point to pass it back to callers. Also add some igt_require calls for the drm_fd where I've noticed that it's missing. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: consolidate pipe crc exit handlerDaniel Vetter2-27/+30
No need to sprinkle this all over: - exit handlers will only be registered once - they're always called when exiting, so no need to explictly call them. This allows us to hide all the pipe crc cleanup in the library. Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: use "auto" pipe CRC sourceDaniel Vetter2-1/+3
Makes stuff work on DP ports on gmch platforms automatically. Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>