summaryrefslogtreecommitdiff
path: root/tests/gem_reg_read.c
AgeCommit message (Collapse)Author
2015-11-03tests: Run igt.cocciDaniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-16tests/gem_reg_read: Extend and check for valid 36b counterMichał Winiarski
When reading the timestamp register with single 64b read, we are observing invalid values on x86_64: [f = valid counter value | X = garbage] i386: 0x0000000fffffffff x86_64: 0xffffffffXXXXXXXX Test checks if the counter is moving and increasing. Add a check to see if we can use (reg | 1) flag to get a proper 36b timestamp, shifting the value on x86_64 if we can't. v2: More iterations of monotonic test, comments, minor fixups (Chris) v3: Skip tests if reg_read is not supported Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-06-13tests: run igt.cocciDaniel Vetter
Re-run with correct igt_fail rules. Again manually fixup missing includes for igt_core.h. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-15tests/gem_reg_read: Fix errno checkDaniel Vetter
So I accidentally fixed a check when converting to the new macros and the kernel never returned -ENOENT for invalid regs. Adjust the test. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14tests: Use igt macros moreDaniel Vetter
Often just folding together of the common if (cond) printf; abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out more since the igt macros will already print the condition and errno. A few tests where more work (like ripping out return codes en masse) is needed left as-is. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 2Daniel Vetter
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10tests: roll out igt_simple_init/igt_simple_mainDaniel Vetter
Also use igt_skip a bit more to simplify some of the tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13tests: introduce igt_requireDaniel Vetter
Since igt_skip has funny control flow we can abuse it and make it work like a special kind of assert which automatically skips tests if a requirement fails. Note that in places where we have a less strict test which should always succeed (e.g. ioctl works or isn't available) the igt_assert should be place before the igt_require with the more strict requirements. Otherwise we'll skip a test instead of properly failing it. Convert a few users of igt_skip over to igt_require to showcase its use. v2: s/gem_check_/gem_require_/ so that we consistently use "require" to indicate magic check that can call igt_skip. Imo hiding the igt_require for feature checks is ok, but for more traditional assert like use cases an explicit igt_require might be better. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13tests: use igt_fail instead of exit(param != 0)Daniel Vetter
Mostly a sed job with too manual fixups: - one case of using _exit instead of exit - and one case which under some conditions use 77, so convert that check to an igt_skip. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13tests: s/exit(EXIT_SUCCESS)/igt_success()/Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13tests: s/exit(EXIT_FAILURE)/igt_fail(1)/Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-30gem_reg_read: Only check errno after a definite errorChris Wilson
As upon success, errno is invalid and may give spurious false results. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65157 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-10fix warn in gem_reg_read: 'read' shadows a global declarationImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-05tests/gem_reg_read: actually wait a bit between reading TIMESTAMP regDaniel Vetter
QA could only hit this on ilk because the timer increase quite a bit slower on that platform than on gen6+ (80ns vs 320ns, iirc). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52937
2012-07-23tests: s/drm_reg_read/gem_reg_readDaniel Vetter
gem_ is the prefix for low-level kernel tests, drm_ tests libdrm_intel specific stuff.