summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-23tools/intel_display_poller: Add gen9+ supportVille Syrjälä1-2/+2
All the registers we care about should be the same for all bdw+ platforms, so let's just use the bdw path for gen9+. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-23stubs/intel_bufmgr: Suppress GCC compilation warningsChris Wilson1-28/+38
GCC likes to complain that every function here dies in an assert and doesn't return, which is very true but not one we wish to optimise for. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-22lib: Kick all fbconChris Wilson1-16/+14
i915 may not be the only, nor the first, vtcon framebuffer device - we need to check them all! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-22lib/selftest: Query module parameter for error code.Chris Wilson4-5/+20
"Live" selftesting of i915.ko happens during device probing which eats the error code and does not propagate it back to module loading. Workaround this by writing the error code back to the module parameter and probing it after a "successful" install. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-22kms_cursor_legacy: Reduce runtime of cursor-vs-flip.Maarten Lankhorst1-9/+10
This was running for 150 seconds before, reduce it to 25. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-21kms_cursor_legacy: Make tests less strict.Maarten Lankhorst1-16/+32
Some tests may wait a vblank on master. Instead of failing the tests, allow them to succeed if 1 vblank passed. Also no longer warn if a page flip is missed, change it to info instead. As long as no more than 25% of the vblanks are missed the tests will pass. Also fix nonblocking modeset vs cursor, which needs an array of cursor argument. This was a nice buffer overrun before. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-19tools/intel_display_poller: Allow the tool to be used without i915 loadedVille Syrjälä1-4/+2
We don't need the drm fd to find out the PCI device ID. So let's drop the drm stuff, which allows the tool to work without i915 loaded. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-19lib/debugfs: Check if debufs is already mounted before attempting to mount itVille Syrjälä1-2/+19
mount("/sys/kernel/debug") will return an error if something is already mounted there. So let's check for that before calling mount(). This allows many of the tools (eg. intel_reg) to work even when no drm drivers are loaded since the earlier "/sys/kernel/debug/dri" & co. path checks will fail in that case and we will fall back to attempting to mount debugfs ourselves. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-19tools/intel_reg: Dump some interesting CCK regs on VLV/CHVVille Syrjälä3-0/+13
CCK houses various important clock related registers. Let's dump those as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-19tools/intel_bios_reader: Dump the DSI video transfer mode and pixel overlapVille Syrjälä2-3/+8
Knowing how were trasmitting the data is pretty important, so let's dump out the video transfer mode and pixel overlap for DSI. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-17lib/sw_sync: Use timeline/fence instead of generic fdChris Wilson1-6/+6
whilst we may be passing around file descriptions, using fence or timeline as appropriate is more descriptive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Rename sync_fence_create()Chris Wilson3-33/+33
It takes a sw_sync_timeline and returns a fence (it is a factory), so call it sw_sync_timeline_create_fence() for better self-documentation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Indicate that sync_merge() operates and create a sync_fenceChris Wilson3-22/+20
Improvements to self-documentating API that matches the rest of sw_sync. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Bring sync_wait() API into lineChris Wilson3-78/+61
igt likes to return kernel-esque negative errno where we can, and indicate that we expect to operate on a sync_fence, otherwise it is merely a grandiose poll(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17tests/perf: Remove duplicate NSEC_PER_SEC defineChris Wilson1-2/+0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Provide compatiblity stubs for old headersChris Wilson1-36/+58
Common practice for igt when providing tests for new features in unreleased kernels is to include a complete set of uABI stubs. Lack of such compatability breaks compilation on current distributions' kernel headers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17igt_kms: Use const parameters for igt_assert_crc_equalLyude2-2/+2
Since we're not modifying these anywhere, let's make them const so as to not break code doing comparisons against compile-time CRCs. Signed-off-by: Lyude <lyude@redhat.com> Tested-by: Robert Foss <robert.foss@collabora.com>
2016-12-17lib/igt_kmod: kmod already supplies a cooked error codeChris Wilson1-3/+1
kmod already does the err = -errno for us. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-16igt/drv_selftest: Rename late to live selftestsChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-16igt/perf: add i915 perf stream tests for HaswellRobert Bragg3-2/+2386
This bumps the libdrm_intel version required to 2.4.74 for the drm_intel_context_get_id api used in these tests. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-12-16stubs/drm: Add drm_intel_gem_context_get_id stubRobert Bragg2-0/+9
The plan is to use this api in i915-perf tests so this adds the corresponding stub in case libdrm was built with libdrm_intel disabled. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-12-16igt/gem_exec_parse: generalise test_lri + debug infoRobert Bragg1-50/+52
This further generalises the description passed to test_lri so we only need one loop over the entries with test_lri deducing the exected errno and value based on whether the register is marked as whitelisted and depending on the current command parser version. Each tested register LRI now gets its own subtest like: igt_subtest_f("test-lri-%s", reg_name) The test_lri helper now also double checks that the initial intel_register_write() takes before issuing the LRI. In case of a failure the test_lri helper now uses igt_debug to log the register name, address and value being tested. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-14lib/debugfs: Support new generic ABI for CRC captureTomeu Vizoso3-53/+171
The kernel has now a new debugfs ABI that can also allow capturing frame CRCs for drivers other than i915. Add alternative codepaths so the new ABI is used if the kernel is recent enough, and fall back to the legacy ABI if not. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2016-12-14igt/kms_atomic: Match CRTC harder for special planesDaniel Stone1-2/+11
Our heuristic for finding planes was previously matching the type, and ensuring that the plane was valid for that CRTC. However, VC4 now has primary/cursor planes which can wander multiple CRTCs, so we could pick a PRIMARY plane which was not the kernel's idea of crtc->primary, causing plane_primary_legacy to fail; ditto for cursor. Make find_plane try harder, by preferring to return planes which are already on the requested CRTC. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busy_unixsocketRobert Foss1-0/+103
Add subtest test_sync_busy_fork which increments the timeline in a forked child process, where the timeline fd has been sent through a UNIX socket. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busy_forkRobert Foss1-0/+39
Add subtest test_sync_busy_fork which increments the timeline in a forked child process. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_merge_invalidRobert Foss1-0/+41
Add subtest test_sync_merge_invalid that tests merging invalid fences. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add igt_require check for sw_sync featureRobert Foss1-0/+3
Make sure that this test is skipped if the sw_sync feature is missing from the host system. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14lib/sw_sync: Add igt_require_sw_sync to enable skipping on no sw_sync supportRobert Foss2-0/+15
Add igt_require_sw_sync to provide tests to skip if sw_sync support isn't available on the host machine. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_timeline_closed_signaledRobert Foss1-0/+18
Add subtest test_timeline_closed_signaled that verifies that a signaled fence stays signaled after its timeline has been closed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_timeline_closedRobert Foss1-0/+17
This subtest verifies that the fences of a timeline are not signalled when a timelne is closed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_expired_mergeRafael Antognolli1-0/+31
This test creates an already expired fence, then creates a merged fence out of that expired one (passed twice to the merge operation), and finally closes the merged fence. It shows that if the refcounts are wrong on the original expired fence, it might get freed while still in use. Usually a kernel panick will follow. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_producer_single_consumerRobert Foss1-0/+139
This subtest runs a single consumer thread and multiple producer thread that are synchronized using multiple timelines. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_timeline_waitRobert Foss1-0/+66
This subtest verifies that waiting, timing out on a wait and that counting fences in various states works. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_random_mergeRobert Foss1-0/+73
This subtest verifies that creating many timelines and merging random fences from each timeline with eachother results in merged fences that are fully functional. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_consumer_producerRobert Foss1-5/+90
This test verifies that stressing the kernel by creating multiple consumer/producer threads that wait on a single timeline to be incremented by another conumer/producer thread does not fail. And that the order amongst the threads is maintained. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_consumerRobert Foss1-0/+98
This subtest verifies the access ordering of multiple consumer threads. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_merge_sameRobert Foss1-0/+27
This subtest verifies merging a fence with itself does not fail. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_mergeRobert Foss1-0/+67
Add subtest test_sync_merge that tests merging fences and the validity of the resulting merged fence. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busyRobert Foss1-0/+51
This subtest verifies that waiting on fences works properly. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_merge_fenceRobert Foss1-0/+23
This subtest verifies that merging two fences works in the simples possible case. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_fence_invalid_timelineRobert Foss1-0/+8
This subtests tests that creating fences on negative timelines fail. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_fenceRobert Foss1-0/+16
Add subtest alloc_fence that verifies that it's possible to allocate a fence on a timeline. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14test/sw_sync: Add sw_sync testRobert Foss2-0/+52
Add initial tests for sw_sync. Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14lib/sw_sync: Add helper functions for managing synchronization primitivesRobert Foss3-0/+260
Base functions to help testing the Sync File Framework (explicit fencing mechanism ported from Android). These functions allow you to create, use and destroy timelines and fences. Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-13igt_kms: Dynamically allocate igt_display->pipesLyude2-1/+3
Many GPUs have more then 3 pipes available, so hard limiting this to I915_MAX_PIPES prevents us from using anything that relies on igt_display_init() on non-intel systems (since we end up writing out of bounds and seg faulting). Fix this by dynamically allocating igt_display->pipes using the number of pipes we've detected on the GPU. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-12-13lib/kselftest: Apply the filter to the test nameChris Wilson1-4/+6
The filter needs to skip the embedded test number as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-13lib/kselftest: Parse embedded test number from parameterChris Wilson2-15/+59
Order the tests by an embedded test number from the parameter string. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-13lib: Allow permutation of the first two elements in the arayChris Wilson1-1/+1
Spotted-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-08igt_kms: Remove support for drivers with <1 drm_planeLyude6-39/+25
We've had support for universal planes since kernel version 3.15, so there's not really a good reason to try supporting drivers that lack plane support now. As well, the current has_universal_planes logic is broken anyway as it makes the assumption that having display planes always means we have both a primary plane and a cursor plane (this isn't true on radeon/amdgpu and nouveau). So, remove this, and just check for whether or not we have a cursor plane. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>