summaryrefslogtreecommitdiff
path: root/lib/igt_kms.c
AgeCommit message (Collapse)Author
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-05lib/igt_kms: Be more verbose about failure in kmstest_wait_for_pageflipArkadiusz Hiler
First, we set errno to 0 before doing select() to avoid random pollution of the assert message with things like: "Last errno: 25, Inappropriate ioctl for device" Second, we log explicitly if we exceeded the timeout (ret == 0). Third, if we fail the select() we log that with some explanation. Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-04lib/igt_kms: Clear pipe color management properties on reset.Maarten Lankhorst
Just like we try to sanitize all properties in igt_plane_reset, we should do the same for pipe properties. Loading a wrong lut could affect passing and failing tests, so we need to be careful and set sane defaults for everything. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-01tests/plane_lowres: Test each plane individuallyJosé Roberto de Souza
ICL has some many planes per pipe that it is causing this test to skip due bandwidth limitation when combined with 4K displays. The objective of this test is test the visibility of the planes when switching between high and low resolution, more information in the patch that added this test 12e34d8c909a ("tests/kms_plane_lowres: Plane visibility after atomic modesets"). So it was setting all the planes the tested pipe in the bottom left of the display using the height of high resolution, checking the visibility and then switching to the low resolution mode and checking again the visibility and now it is expected that all planes would be invisible. So to overcome ICL bandwidth issues, here it is testing each plane individually. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01lib: Share the 1024x768 mode among testsJosé Roberto de Souza
Three test were duplicating this 1024x768 mode so lets move it to lib and share it. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-03-20lib/igt_sysfs: Remove idx from sysfs_openMichał Winiarski
Similar to sysfs_path - more explicit more better. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-20lib/igt_kms: reset plane alpha and blend in igt_plane_reset()Juha-Pekka Heikkila
plane alpha and blend would affect other tests if left in unexpected states v2 (ville syrjälä): use "Pre-multiplied" as default for IGT_PLANE_PIXEL_BLEND_MODE. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-13lib/igt_kms: Add zpos plane property.Marius Vlad
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2019-03-11lib/igt_kms: Fix docs for igt_enable_connectors()Ville Syrjälä
Add the missing docs for the 'drm_fd' parameter. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-04lib/igt_kms: Fix commits for planes with multiple possible CRTCsNicholas Kazlauskas
An igt_plane_t is defined per igt_pipe_t. It is treated as its own independent resource but DRM planes can be exposed to being used on a number of possible CRTCs - making it a shared resource. In IGT planes with multiple possible CRTCs are added to the plane list for each pipe that the plane supports. The internal state remains independent in IGT so when the same plane is modified for multiple pipes in a single commit the last pipe to modify it is the one whose state gets fully applied. This situation happens fairly often in practice - resetting the display at the start of the test before a commit will reset the CRTC ID and FB ID for each plane. For an example, consider the igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max test. This test will fail for any overlay plane exposed for multiple CRTCs. The test tries to set a framebuffer for pipe A but has all the other pipes reset the plane state in the same commit. If there are multiple pipes on the hardware then the last pipe will be the one to set all the plane properties. The driver will receive a commit with no overlay plane enabled since the last pipe set CRTC ID and FB ID to 0, disabling the plane. The reference CRC capture will be incorrect since not all the planes have been enabled and the subsequent CRC captures will not match, failing the test. The simplest (but hacky) fix to this problem is to only set the properties for the plane for the pipe that last had it bound. This patch introduces a global plane list on igt_display_t that keeps track of the pipe that pipe that last called igt_plane_set_fb. The properties for the plane will only be applied from that single pipe when commiting the state to DRM. No behavioral changes should be introduced by this patch for hardware whose planes are only ever exposed one CRTC. It would likely be best to eventually modify the igt_pipe_t plane list to be a list of pointers to planes instead (igt_plane_t**) instead of being the actual plane objects, but that can come later. Many areas of the code like to make use of the backpointer to the pipe on the plane which makes refactoring the code in that manner a little trickier. v2: Add igt_plane_set_fb, use igt_plane_t for global plane list (Daniel) v3: Leave TODO for filling in all state/props on global planes Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-02-26lib/igt_kms: Add helpers to count and iterate planes from outputPaul Kocialkowski
With helpers to count and iterate among planes of a given type from the pipe in place, we can use them with the current pipe for the output to make it possible for tests to use them (the pipe struct is not currently easily exposed to tests and exposing it adds unnecessary complexity). Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-26lib/igt_kms: Add helpers to count and iterate planes from pipePaul Kocialkowski
This introduces helpers that allow counting how many planes of a given type are present from a pipe and getting the n-th plane of a given type. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-22tests/kms_lease: exercise ueventDaniel Vetter
And make sure we get the LEASE=1 value, indicating a lessee change. v2: Apparently netlink reading can leak EAGAIN out through udev_monitor_receive_device. No idea what's going on there, so let's wrap some duct tape around it. v3: Lyude reported that we might get a few udev events on startup of the test. Drain those first. v4: Use the igt hotplug library functions, they already take care of all the uevent special cases. Cc: Lyude Paul <lyude@redhat.com> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-20lib/crc: Reset fifo underrun reporting for every crc captureDaniel Vetter
We have tons of issues with crc mismatches, but often by that time there was already a fifo underrun, which disables further fifo underrun reporting. Reset fifo underrun reporting before we capture a crc so that it's easier to figure out why the crc mismatch happened. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-05lib/igt_kms: Don't reset VRR_ENABLED on every commitNicholas Kazlauskas
If the VRR tests failed then there was a chance that VRR could be left enabled when exiting the test so the VRR_ENABLED property was reset to 0 whenever the pipe was reset. However, in doing so the pipe's state was considered changed even if VRR_ENABLED was already 0. This causes the pipe to be added to commits where it previously wasn't. Other tests with properties that can persist for failures (like color management) don't bother resetting the properties - so this patch changes VRR_ENABLED to work the same. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109490 Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-02-01lib/igt_kms: Clear all non-atomic properties in legacy/universal commit ↵Maarten Lankhorst
correctly. We used to add them all 1 by 1, but we really only care about not handling a few. Only skip unsetting all atomic properties, instead of handling it through a whitelist. This fixes kms_busy, which was updating the VRR hint, even though we already unset it in the legacy path. Cc: Nicholas Kazlauskas <nkazlaus@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109490 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2019-01-28tests: Add variable refresh rate testsNicholas Kazlauskas
There are 3 tests for basic variable refresh rate functionality. The tests measure flipping at the average between the current mode refresh rate and the minimum supported variable refresh rate. It tests that VRR is enabled and that the difference between flip timestamps converges to the requested rate. It also tests this under both S3 and DPMS. Potential ideas for future tests: - Test behavior inside VRR range with a stepping test - Test behavior outside of VRR range - Multi-monitor (limited by no async pageflips in DRM atomic API) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-01-21lib/igt_kms: Assert that active crtcs have at least one planePetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2019-01-21lib/igt_kms: Make igt_display_init require at least one planePetri Latvala
Not only will the following calloc call end up allocating 0 bytes (undefined behaviour), but last_plane becomes (uint8_t)-1. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2019-01-21lib/igt_kms: Use correct type for callocPetri Latvala
The type mismatch was char vs. unsigned char, both being size 1 so this didn't cause any actual issues other than noise in static analysis that doesn't believe 1 is equal to another type of 1. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2018-12-10lib/kms: Enable outputs by default in igt_require_displayDaniel Vetter
More testing, automatically when using the high-level kms helpers! Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-11-27lib/igt_kms: Fill the plane format/mod information for pre-blobifier driversVille Syrjälä
For drivers that don't support the IN_FORMATS blob we should just consult the format list returned by getplane. Since we can't know which modifiers are supported we'll assume linear-only. Obviously that may not work for every driver out there, but not much more we can do unless we start to actually probing with addfb. Cc: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2018-11-27lib/kms: warn if we commit without outputsDaniel Vetter
With the high-level helpers requiring outputs there's not point in silently ignoring issues anymore. Complain about that if it ever happens. This reverts commit 212b71372bfbb73663d872df31118d6b396ada4f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Sep 14 21:03:38 2018 +0100 lib/kms: Skip no-op display updates which created an in my opinion serious API issue by silently dropping possible errors on the floor. Instead of silently second guess what the test might have wanted to do in the absence of display outputs it's much better to be explicit, and enforce that. v2: Improve commit message. v3: Switch to an assert and update comments, to make it clear this is igt_display api abuse (Arek). Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v2) Acked-By: Antonio Argenziano <antonio.argenziano@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-11-27lib/kms: Drop igt_display_initDaniel Vetter
If you need the high-level functions, then you probably need a full display. Unexport the non-requiring version, and adjust the documentation. This also gives us proper docs for the recently added igt_display_require. Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-By: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-10-25kms_content_protection: Add Content Protection testRamalingam C
Pretty simple test: - picks the hdcp capable output with suitable pipe and apply modeset. - checks the connected sink's hdcp capability through debugfs - apply a FB and wait for the flip completion. - clears the content protection property - verifies that it clears - sets the content protection property to desired - verifies that it transitions to enabled - incase of timeout three reattempts are implemented - clear the content protection property and modeset on the crtc Above steps are repeated on all HDCP capable connectors for both legacy and atomic subtests. v2: dynamic subtests are dropped [Daniel] v3: debugfs is used to detect the sink's hdcp capability [Daniel] data structure is made as global variable. v4: debugfs file from connector's debugfs dir is used [Daniel] v5: i915_debugfs_connector_dir() usage is modified [Chris] Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-10-17lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffersDeepak Rawat
vmwgfx does not support GEM interface so calling gem_close on vmwgfx results in error. v2: Use drmIoctl with error when ioctl() failed. v3: Seperate ioctl wrapper. Signed-off-by: Deepak Rawat <drawat@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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-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-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-07-24lib: Don't assert all KMS drivers support edid_overrideChris Wilson
edid_override is a i915.ko debugfs feature; just skip any kms test that depends on being able to override the edid. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107337 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-07-12lib/igt_kms: simplify pipe <-> name conversionLucas De Marchi
Now that we can use _Static_assert() due to C11, make it future proof so we remember to update this if IGT_MAX_PIPES changes. Also reduce verbosity a little bit by calculating indexes instead of if/else chain. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-06-08lib/kms: Respect fb color_encoding/color_rangeVille Syrjälä
Configure the plane color_encoding/color_range based on what the fb contents are. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-05-24tests: Move wait_for_pageflip as library functionMika Kahola
Two tests uses the very same wait_for_pageflip() routine. These tests are 'kms_rotation_crc' and 'kms_flip_tiling'. In order to decrease code repetition, let's move this function as part of kms function collection in igt_kms. No functional changes. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-05-16igt: Drop Intel from the name in docs and pathsArkadiusz Hiler
This is just a simple change to reflect the actual state. No rewording yet, just a simple substitution in most visible places - docs, README and paths. There are probably some leftovers here and there, but we can let them be for now, this is already well overdue. v2: fixed couple of obvious leftovers pointed out by Petri Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-04-11lib/igt_kms: Reset FIFO underruns on first commit after init()/reset().Maarten Lankhorst
When we set the test to its first state, we will clear FIFO underrun status through the debugfs, so that any underruns caused by the tests will not affect other tests. In particular this also resets the FBC FIFO underrun status, so previous failures won't affect other tests that depend on FBC. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105681 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-04-11lib/igt_kms: Handle outputs with no modes betterMaarten Lankhorst
Pretend that outputs without modes are disabled, and try reprobing if no modes are initially detected, just in case that the reprobe will find modes. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105798 Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-28lib/igt_kms: Improve connector probing in igt_display_init(), v2.Maarten Lankhorst
Only do a full probe when the initial connector status is unknown, and otherwise skip it. This should speed up kms tests ever so slightly. Also set pipe to PIPE_NONE for igt_output_refresh(), to make the connector info slightly more accurate. Changes since v1: - Instead of a force_reprobe tristate, only force reprobe from igt_display_init() when an unknown connection is found. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-03-21lib/kms: Use named initializers for prop name arraysVille Syrjälä
Decouple the prop name arrays from the actual enum values by using named initializers. Should make it less likely that we end up with the wrong property on account of getting the order wrong. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
2018-03-21lib/kms: Constify some string arraysVille Syrjälä
Make a bunch of string arrays const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
2018-03-21lib: Don't fail if plane IN_FORMATS not presentDaniel Stone
igt_display_init() now unconditionally tries to get the plane IN_FORMATS blob, which causes a hard assert failure if we don't have the property present. Check if it's there and return early if not. Signed-off-by: Daniel Stone <daniels@collabora.com> Fixes: 98f7614bd725 ("lib: Parse plane IN_FORMATS blobifiers into a nicer form") Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-19lib/igt_kms: Add functions to get only a single output for a pipe, v2.Maarten Lankhorst
igt_get_single_output_for_pipe() will give a valid output for a pipe, for_each_pipe_with_single_output will iterate over all pipes, and will be called for each pipe with an output once. Changes since v1: - pipe = __outputs - __output returned a negative number for pipe, correctly set it to __output - __outputs. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-16lib: Parse plane IN_FORMATS blobifiers into a nicer formVille Syrjälä
Maintain straight up arrays of format+modifier tuples for each plane, and also collect up a similar device wide array. These will make it easy to confirm whether each plane (or the whole device) supports a specific format+modifier pair. v2: s/igt_hweight64/igt_hweight/ Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-12lib/igt_kms: Fix igt_plane_reset to handle cursor planes correctly tooMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-27igt: Make libudev mandatoryAntonio Argenziano
Since more essential components use libudev, make its dependency mandatory. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-27lib/igt_kms: Fix docbook warningsMaarten Lankhorst
This gets rid of the following warnings: lib/igt_kms.c:2688: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2738: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2788: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe is not used from source code comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe_obj is missing in source code comment block. lib/igt_kms.c:3794: warning: Parameter description for igt_cleanup_hotplug::mon is missing in source code comment block. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-20lib/igt_kms: Add doc for kmstest_ and igt_ functionsCarlos Santa
It seems some of the documentation is still not complete, finish it for the benefit of IGT newcomers. These functions include: kmstest_dumb_map_buffer kmstest_get_vblank igt_assert_plane_visible igt_display_require_output igt_display_require_output_on_pipe igt_pipe_get_plane_type igt_output_get_mode igt_output_set_pipe igt_output_get_plane_type igt_plane_set_fb igt_plane_set_position igt_plane_set_rotation igt_wait_for_vblank_count igt_wait_for_vblank Signed-off-by: Carlos Santa <carlos.santa@intel.com> CC: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>