summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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-11include inttypes.h for PRI definesMike Frysinger
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96620 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-10lib/igt_kms.c: Unconditionally include poll.hPetri Latvala
Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.") added a use of poll() to igt_kms.c, but that file only includes poll.h when HAVE_UDEV is defined. Move the include outside the UDEV conditional. Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
2018-01-04lib/gem: Reset the global seqno at the start of each testChris Wilson
When we require GEM, reset the global seqno. This gives each test a clean slate to work with, and avoids left-over state from previous tests impacting on the next. In particular, somes tests may be setting up long sequence of stalling batches not expecting to hit a seqno wraparound (leftover from, for example, gem_exec_whisper), causing long GPU hangs and incompletes in CI if they do. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-02lib/igt_kms: Drop all stale events on first commit.Maarten Lankhorst
I've been trying to make kms_cursor_legacy work when subtests fail. Other subtests will start failing too because of expired events or stale pipe crc. The latter can be resolved in the test, but the former could affect other tests Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Change return status to int, so callers can see how many events are swallowed.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-27lib: Convert sw_sync to use sync_file uapi imported from the kernelChris Wilson
Similar to how we are now importing the drm uapi directly into igt, we also would like to have a copy of auxiliary uAPI such as sync_file. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-22lib/dummyload: Support returning output fenceTvrtko Ursulin
Support creating spin batches which return an output fence using new __igt_spin_batch_new_fence / igt_spin_batch_new_fence API. This will be used fromthe perf_pmu@interrupts test to ensure user interrupt generation from a batch with controlled duration. v2: Support out fence with multiple engines as well. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-21meson: Don't install selfcheck binariesPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-12-21meson: Don't install headersPetri Latvala
Until we can at least check for a matching ABI, the only supported way of building is having the headers from the source checkout. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-20lib/i915_pciids.h: synchronize with kernel headerLucas De Marchi
Synchronize with kernel header as of c99d7832dcd7 ("drm/i915/cfl: Adding more Coffee Lake PCI IDs.") Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2017-12-19lib/draw: Use more typical form for computing swizzle addressesChris Wilson
Actually use the XOR operation rather than open coding it with three bitwise operators (including XOR itself). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-15lib/igt_sysfs: Let igt_sysfs_read|write return -errnoMichal Wajdeczko
In some cases debugfs or sysfs may return errors that we want to check. Return -errno from helper functions to make asserts easier. v2: don't forget about EOF ret=0 (Chris) small re-write (Michal) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-15lib/debug: Convert igt_drop_caches_set() to use common file writersChris Wilson
Why open code a printf/write loop, when we already have a function providing it? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com
2017-12-15lib/sysfs: Handle EINTR from vfprintf()Chris Wilson
Some write operations into sysfs may be slow and potentially interrupted by a signal. So handle EINTR by repeating the vfprintf(). A partial is reported back to the caller, as is any other error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com
2017-12-15lib: Provide a library function to test nop executionChris Wilson
Sometimes a test wants to verify that an engine, or all of them, are functional by executing a nop batch. Provide a common routine to submit an empty batch then test whether the driver is wedged. Reported-by: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2017-12-14lib: Ask the kernel to quiesce the GPUChris Wilson
Since the introduction of debugfs/i915_drop_caches, we have offered the ability to wait upon all outstanding batches. This is more efficient and less error prone (one example is the use of context priorities, we have to idle at the lowest in order not to jump over any low priority tasks we want to wait upon) than trying to do it all in userspace. Though we could if we wanted to, it's just easier to use the existing facility designed for the purpose -- that we were already partially using! Note that debugfs/i915_drop_caches has only existed since v4.2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-12-13lib/core: Don't leak dummyloads between subtestsChris Wilson
If a test fails or skips early, it may not clean up after itself. In lieu of having a framework for test deconstructors, hook igt_terminate_spin_batches() into exit_subtest() itself so that we don't allow a recursive batch from an earlier test to leak into the next and cause an unexpected GPU hang. Similarly, we also want to terminate the dummyload as the first step in our atexit handlers (currently it is at the start of the last step) as some atexit handlers may be unwittingly exposed to dummyloads and so cause another wait on GPU hang. We trust that the core already distinguishes correctly between the principal test process and its children. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-13lib/dummyload: Wrap global list inside its own mutexChris Wilson
Give the list a mutex, for we try to iterate over it from many a random context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-13lib/i915_pciids.h: synchronize with kernel headerLucas De Marchi
This copies include/drm/i915_pciids.h from kernel as of drm-tip: drm-tip: 2017y-12m-08d-21h-06m-35s UTC + patch adding INTEL_CFL_IDS that was missing there[1]. The goal is to keep track of the PCI IDs in a single place (kernel). Right now a simple copy is done to catch up with latest changes there, although in future it could be more sofisticated pointing the build system to the external header. [1] https://patchwork.freedesktop.org/patch/192410/ Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-12igt/kms_rotation_crc: Add horizontal flip subtest.Joseph Garvey
Test that horizontal flip works with supported rotations. Includes a fix for the unrotated fb which was not being positioned correctly with portrait and landscape rectangles. v2:(from Anusha) - Change 180 degree rotation to follow the rest, use igt_swap(), make flip variable a bool. Format the patch correctly (Ville, Petri Latvala) v3: (From Anusha) - Correct the name of subtests in order to avoid duplication of names (Arek) Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Joseph Garvey <joseph1.garvey@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-12-11igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBsImre Deak
When drawing with cairo to Y/Yf tiled FBs we use a temporary linear buffer which is mapped to the CPU, but the fast blit needed for this only expects 32 bpp FBs. Add support for other bpps too. This is needed for upcoming patches testing non-32bit bpp formats with Y/Yf tiling. Thanks to Ville for explaining why we need the temporary buffer. (Looks like for Y tiling we could do without, but that's a separate topic.) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com>
2017-12-08lib: Print other clients when DRM_SET_MASTER failsChris Wilson
It looks like there are some rogue processes running in CI that prevent DRM_MASTER from being obtained. Dump the list of clients on failure to make it more obvious what is being left behind. v2: Fix up gtkdocs, meson build References: https://bugs.freedesktop.org/show_bug.cgi?id=104157 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-08lib: Make sure intel_aub.h gets packed in distPetri Latvala
Error revealed by distcheck. Fixes: 539a86ec6035 ("lib: copy intel_aub.h from libdrm") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Scott D Phillips <scott.d.phillips@intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2017-12-08include/drm-uapi: bump headersLionel Landwerlin
Taken from drm-next : commit 9c606cd4117a3c45e04a6616b1a0dbeb18eeee62 Merge: c5dd52f653fa 3997eea57caf Author: Dave Airlie <airlied@redhat.com> Date: Thu Dec 7 06:28:22 2017 +1000 Merge branch 'drm-next-4.16' of git://people.freedesktop.org/~agd5f/linux into drm-next Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-08debugger/overlay/tools: make sure to include embedded drm-uapi headersLionel Landwerlin
Headers from lib/ depend on drm uapi headers. Since we started embedding them, let's make sure to pull them first. We still depend on libdrm in places, we don't want the system headers from libdrm to be included prior to the embedded ones. v2: Fix debugger/overlay (Lionel) v3: More fixes in lib/tests (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-08lib/i915: Update detection of GuC submissionChris Wilson
Recently the kernel has switched to using a combined i915.enable_guc rather than multiple i915.enable_guc_submission parameters. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
2017-12-07lib/intel_aub: Add new MEM_TRACE commandsScott D Phillips
The memtrace aub commands are similar to the existing ones, but different. Notably memtrace has commands for register write and poll. Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com> Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-07lib: copy intel_aub.h from libdrmScott D Phillips
No functionality related to aub is provided by libdrm aside from intel_aub.h which somewhat defines the file format. Move the header into this project to ease aub-related development. Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com> Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-07lib/igt_gt: Add sentinel to intel_execution_engines2Petri Latvala
The for_each_engine_class_instance macro stops at e__->name being NULL, so add an object that is so. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-12-05meson: build a full dependency for lib_igt_perfDaniel Vetter
meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else. While at it pull the special cases out from the common build stanzas like we do with other special cases. Just a bit of ocd to keep everything polished. v2: Don't forget to add perf_pmu to the test list (Petri). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-12-05lib: avoid < in gtkdoc commentsDaniel Vetter
For reasons entirely not clear to me meson gtkdoc runs in strict xml parsing mode, whereas automake gtkdoc doesn't. And gtkdoc itself is tooooooooo dense to correctly escape this stuff. Paper around this. v2: {foo} instead of of tripy &lt;foo> (Joonas) v3: More fixups (Joonas) Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-12-04igt: Make dependency on libunwind mandatoryArkadiusz Hiler
With Android support gone there is not much reason for keeping libunwind dependency optional. This also deals (cheaply!) with ifdefs covering huge portions of code, removing a placement minefield. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-04lib/igt_kms: Fix off-by-one bug on skip of missing pipeGabriel Krisman Bertazi
display->n_pipes is zero-indexed, so N returned in igt_display_get_n_pipes is already not a valid pipe. This patch prevents kms_ccs from going nuts when testing the first unexisting pipe. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-11-29Revert "lib/igt_aux: Make procps optional"Arkadiusz Hiler
This reverts commit d7d3f4e87b827152f00bdf89a67871736672b492 and gets rid of the config option from the meson.build. It was needed only for the Android support. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-24intel/pmu: Catch-up with i915 RC6 aggregation changesTvrtko Ursulin
Since i915 PMU is removing separate RC6 counters and now aggregates all under a single one, catch up the test and intel-gpu-overlay with those changes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-24lib/igt_core: Move write_stderr out of LIBUNWIND ifdefArkadiusz Hiler
write_stderr() and __write_stderr() are defined behind ifdef on HAVE_LIBUNWIND, but do no depend on the lib in any way. fatal_sig_handler() uses those helpers unconditionally. This patch just moves the code couple of lines up, so the helpers are always available and do not break build on systems without libunwind. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-22lib/core: Avoid unused result in backtrace printingTvrtko Ursulin
Add helpers for direct write to stderr to consolidate the code and avoid the unused result warning in build. v2: Use igt_ignore_warn since it is questionable whether igt_assert is safe in signal handlers. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22lib: Also copy vc4_packet.hDaniel Vetter
Eric missed in commit d21e95ca81da6f9332999ceebe6b42e4425d3bb6 Author: Eric Anholt <eric@anholt.net> Date: Fri Nov 10 12:39:56 2017 -0800 tests: Remove libdrm_vc4 dependency. that the uapi headers don't include vc4_packet.h. Which totally broke the build. Strangely CI didn't catch this in the first build attempt, no idea how/where it picked up the vc4_packet.h. As an interim solution let's just copy the one I have from libdrm over. Long-term we might want to either re-intro the libdrm_vc4 dpendency, or maybe put vc4_packet.h into the kernel's uapi folder, or something else. But that's up to Eric. Cc: Eric Anholt <eric@anholt.net> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22tests/perf_pmu: Tests for i915 PMU APITvrtko Ursulin
A bunch of tests for the new i915 PMU feature. Parts of the code were initialy sketched by Dmitry Rogozhkin. v2: (Most suggestions by Chris Wilson) * Add new class/instance based engine list. * Add gem_has_engine/gem_require_engine to work with class/instance. * Use the above two throughout the test. * Shorten tests to 100ms busy batches, seems enough. * Add queued counter sanity checks. * Use igt_nsec_elapsed. * Skip on perf -ENODEV in some tests instead of embedding knowledge locally. * Fix multi ordering for busy accounting. * Use new guranteed_usleep when sleep time is asserted on. * Check for no queued when idle/busy. * Add queued counter init test. * Add queued tests. * Consolidate and increase multiple busy engines tests to most-busy and all-busy tests. * Guarantte interrupts by using fences. * Test RC6 via forcewake. v3: * Tweak assert in interrupts subtest. * Sprinkle of comments. * Fix multi-client test which got broken in v2. v4: * Measured instead of guaranteed sleep. * Missing sync in no_sema. * Log busyness before asserts for debug. * access(2) instead of open(2) to determine if cpu0 is hotpluggable. * Test frequency reporting via min/max setting instead assuming. ^^ All above suggested by Chris Wilson. ^^ * Drop queued subtests to match i915. * Use long batches with fences to ensure interrupts. * Test render node as well. v5: * Add to meson build. (Petri Latvala) * Use 1eN constants. (Chris Wilson) * Add tests for semaphore and event waiting. v6: * Fix interrupts subtest by polling the fence from the "outside". (Chris Wilson) v7: * Assert number of initialized engines matches the expectation. (Chris Wilson) * Warn instead of skipping if we couldn't restore the initial frequency. (Chris Wilson) * Move all asserts to after the test cleanup (just a tidy). * More 1eN notation for timeouts. * Bump the tolerance to 5% since I saw a few noisy runs with sampling counters. * Always start the PMU before submitting batches to lower reliance on i915 doing the delayed engine busy stats disable. v8: * Update for upstream engine class enum. v9: * Add meson build support. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Use RAPL PMU for power readingTvrtko Ursulin
Wire up to the RAPL PMU for GPU energy readings. The only complication is that we have to add code to parse: # cat /sys/devices/power/events/energy-gpu.scale 2.3283064365386962890625e-10 v2: Link with -lm. v3: strtod can handle scientific notation, even though my initial reading of the man page did not spot that. (Chris Wilson) v4: Meson fix. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Catch-up to new i915 PMUTvrtko Ursulin
v2: Update for i915 changes. v3: Use 1eN for large numbers. (Chris Wilson) v4: Update for upstream engine class enum. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22lib/perf: Fix data types and general tidyTvrtko Ursulin
Configuration and format are uint64_t in the perf API. Tidy some other details as well. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Consolidate perf PMU access to libraryTvrtko Ursulin
Various tool modules implement their owm PMU open wrapper which can be replaced by calling the library one. v2: * Remove extra newline. (Chris Wilson) * Commit msg. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Move local perf implementation to a libraryTvrtko Ursulin
Idea is to avoid duplication across multiple users in upcoming patches. v2: Commit message and use a separate library instead of piggy- backing to libintel_tools. (Chris Wilson) v3: Add Petri's meson build recipe. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22lib/igt_kms: Handle changing rotation property correctlyMaarten Lankhorst
The rotation property sucks because it may affect whether drmModeSetPlane succeeds or not. Add some code to handle this. First try to set rotation directly, if that succeeds we return immediately. If it fails we disable the plane, set the rotation property and run the rest of the code. This will hopefully make legacy rotation work in more cases when scaling is not supported. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-21igt/vc4_tiling: Test vc4's new set/get_tiling ioctls.Eric Anholt
This just checks that the appropriate errors get thrown, and that the modifier can be set/get successfully, and that the modifier doesn't leak to other BO allocations. Testing of scanout will be done with the writeback support that Boris is building. The modifier has no effect on V3D rendering, so no need to test that. v2: Add to the meson build. Signed-off-by: Eric Anholt <eric@anholt.net>
2017-11-21lib: Use drm-uapi/i915_drm.h instead of local defines.Eric Anholt
The MMAP_V2 is replaced by just using MMAP, since the official header has the updated struct. The gem_create_v2 and gem_get_aperture are left as is, because they seem to not be reflected in the UABI header! Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-21lib: Use the imported uapi's addfb2 defines.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-21tests: Remove libdrm_vc4 dependency.Eric Anholt
The autotools build retains the configure.ac option, while meson folds vc4 into the default build since we don't have any meson_options.txt to control parts of the build. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>