Age | Commit message (Collapse) | Author |
|
Some distros (such as Gentoo) are removing the include of
sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in
files where we use the minor() and major() functions.
Signed-off-by: James Ausmus <james.ausmus@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Printf family functions return a number of bytes, not tokens,
printed so the existing check (== 1) was wrong.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
"echo 1 > vtconN/bind" doesn't actually do anything. Looks like the only
way to rebind fbcon is to unbind the current console.
I suppose the failure to rebind might be a kernel bug, but I can't be
bothered to decode the vt.c spaghetti so let's just try to handle this
in igt. For simplicity let's assume the currently bound console is the
dummy console and unbind that when we want to rebind fbcon. That works
for me.
With rebinding not working we can't really tell wich console is going
to get bound anyway, so there's no way to make this code really robust,
assuming we ever had more than these two console drivers involved.
Additionally Daniel Vetter pointed out:
"We select the dummy con in i915, to be able to kick out vgacon before we register fbdev. So should always be there."
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
By using ftw, we avoid the issue of having to handle directory recursion
ourselves and can focus on the test of checking the reading a
sysfs/debugfs does not break runtime suspend. In the process, disregard
errors when opening the individual files as they may fail for other
reasons.
v2: Bracket the file open/close with the wait_for_suspended() tests.
Whilst the fd is open, it may be keeping the device awake, e.g.
i915_forcewake_user.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Jari Tahvanainen <jari.tahvanainen@intel.com>
|
|
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The hang detector relies on a uevent for notification and aborting the
test. As proposed, fine-grained resets may not produce a global uevent
and so this hang detection becomes void. As we don't expect any hang, we
can just reduce the reset to only a global + uevent and so maintain
functionality, and switch back to fine-grained resets afterwards.
Note that any test that requires testing fine-grained resets should
ensure that they are enabled first as igt may leave the global
parameters in an inconsistent state.
v2: Restore fine-grained resets for explict igt_allow_hang()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Export a couple of routines to read/write an exact length, rather than a
strring.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
i915 may not be the only, nor the first, vtcon framebuffer device - we
need to check them all!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
helpers.
lib/igt_aux: Added igt_pkill and igt_lsof helper.
lib/igt_kmod: Added load/unload kmod helpers.
v7:
- document the case where leaving stray fd from drm_open_driver()
might fail reloading the driver.
- list also current opened files from /dev/dri in case we could not
unload the driver.
- convert igt_info to igt_warn (Chris Wilson)
- added KMOD_|PROCPS CFLAGS (Chris Wilson)
v6:
- include latest modifications from tests/drv_module_reload:
display all loaded modules and list information about opened
files by processes (Petri Latvala)
v5:
- added igt_i915_driver_{load/unload}.
- added kick_snd_hda_intel() to match current
tests/drv_module_reload_basic and integrated into
igt_i915_driver_load/unload.
- added gtk-doc section for lib/igt_kmod
v4:
- decided to split libkmod helpers into their own file as there's
another user lib/igt_gvt or tests/gvt_basic.
- fixed some gtk-doc documentation.
v3:
- return -errno (igt_pkill()) in case of failure (Cris Wilson)
- return bool for igt_kmod_is_loaded(), replaced strncasecmp with strncmp
(Chris Wilson)
v2:
- Renamed libkmod helpers (Chris Wilson)
- Removed SIGTERM/SIGKILL case where we repeatedly tried to terminate the
process: just call kill(2) once (Chris Wilson)
- Removed redundant check in igt_kmod_unload(), igt_module_in_use() (Chris
Wilson)
- Pass flags to igt_kmod_unload() from the caller (Chris Wilson)
- Removed useless function igt_kill() which acts just as kill(2) (Chris
Wilson)
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
The kernel tries to hide L-shaped memory with asymmetric swizzling from
userspace by reporting lies through the get-tiling interface. Check for
these lies by comparing the reported swizzle with the actual swizzle,
and only run swizzling tests where we know the underlying physical
swizzling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A builtin modules does not have a sysfs/device/module symlink, so be
creative.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This change adds a RC6 test for the MOCS. The MOCS registers are loaded
and saved as part of the RC6 cycle but not all the registers are
saved/restored. This tests that those registers are correctly restored.
Signed-off-by: Peter Antoine <peter.antoine@intel.com>
|
|
Need to actually put it into the master .xml. Also rename the parameter
names in the source with the ones in the header files to avoid confusion.
gtkdoc requires that the names in the comment matches with the header.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
In order to avoid having to build and parse whole strings, use the
FILE stream interface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Useful for confirmation when testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For fun, debugfs/.../names currently explodes, so lets capture that and
make sure that basic access to debugfs does no harm.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
igt_sysfs_set() for setting an attribute via sysfs, igt_sysfs_get() for
reading.
v2: Lots of little bugs in igt_sysfs_get()
v3: Pass device to open, stop assuming Intel rules.
v4: Test opening and reading!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|