igfx_get_mmio() uses the global mmio variable by accident. Use a local
variable instead.
The intention is to rename the global variable later on, so shadowing it
here does not matter.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This adds tests/drm_auth.c which tests for drmGetMagic() and
drmAuthMagic() deficiencies.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Exercise lite-restore (re-submit a context that is currently running),
by queueing several small batchbuffers.
This test helps to validate WaIdleLiteRestore.
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
The call to low_mem_killer_disable(true) was being done
from within function oom_adjust_for_doom. However,
oom_adjust_for_doom gets called from 3 places. We only
want the call to low_mem_killer_disable(true) to happen
during common_init, so call it from here instead of from
oom_adjust_for_doom.
v2:Thomas Wood pointed out that the initial call to disable
the low_mem_killer does not get made when we are just
listing subtests; so I have qualified the call from the
exit handler, which re-enables the low_mem_killer, with
if (!igt_only_list_subtests()).
For belt and braces I have also made low_mem_killer_disable
idempotent, so multiple calls to disable or re-enable are
safe.
Signed-off-by: Tim Gore <tim.gore@intel.com>
[Thomas: small coding style fix]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Test used to call prepare_crtc twice in the plane loop and leaked two
framebuffers per [subtest]x[pipe]x[plane].
What the loops really wants to do, instead of second invocation of
prepare_crtc, is to just turn on the display with the unrotated fb to
verify that the plane property has been restored by the VT transition
from previous to graphics mode.
To enable that factor out code which does that from prepare_crtc into
commit_crtc and call it instead.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Produce the intel_reg man page from rst using rst2man. Also facilitate
writing any man page in reStructured text, as long as rst2man is
available.
v2: configure check for rst2man, credits to Thomas Wood for that.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Rendering into Y and Yf tiled frame buffers with Cairo was losing the
previous content ie. was starting from black. This is different than the
behaviour with linear and X tiled so make it the same by blitting the
initial content when creating the rendering context.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
On gen8, we should check that the full 64bit relocation value is
correct, and we should be sure to poison the relocation offset between
runs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Now that there is PAGE_SIZE define, use it.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Saves a good amount of code duplication by supporting expected
failures from the main loop.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Now that size is calculated in a single place and correct geometry passed in,
paint squares does not need to concern itself with it.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
There can only be one, either a plane or a cursor, in each subtest so there
is no need for two framebuffer varilables and also some codepaths can be
unified.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
It is just there to light up the display using the full modeset. Also renamed it
from fb_full to fb_modeset to be more descriptive.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
We frequently check for device capabilities, for which we can safely
assume that there is but one on a system and so cache the first query
value and return it for all future queries. The benefit is to reduce
dmesg debug spam which helps when either bringing up a test or trying to
track down why a test fails.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Three Tools for the Elven-kings under the sky,
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Tool to rule them all, One Tool to find them,
One Tool to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
J.R.R. Tolkien's epigraph to The Lord of The Tools
| sed 's/Ring/Tool/g'
Introduce intel_reg as the one Intel graphics register multitool to
replace intel_reg_read, intel_reg_write, intel_iosf_sb_read,
intel_iosf_sb_write, intel_vga_read, intel_vga_write, intel_reg_dumper,
intel_reg_snapshot, and quick_dump.py.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Adding 90/270 rotation testcase for primary and sprite planes.
v2: Added position test for sprite. Checking for gen > 9 for 90/270.
Some cleanup and rebase.
v3: Added test for unsupported tiling and unsupported pixel format for 90/270
v4: Added the legacy commit to initiate modeset in the negative test(Tvrtko)
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Return the return value of the set_property ioctl and add check for
the failure.
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
test kms_legacy_colorkey depends on cairo, so add it to
the list of test not to build unless "ANDROID_HAS_CAIRO"
is set.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Attempting to build IGT on linux without libunwind fails
due to tools/quick_dump not linking the rt library,
causing an undefined symbol error for clock_gettime.
Adding -lrt to the list of libraries in Makefile.am fixes
this.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
In android mmap64 was redirected to mmap2 because mmap64
was not alway available. But now mmap2 has been removed
from 64 bit android builds (and mmap64 is available), so
update preprocessor conditional to check for __x86_64__.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Avoid having to escape certain characters in documentation comments by
not allowing docbook markup tags. Markdown formatting in documentation
comments is still supported.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
No functional changes. This reorg will allow to do some
operations like dpms off/on with different places to wait
for psr to get active.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This is an extention of igt_debug_wait_for_keypress that also can have
customized message and return key pressed.
v2: This is actualy a v2. V1 was an extension of original
igt_debug_wait_for_keypress but it was nacked.
v3: Make [Y/n] check inside aux function as suggested by Daniel.
Also renaming and adding first use case along with the axu function.
v4: Simplify function name and make it assert pressed key
is different from n/N as suggested by Daniel.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Sink CRC is the most reliable way to test PSR. However in some platforms
apparently auto generated packages force panel to keep calculating CRC invalidating
our current sink crc check over debugfs.
So, this manual test help us to find possible gaps on this platforms where we cannot
trust on sink crc checks.
v2: Accept Daniel's suggestions:
* Avoid strcpy
* don't override assert definition
* Make --interactive-debug for every testcases instead using local --manual
v3: Sink CRC can be unreliable for other platforms as well so let's skip and warn
when we detect the misbehaviour instead hardcoded per platform.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>