summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-10-03lib/kms: Handle no connectors for igt_enable_connectors()Chris Wilson
Take the device fd from the caller as to which card we should try and enable connectors for (or else we may not enable the right connectors for the test!) and fail gracefully if there is no kms support on the device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-10-02tests: Add kms plane alpha blending test, v2.Maarten Lankhorst
Add a few tests to test various blending modes. Some of the tests will skip if pixel mode alpha cannot be enabled with plane alpha at the same time. This is for mali-dp. I didn't test on that platform, but tested with the same check on i915. The tests won't pass i915 on pre-gen11 hw. i915 has small rounding errors with 0xff and 0x00 alpha, which gives CRC mismatches. Changes since v1: - Send the correct version, with the skips for mali-dp in place. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-10-01lib/kms: Skip no-op display updatesChris Wilson
If the display is disabled (e.g. the driver has disabled the KMS interface) there is nothing to do so avoid failing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-10-01lib: Report if kms is enabled on the displayChris Wilson
Some drivers may have disabled KMS or there may simply nothing attached to the device. In either case KMS is unusable and we may prefer to skip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-09-28tests/psr: Check for PSR entry less frequentlyDhinakaran Pandiyan
We currently read debugfs every 1 ms, given that it takes about 140 ms for PSR entry on the CI machines and entry can occur at frame time intervals, bump the debugfs read interval to 20 ms. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-28tests/psr: Wait for PSR exitDhinakaran Pandiyan
PSR appears to not exit immediately after the test commits a page flip, give some leeway for PSR to idle. Let's set the timeout at 40 ms with a 5 ms interval between each status read. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-27lib/igt_fb: Refactor blitter usageVille Syrjälä
Deduplicate the blitter code. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-27lib/igt_fb: Pass around igt_fb internallyVille Syrjälä
Instead of passing around a boatload of integers everywhere let's just pass around the igt_fb struct. That obviously means we have to populate it first sufficiently, to which end we'll add a small helper. Later on the stride/size calculations will consult the already pre-populated igt_fb and fill in the rest as needed. This makes the whole thing a lot less error prone as it's impossible to accidentally pass the arguments in the wrong order when there's just the one of them, and it's a pointer. v2: Rebase due to uint64_t size Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-27lib/igt_fb: Constify format_desc_structVille Syrjälä
We don't want anyone to modify the format description structures. Make them const. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-27lib/igt_fb: Consolidate fb size calculation to one functionVille Syrjälä
Eliminate the planar vs. packed size calculation differences and just use one function for the entire thing. v2: Rebase due to uint64_t size Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-27lib/igt_fb: Extract calc_plane_stride()Ville Syrjälä
Extract the stride calculation from calc_fb_size_packed() to its own thing so that we can use it to calculate just the stride. v2: Rebase due to overflow fixes and roundup_power_of_two() Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-27lib/debugfs: Use a blocking read in igt_pipe_crc_get_single()Ville Syrjälä
All users of igt_pipe_crc_get_single() want a blocking read even if the fd was opened in nonblocking mode. Make it so. v2: Fix the docs for igt_pipe_crc_get_single() Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
2018-09-26lib/gpgpu_fill: Implement gpgpu_fillfunc for Gen11Katarzyna Dec
Added gen11_gpgpu_fillfunc to have gpgpu_fill passing on Gen11. Gpgpu shader was generated using IGA (Intel Graphics Assembler) based on binary found in lib/gpgpu_fill.c to match the changes in Gen11 HW: Changed 'mul' instruction to 'shl' (since Gen11 'mul' does not support integer values for both src and dest). Changed SEND message descriptor (it should have length 2 not 3). Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Tested-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Acked-by: Katarzyna Dec <katarzyna.dec@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-09-26lib: Reuse Gen9 mediafill on Gen11Daniele Ceraolo Spurio
We can reuse gen9 mediafill function, because no changes are required to support Gen11. Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Tested-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Katarzyna Dec <katarzyna.dec@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-09-26lib: Unexport gem_gtt_type()Chris Wilson
Nobody uses the function directly, instead using the various helpers to determine if ppgtt is present. 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>
2018-09-25lib/igt_fb: Remove the hand rolled addfb2Ville Syrjälä
Just use __kms_addfb() always instead of hand rolling another drmModeAddFB2() usage. __kms_addfb() demands support for modifiers but we've had that for a long time now so it's not a problem. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/kms: Pass the number of planes explicitly to __kms_addfb()Ville Syrjälä
Currently __kms_addfb() assumes that only the first plane can be at offset 0. I don't particularly like such assumptions so let's just pass in the number of planes explicitly. We'll also require offsets[] to be passed in always. Nothing really to gain by making it optional. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/kms: Pass strides[] to __kms_addfbVille Syrjälä
Make __kms_addfb() usable with planar formats by passing in the stride for each plane. v2: Handle strides[1] for planar formats in kms_available_modes_crc Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: Add fb_num_planes()Ville Syrjälä
Add a helper to return the number of color planes. We'll need this for ccs support later. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: Add fb_plane_bpp()Ville Syrjälä
Add another helper to get the bpp for a specific color plane. We'll need this for ccs support later. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: s/planar_foo/fb_plane_foo/Ville Syrjälä
Rename the planar_foo() functions to fb_plane_foo(). Makes it clear they're perfectly usable with non-planar formats too. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: Pass fb_blit_upload to free_linear_mapping()Ville Syrjälä
With fb_blit_upload now being the base class of fb_convert_blit_upload we can pass the entire structure down to free_linear_mapping(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: Use fb_blit_upload as the base class for fb_convert_blit_uploadVille Syrjälä
fb_blit_upload already has everything we need, so let's use it as the base class for fb_convert_blit_upload. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib: Add DIV_ROUND_UP()Ville Syrjälä
Add DIV_ROUND_UP() and replace some hand rolled versions with it. v2: Drop the duplicate from gem_render_copy() (Paulo) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-25lib/igt_fb: Respect the users choice of strideVille Syrjälä
We prented to allow the caller to specify the stride explicitly for the fb. But we don't actually use that user specified stride when we calculate the require bo size. Fix that oversight. v2: Rebased due to uint64_t size Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-09-20lib/igt_psr: Give a explicit parameter name to functions that expect debugfs fdJosé Roberto de Souza
Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-14intel: Be consistent with test results on simulationTvrtko Ursulin
Tests which call intel_require_memory currently always skip on simulation, unless they fail first due insufficient memory. This can create different outcomes depending on the simulation environment so move the simulation skip to the start of the function for 100% consistency in results. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-14igt_sysfs: Avoid double closing the fd in igt_sysfs_scanfTvrtko Ursulin
fdopen takes ownership of the fd so only one flavour of closing it is needed. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-11lib: Add roundup_power_of_two()Ville Syrjälä
Add a helper to round a value to the next power of two size. And since we need fls() to implement that, reuse that elsewhere as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-11lib/igt_fb: Make fb size 64bitVille Syrjälä
Switch all fb size handling to 64bits to accomodate >4GiB framebuffers. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-07lib: Cancel all outstanding requests at the end of a testChris Wilson
Quite often on catastrophic failure the test leaves a long queue of unterminated batches pending execution. Each runs until hangcheck fires and skips onto the next, leaving us waiting for a very long time at test exit. On older kernels, this gracefully degrades into the existing mechanism. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-09-07lib/igt_fb: Add missing set_domain callsVille Syrjälä
We're missing some set_domain calls around the ggtt mmap paths. This means we never tell the kernel that we've dirtied the object. And then at some point down the line the kernel throws the pages into /dev/null instead of hanging on to them/swapping them out because they were never marked as dirty. Throw in the missing set_domains(GTT,GTT) calls and rip out the old bogus set_domain(CPU,CPU). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-09-05tests/psr: Avoid opening of already open debugfs dirDhinakaran Pandiyan
The tests calls igt_debugfs_dir() to open the debugfs dir and further along calls igt_debugfs_read() each time i915_edp_psr_status needs to be read. As igt_debugfs_read() opens the directory unnecessarily, switch to using the newly added igt_debugfs_simple_read() v2: Commit message typo (Jose) Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05lib/debugfs: Function to read debugfs with the directory already openDhinakaran Pandiyan
tests/kms_frontbuffer_tracking and tests/kms_psr read debugfs nodes several times after opening the directory once. There is already an implementation of this in the kms_frontbuffer_tracking, moving that functionality to the library will allow us to share the code with kms_psr and kms_fbcon_fbt Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05lib/pm: Fail gracefully if CONFIG_PM is not built into the kernelChris Wilson
We report the failure from igt_setup_runtime_pm() so that the caller can decide how they may proceed, so replace the hard assert with the error propagation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-09-04lib/pm: Increase snd module probe timeout to 10sChris Wilson
5s is often not enough for the sound module to finish loading, so bump the timeout to 10s. For fun, poll quicker over the first 1s! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.linux.com> Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
2018-09-04lib/pm: Wait a little for sound module load to completeChris Wilson
Sometimes we may probe the sound module as it is still being registered and its debugfs not yet fully populated. If we do not find a file we expect to exist, sleep a little and check again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107801 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.linux.com> Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
2018-09-04lib/pm: Squelch warning for failing to enable audio powermanagementChris Wilson
It doesn't seem to be preventing rpm (see the pm_rpm tests) if we fail to enable runtime-powermanagement for audio, so reduce the warning to a debug. It will still be visible if it fails, but only if it fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-09-03lib: Check for a specific match if requested.Chris Wilson
We only want to allow driver_open to match an unknown driver if asked for DRIVER_ANY, so we need to double check. Fixes: 9e5fa9112546 ("lib/drmtest: Move open device to separate function") Reported-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-09-03lib: Fix strcmp() direction for bsearch.Chris Wilson
I fluked out as vgem was the initial mid value, hiding the worst of the errors as i915 matched with DRIVER_ANY. Fixes: 20087bf22698 ("lib: Use a bsearch to find the module name") Reported-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-09-03lib: Use a bsearch to find the module nameChris Wilson
Even with a small number of known drivers (6), a bsearch will take at most 3 steps, whereas the linear search will take 3 steps on average. In the future with more known drivers, the logN bsearch will be even more advantageous. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-09-01lib/drmtest: Move open device to separate functionKatarzyna Dec
While working on IGT code and during reviewes I've noticed that it could be nice to have function that is opening particular device. Let's move out conditions for opening device and rename __open_device to __search_and_open() function. v2: Refactored open_device even more by getting device name once and returning fd for it. (Chris) v3: Added name_size to __get_drm_device_name, removed unused is_X_device. v4: Fixed cases with failing virtio_gpu v5: Rebase, indent fixes Signed-off-by: Katarzyna Dec <katarzyna.dec@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-08-31lib: Stop caching __drm_device_idChris Wilson
In a multi-device system there is no guarantee that the fd being probed in intel_get_drm_devid() is the same as was opened earlier. Any cache may outlive the fd, so is frought with lifetime issues. The primary reason for caching the devid was to avoid extra ioctls in the dmesg/strace, but hopefully all users now grab the id in their fixture and not inside every function. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-08-30lib/sysfs: Avoid using FILE* temporary for igt_sysfs_[v]printfChris Wilson
Currently we wrap our fd inside a FILE* stream to make use of vfprintf, but the man page leaves the question of errno and signal handling in doubt. It is documented as returning a negative value and setting ferror(), but we have been interpreting errno to handle signal restarting. As that is in doubt, reduce it to a sprintf and reuse our common interrupt handling write() that already returns -errno. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@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-08-30lib/psr: Add support for toggling edp psr through debugfs, v5.Maarten Lankhorst
It's harmful to write to enable_psr at runtime, and the patch that allows us to change i915_edp_psr_debug with the panel running will require us to abandon the module parameter. Hence the userspace change needs to be put in IGT first before we can change it at kernel time. Toggling it to debugfs will mean we can skip a modeset when changing our feature set. Changes since v1: - Rebase with the previous patches dropped. Changes since v2: - Rebase on top of new api in i915_edp_psr_debug. Changes since v3: - Enable IRQ debugging for extra logging. - Force PSR1 mode. (dhnkrn) - Move PSR enable/disable functions to lib/igt_psr. (dhnkrn) Changes since v4: - Redisable irqs right away when debugfs api doesn't work. (dhnkrn) - Use hex everywhere. (dhnkrn) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Fix -ENODEV explanation in has_psr_debugfs (dhnkrn)] Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-30lib/kms: Remove special enum handling and replace with call to ↵Maarten Lankhorst
igt_plane_set_prop_enum, v2. We now have infrastructure for generic enum handling. This will make it easier to write new tests without defining all enum constants beforehand. Changes since v1: - Fix compile error, sent old version by accident. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-08-30lib/igt_kms: Add try_prop_enum and set_prop_enum for mode objects, v2.Maarten Lankhorst
This adds the possibility to test arbitrary enumerations in IGT without having to define mappings for each and every one. Changes since v1: - Add commit description. - Add try_prop_enum, to allow handling unknown enumerations. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-08-17lib: Poll for snd_hda_intel discoveryChris Wilson
Loading the sounds modules is asynchronous with the sysfs device hierarchy being instantiated sometime after modprobe returns. As such while we are probing for the sound device, poll a few times to accommodate the async discovery. v2: closedir() after use Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-08-16Revert "lib: Keep upto half of RAM reserved for test runner"Chris Wilson
This reverts commit 2c7224e488457afb7bb76664c4b7c857baef1e08 as it was accidentally pushed when fixing up the pm_rpm compilation. Oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>