summaryrefslogtreecommitdiff
path: root/lib/meson.build
AgeCommit message (Collapse)Author
2019-05-13lib/i915: add gem_engine_topology library and for_each loop definitionAndi Shyti
The gem_engine_topology library is a set of functions that interface with the query and getparam/setparam ioctls. The library's access point is the 'intel_init_engine_list()' function that, everytime is called, generates the list of active engines and returns them in a 'struct intel_engine_data'. The structure contains only the engines that are actively present in the GPU. The function can work in both the cases that the query and getparam ioctls are implemented or not by the running kernel. In case they are implemented, a query is made to the driver to fetch the list of active engines. In case they are not implemented, the list is taken from the 'intel_execution_engines2' array and stored only after checking their presence. The gem_engine_topology library provides some iteration helpers: - intel_get_current_engine(): provides the current engine in the iteration. - intel_get_current_physical_engine(): provides the current physical engine, if the current engine is a virtual engine, it moves forward until it finds a physical engine. - intel_next_engine() it just increments the counter so that it points to the next engine. Extend the 'for_each_engine_class_instance' so that it can loop using the new 'intel_init_engine_list()' and rename it to 'for_each_context_engine'. Move '__for_each_engine_class_instance' to gem_engine_topology.h and rename it to '__for_each_static_engine'. Update accordingly tests/perf_pmu.c to use correctly the new for_each loops. Signed-off-by: Andi Shyti <andi.shyti@intel.com>
2019-05-07meson: Add .so versioningLyude Paul
While I'm pretty confident that no one cares to use libigt.so or lib_aubdump.so anywhere outside of igt, many distributions including Fedora and Debian strongly suggest that packages have some sort of so versioning, even if it's just '0'. So, let's fulfill that minimum requirement to make this easier to package. Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-04-25tests/kms_chamelium: add dp-audio testSimon Ser
This new test ensures DisplayPort audio works by using the Chamelium. It enables the DisplayPort output and sends an audio signal containing a set of frequencies we choose to all HDMI/DisplayPort audio devices. It starts recording audio on the Chamelium device and uses the stream server to retrieve captured audio pages. It then checks that the capture audio signal contains the frequencies we sent, and only those, by computing a FFT. A new library has been added to libigt to communicate with the stream server. It implements a simple custom TCP protocol. In case the test fails, a WAV file with the captured data is saved on disk. Right now the test has a few limitations: - Only the first channel is checked - IGT only generates audio with a single sampling rate (48 KHz) - Audio data is not captured in real-time These limitations will be lifted in future patches. PulseAudio must not run during the tests since ALSA is used directly. To ensure this, edit /etc/pulse/client.conf and add `autospawn=no`. Then run `pulseaudio --kill`. This commit deletes the existing audio tests. They weren't run and required an exotic configuration (HDMI audio splitter, dummy HDMI sink and a line-in port on the DUT). This patch also changes lib/igt_audio to use uint16_t instead of short. The rationale is: - The standard says a short is at least 16 bit wide, but a short can be larger (in practice it won't happen, but better use types correctly) - It makes it clearer that the audio format is S16_LE, since "16" is in the type name. This patch depends on the following Chameleon bugs: - https://crbug.com/948060 - https://crbug.com/950857 Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-04-18lib: Add halffloat implementationKevin Strasser
Probe for and make an API available for tests to use f16c intrinsics to generate needed fp16 pixel data. Also import a pure c fp32 <-> fp16 conversion implementation from Mesa 18.3.4, which will act as a fallback when f16c is unavailable. rfc2: - Change API to reduce number of function calls (Maarten) v1: - Move pragma so AVX code isn't emitted for fallbacks (Ville) - Change edx to ecx (Ville) Signed-off-by: Kevin Strasser <kevin.strasser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-17lib/igt_edid: new library for generating EDIDsSimon Ser
For the purposes of testing different EDID features, we need to generate more and more complex EDID blobs (e.g. with audio support). However currently IGT uses a macro-based system to generate EDIDs. This doesn't scale well and is pretty inflexible. This commit introduces a new little library to generate EDIDs. For now it can't do more than the old macro. Future commits will extend the API. The structures are mostly based on the Linux kernel code (drm_edid.h). Setters have been added for convenience. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-04-10lib/igt_fb: Create AMD YUV buffers with AMD GEM IOCTLNicholas Kazlauskas
The kmstest_dumb_create API isn't suitable for creating multi-planar buffers since it tries to calculate the size based on the first plane's pitch only. AMDGPU requires that the luma pitch be aligned to 256 for YUV buffers which results in crashes on kms_plane@pixel-format-pipe-*-planes tests when using kmstest_dumb_create since the buffer returned is smaller than needed (16384 size returned, 24576 size required). Create and map the buffer with the correct size by using the AMD helpers introduced by this patch: igt_amd_create_bo and igt_amd_mmap_bo. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com>
2019-03-26lib: Add GPU power measurementChris Wilson
Read the RAPL power metrics courtesy of perf. Or your local HW equivalent? v2: uselocale() v3: Use gpu_power_s(), gpu_power_J(), gpu_power_W() to try and make the scale factors self-consistent. v4: Use igt_sysfs v5: s/tN/sampleN/ 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>
2019-02-26lib/i915: Move mmap IOCTLs wrappers into separate fileAntonio Argenziano
Move all mmap flavours and support function to separate file in i915 folder. This helps with moving i915 specific functions away from common libraries. v2: - Autotools still exists. (Petri) - Include gem_mman.h directly. (Chris) v3: - Keep includes explicit. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-01-23tests: drop openssl dependency in favor of glib sha1 implementationJani Nikula
We already depend on glib which has sha1, so we don't really need openssl just for sha1. The opensll dependency was added in commit caea9c5b3aa1 ("igt/gem_userptr: Check read-only mappings"). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-11-26v3d: Add a helper libraryEric Anholt
Just a few little ioctl wrappers that v3d tests will use. v2: Move the struct above the prototypes. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Petri Latvala <petri.latvala@intel.com> (v1)
2018-11-23igt/gem_exec_capture: Capture many, many objectsChris Wilson
Exercise O(N^2) behaviour in reading the error state, and push it to the extreme. Reported-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-10-31lib: Make libunwind optional againDaniel Vetter
Apparently it's really not great to require it for a bunch of platforms. Requested by Sean and Eric. v2: Use combo option (Petri). v3: Fix the right option (Petri) v4: try a bit harder ... v5: Even more simplification (Dylan) Cc: Dylan Baker <dylan@pnwbakers.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> (v1) Reviewed-by: Petri Latvala <petri.latvala@intel.com> Cc: Sean Paul <sean@poorly.run> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-10-08igt: Make pixman mandatoryMaxime Ripard
So far, pixman was used exclusively when the Chamelium support was enabled. However, since we're going to use it as one of the backend to do the igt_fb conversions between formats, we'll need it all the time. Make that explicit. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-30lib/core: Use libdw to decode stack trace with debugging symbols, v2.Maarten Lankhorst
libdw is a new dependency built from the elfutils package. It provides us a way to generate line numbers and file names from the instruction pointer. elfutils is LGPLv3 or GPLv2, so it's ok to link against it. Before: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:29661) CRITICAL: Failed assertion: result == 1 (meta_test:29661) CRITICAL: error: 0 != 1 Stack trace: #0 [__igt_fail_assert+0x20a] #1 [test_result+0x7a] #2 [__real_main120+0x240] #3 [main+0x4a] #4 (../csu/libc-start.c) __libc_start_main:344 #5 [_start+0x2a] After: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:1357) CRITICAL: Failed assertion: result == 1 (meta_test:1357) CRITICAL: error: 0 != 1 Stack trace: #0 ../lib/igt_core.c:1467 __igt_fail_assert() #1 ../tests/meta_test.c:95 test_result() #2 ../tests/meta_test.c:137 __real_main120() #3 ../tests/meta_test.c:120 main() #4 ../csu/libc-start.c:344 __libc_start_main() #5 [_start+0x2a] Changes since v1: - Add libdw dependency to readme. - Change backtrace format slightly. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add description about libdw in commit msg, name -> dwfl_name] Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-07-18lib/rendercopy: Add gen4/5 rendercopyLukasz Kalamarz
Add rendercopy implementation for gen4/5. Basic structure copied from the gen6 implementation, and the gen4/5 specific bits were mostly lifted from sna. v2: Renamed registers definitions, which are GEN4 specific to include that prefix (Lukasz) v3: Rebase and checkpatch Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-07-17tests/psr: Move PSR state test functions to libDhinakaran Pandiyan
kms_frontbuffer_tracking and kms_psr test PSR in different ways, let' fix that by creating common library functions. v2: Include the new file in meson.build v3: Leave --no-psr intact (Rodrigo) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-07-13igt/gem_userptr: Check read-only mappingsChris Wilson
Setup a userptr object that only has a read-only mapping back to a file store (memfd). Then attempt to write into that mapping using the GPU and assert that those writes do not land (while also writing via a writable userptr mapping into the same memfd to verify that the GPU is working!) v2: Pull the random batch construction into a routine to avoid duplication. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-05-23lib: Add igt_color_encodingVille Syrjälä
Add some helpers for generating rgb<->ycbcr conversion matrices. v2: Add enums for color_encoding/color_range Fix full range handling (lacked +-0.5<->+-1.0 scaling) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-05-23lib: Add igt_matrixVille Syrjälä
Add a helper library for basic matrix math. v2: Make the identity matrix static const (Chris) Add the m(row,col) macro (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-05-21lib/media_fill: Create common media_fill library for all gensKatarzyna Dec
Let's create common media_fill library, similarly as for gpgpu_fill. This will allow to make code easier to read and maintain. Moreover we can create generic __gen9_media_fillfunc for future gens. >From gen9 media fillfunctions differ only with kernel parameter. v2: fixed indentations in files v3: Added missing copyright headers. Made __gen9_media_fillfunc static. Removed gen9 kernel (the same as for gen8). v4: rebase Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Reviewed-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
2018-05-15lib: Rename library from gpu_fill to gpu_cmdsKatarzyna Dec
After refactoring media_spin library - gpu_fill contains helper functions for render copy, *_fill functions and media_spin. Let's rename this library to gpu_cmds. This name will be more general. v2: changed name from gpu_helpers to gpu_cmds Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-05-07lib: create new dependency for aubdumpLionel Landwerlin
While trying to capture an aubdump on a libva demo, I run into a crash in intel_batchbuffer.c. Turn out every driver has it's own intel_batchbuffer.c with similar symbols and because aubdump pulls in libigt, things go wrong. One could argue that there is something wrong with intel-vaapi-driver's build but I also think aubdump should embed as little as possible. This change creates a very small library that embeds just the needed bits of igt for aubdump. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-04-12lib: Remove duplications in gpu_fill libraryKatarzyna Dec
After moving all functions needed for gpgpu and media fill testing there is a lot of duplications which can be removed: Library media_fill_gen8 and media_fill_gen8lp for CHT was removed, media state flush for !CHT was added to gen7_emit_media_objects. Many gen8 functions were replaced with gen7 version with devid parameter (gen7_fill_curbe_load, gen7_emit_interface_descriptor, gen7_fill_binding_table, gen7_emit_media_objects). Unified fill kernel function so it is applicable to all gens and both media and gpgpu (merged gen7_fill_media_kernel and gen8_fill_media_kernel). Duplicated constants like GEN8_MEDIA_VFE_STATE, GEN8_MEDIA_CURBE_LOAD, GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD, GEN8_MEDIA_OBJECT were replaced by GEN7 version. However this constants were not removed from gen8_media.h library, because they are used by other tests for Gen8+. More refactoring in this gen*_media.h libraries is needed. It seems that further unification of *_fillfunc functions will introduce more confusion in understanding what the tests are doing and what were changes between Gens. v2: Moved some reduntant changes from Move gpgpu/media fill to gpu_fill... to this patch. Applied comments from review. v3: rebase Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-04-12lib: Move common gpgpu/media fill functions to gpu_fill libraryKatarzyna Dec
Gpgpu_fill and media_fill libraries are very similar and many functions can be shared. I have created library gpu_fill with all functions needed for implementing gpgpu_fill and media_fill tests for all Gens. For reviewing and debugging purposes this patch should be only moving functions from few libraries to one removing functions identical for both media and gpgpu. Places in the code that required more changes: Removing gen7_fill_gpgpu_kernel function that is identical to gen7_fill_media_kernel and introduces conflict with moving genX_fill_interface_descriptor, which are the same for media and gpgpu. Function gen8_fill_media_kernel is not removed in this patch (although it is identical with gen7 version), because this patch should be as much as possible functions movement. gen8_fill_interface_descriptor was unified for media and gpgpu by adding kernel and its size as a parameter (this parameters were missing in media gen8, gen8lp and gen9 functions) gen8_emit_state_base_address was unified, the one for gpgpu was configured like it would be using indirect state (while we are using CURBE). I have checked that media fill version (OUT_BATCH(0 | BASE_ADDRESS_MODIFY)) works fine on gpgpu gen8 and newer. v2: Changed code layout. GenX_fill_media_kernel was identical to genX_fill_gpgpu_kernel so this function was unified to gen7_fill_kernel. There were 2 very similar functions gen8_emit_state_base_address for media and gpgpu, where the one for gpgpu was configured like it would be using indirect state (while we are using CURBE). I have checked if media fill version works fine in gpgpu test on Gen8 and unified them. v3: Made patch easier for reviewing moving changes unifying code for various gens (that were included v1) to other patch, leaving only the most critical code changes. v5: Added copyrights and #ifndef to gpu_fill.h v5: Added copyrights to gpu_fill.c Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-03-05tests/perf_pmu: Handle CPU hotplug failures betterChris Wilson
CPU hotplug, especially CPU0, can be flaky on commodity hardware. To improve test reliability and reponse times when testing larger runs we need to handle those cases better. Handle failures to off-line a CPU by immediately skipping the test, and failures to on-line a CPU by immediately rebooting the machine. This patch includes igt_sysrq_reboot implementation from Chris Wilson. v2: Halt by default, reboot if env variable IGT_REBOOT_ON_FATAL_ERROR is set. (Petri Latvala) v3: Add missign docs and update stale comment. (Petri Latvala) v4: Use pause instead of sleep. (Chris Wilson) v5: Newlines! (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-02-27meson: Get rid of lib_headersArkadiusz Hiler
Unused since commit 1f53e0dcec7a ("meson: Don't install headers"). Suggested-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-23meson: Use bufmgr stubs headers if libdrm_intel is not foundArkadiusz Hiler
Just adding the .h file to lib_headers is not enough. With this change we are passing 'stubs/drm' as a part of include_directories when building, so a proper -I will be issued to the compiler. This can be done by turning 'inc' into a list of include_directories()-generated objects. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com>
2018-02-23lib/igt_gt: add intel_measure_ring_sizeDaniele Ceraolo Spurio
The logic to measure the ring size is replicated almost identically in several tests. Adding it as a common function will make the code cleaner. The tests are updated in follow up patches. v2: - Move into a new file: 'gem_ring'. (Chris) v3: - Rename ring measure function. (Chris) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-01-25meson: Use absolute path for IGT_DATADIRPetri Latvala
IGT_DATADIR needs to be an absolute path instead of relative to prefix or data files can only be found if cwd is exactly prefix. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104723 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-17meson: Refactor get_option() calls for directoriesPetri Latvala
Fetch the configuration values in the toplevel meson.build for all subdirs to share. v2: Also remember tests/intel-ci/meson.build 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-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-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-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-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-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-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-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>
2017-11-06lib: Fix compilation on non-x86Thierry Reding
The meson build avoids the failure by excluding the igt_x86.c file from the compilation. autotools being what they are don't support that in an easy way, so just use the preprocessor to avoid the duplicate function definitions. Since igt_x86.c will now be ignored for non-x86 builds, the meson work- around can be removed. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-17lib/i915: Move context related helpers to lib/i915/gem_contextMichał Winiarski
We'd like to make ioctl_wrappers a bit thinner, and we plan to add new helpers in the following patch. Let's move context related helpers before adding more content. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Extract helpers for determining scheduler capabilitiesMichał Winiarski
Couple of tests are using either determining scheduler capabilities or pretty printing. Let's move those to helpers in lib. We can also keep the value obtained from getparam static. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-12meson: Make syncobj tests buildVille Syrjälä
Include igt_syncobj.c in libigt so that tests/syncobj_basic actually builds, and let's also build tests/syncobj_wait. v2: Also update lib_headers (Petri) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03meson: Fix build of igt_x86-using tests on non-x86 platforms.Eric Anholt
Just stub out the features return value, and return an empty string. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03lib: Reduce dependency on glibPetri Latvala
In commit ebd6eb69f57b ("Make igtrc configuration common, with configurable suspend/resume delay") .igtrc handling was moved to igt_core from igt_chamelium. That made everything in IGT depend on GLIB by accident. In short, igt_core.h declared a variable of type GKeyFile*, requiring glib.h. Everything that tried to #include igt_core.h required glib.h to be available, by use of GLIB_CFLAGS. This "worked" so far because CAIRO_CFLAGS contained GLIB_CFLAGS. As the variable is only used by other stuff in lib/, stuff it in its own header file to leave igt_core.h without a dependency to glib.h. Also add a couple of missing #ifdef HAVE_GLIBs around. Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-18meson: Fix IGT_GIT_SHA1 handlingVille Syrjälä
Tell meson about the dependency on version.h. Avoids the compiler falling over on account of IGT_GIT_SHA1 not being there. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install libigt.soJordan Justen
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-08meson: igt_frame also needs pixmanDaniel Vetter
Oversight I noticed because I have the deps for chamelium on the other machine already. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08meson: Use static libs to handle IGT_LOG_DOMAIN.Eric Anholt
It means that compiler errors in the .c files take you to the source place in your editor, not a preprocessed temporary. v2: Add the library deps, fails linking otherwise. Signed-off-by: Eric Anholt <eric@anholt.net> (v1) Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08meson: basic build system supportDaniel Vetter
Why? Because it's fast. Like really, really fast. Some data (from a snb laptop, so rather lower-powered): - Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s. - Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s). - Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s) - Running tests, after a full build: ninja test 6s vs. make check 24s - Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Stone <daniel@fooishbar.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>