1483 Commits

Author SHA1 Message Date
Daniel Vetter
673e6b220a lib/drmtest: extract gem_set_domain and gem_sync
gem_sync just does a gtt sync by using set_domain(GTT, GTT).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 16:05:34 +01:00
Daniel Vetter
a7a80c2c2f tests: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:50:20 +01:00
Daniel Vetter
bd5cf9a07d lib/drmtest: extract gem_read
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:37:53 +01:00
Daniel Vetter
319638ba6d lib/drmtest: extract gem_write
Astonishing how many different function signatures are possible for
something that simple.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:31:11 +01:00
Daniel Vetter
5dd17d3f4b lib/drmtest: extract gem_close
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:07:19 +01:00
Daniel Vetter
aa67b22e42 lib/drmtest: extract gem_set_tiling
Way too much copy-pasting going on here.

Also fix a compiler warnings in gem_stress while fixup things up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 14:59:58 +01:00
Jesse Barnes
555cfd4597 testdisplay: update to new colorkey ioctl 2012-01-09 14:34:19 -08:00
Alan Coopersmith
504c4fa94f Fix pthread compiler flags to work on Solaris and with Studio compiler
AC_USE_SYSTEM_EXTENSIONS is used to let autoconf take care of setting
the right system defintions for POSIX threads & similar extensions to
the base POSIX API.   Since it will also #define _GNU_SOURCE 1, remove
the extra setting to avoid compiler warnings about redefined macros.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
00751594db Use sched_yield instead of pthread_yield
Despite the name implying it's a standard part of the POSIX threads API,
pthread_yield is actually non-standard and less portable than sched_yield.
For instance, Solaris only has sched_yield, and not pthread_yield.
Since even the Linux man page suggests using sched_yield, just call that.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Gaetan Nadon
665b86664a config: use project wide xorg warnings variable
Use CWARNFLAGS as in all of xorg. There seems to be no reason why this
module should be different. The warnings were updated recently
for those who install the latest util-macros.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
6540ed2112 Use standard .gitignore file and layout
Reusing xorg code saves maintenance in the long term.

Now that m4/.gitignore is removed, the -I m4 ${ACLOCAL_FLAGS}
must be removed to avoid build breakage as m4 is generated and not
part of the git source.

Acked-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:10 +01:00
Daniel Vetter
74d6545ffa testdisplay: shut up compiler
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-18 00:24:45 +01:00
Daniel Vetter
2de19c477a testdisplay: move drm_fourcc.h include under the #ifdef protection
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-18 00:21:39 +01:00
Yi Sun
1f41a30070 tests/testdisplay.c: make the 3th pipe finish all the mode setting.
If test all modes rather than preferred mode, remove framebuffer and
set CRTC to zero after each connector mode setting.

Signed-off-by: Sun Yi <yi.sun@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-12-17 00:03:55 +01:00
Chris Wilson
7ecdb152ca tests/gem_double_irq_loop: silence the compiler
gem_double_irq_loop.c: In function ‘dummy_reloc_loop’:
gem_double_irq_loop.c:62:9: warning: unused variable ‘j’ [-Wunused-variable]
2011-12-14 17:43:37 +00:00
Chris Wilson
f381a8b9f0 tests/gem_exec_blt: silence the compiler by failing on error
gem_exec_blt.c: In function ‘gem_exec’:
gem_exec_blt.c:174:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Propagate the failure and exit(1).
2011-12-14 17:43:04 +00:00
Chris Wilson
2a292188e7 tests/gem_exec_nop: silence the compiler by failing on error
gem_exec_nop.c: In function ‘exec’:
gem_exec_nop.c:101:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Propagate the failure and exit(1).
2011-12-14 17:41:34 +00:00
Chris Wilson
ceb9f7d934 tests/gem_stress: silence the compiler by using '%zu' for size_t
gem_stress.c: In function ‘main’:
gem_stress.c:980:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat]
2011-12-14 17:39:42 +00:00
Chris Wilson
d4bb328b78 tests/gem_largeobject: silence the compiler
gem_largeobject.c: In function ‘test_large_object’:
gem_largeobject.c:95:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2011-12-14 17:37:53 +00:00
Jesse Barnes
b4fb480c80 testdisplay: don't test planes if i915 color key ioctl is not available 2011-12-14 08:15:04 -08:00
Jesse Barnes
5a9d82c6d5 testdisplay: update for final plane & fb ABI
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-12-07 08:23:36 -08:00
Daniel Vetter
ff409c537f tests/gem_partial_pwrite_pread: don't trash gtt unnecessarily
On chips that don't have a unmappable gtt part it's utterly pointless.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-06 16:57:53 +01:00
Daniel Vetter
5a851b1392 tests: add gem_partial_pwrite_pread
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 21:45:12 +01:00
Daniel Vetter
09cba27fdc tests/gem_reloc_vs_gpu: fixup this mess
- fixup pitch mess noticed by Chris Wilson.
- we need to diable bo reuse otherwise the kernel won't do the relocs
  (we might get an already gtt-bound batch from the dummy load).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 14:19:30 +01:00
Daniel Vetter
b9629f2d8d tests/gem_reloc_vs_gpu: emit special batch on blt ring on gen6+
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 13:57:51 +01:00
Daniel Vetter
28e3f9c606 tests/gem_reloc_vs_gpu: switch to COLOR_BLT instead of PIPE_CONTROL
Less fancy command that works everywhere. Suggested by Chris Wilons.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 13:46:43 +01:00
Daniel Vetter
1c9cce9c45 tests/gem_tiled_pread_pwrite: kill set-but-unsed warning
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 13:46:43 +01:00
Daniel Vetter
ad6be1f0c9 tests: add gem_reloc_vs_gpu
Tests whether the kernel properly waits for the gpu before
applying a reloc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-04 12:08:59 +01:00
Daniel Vetter
224d4d22f0 Revert some accidental things
... somehow slipped in.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-02 20:40:03 +01:00
Daniel Vetter
f5854c8902 tests: add gem_exec_faulting_reloc
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-02 20:36:06 +01:00
Daniel Vetter
ab3f4bdafe tests: add gem_exec_bad_domains
To check whether the kernel properly rejects non-gpu domains in
relocs.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-02 18:41:34 +01:00
Daniel Vetter
783f16e328 tests: add gem_tiled_pread_pwrite
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-02 10:55:56 +01:00
Daniel Vetter
2e88c4ce34 tests/gem_gtt_speed: Add modes that force that to the gtt domain
No sane userspace doesn't upload data to the gpu without actually
using it there ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-01 21:42:23 +01:00
Daniel Vetter
7af82bb0e5 tests: implement snb+ XY_SETUP_CLIP_BLT workaround
Better safe than sorry.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 02:39:14 +01:00
Daniel Vetter
66b88b615c tests/sysfs_edit_reader: posixify
Debian's default sh complains ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 01:55:42 +01:00
Daniel Vetter
8c7f8bcccb tests: properly terminate tests when values mismatch
Not much use running them in the test rig otherwise.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 01:37:59 +01:00
Eugeni Dodonov
2f56e96177 tests/gem_hang: fix copy-paste problem
I suspect that we should do different things for different pipes..

Spotted by Thomas Jarosh on #intel-gfx freenode.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-11-11 11:17:59 -02:00
Eugeni Dodonov
faf413d875 tests: add a test for checking edid reading delays
With base on EDID timing testing, when we take more than 1s to run
xrandr command, something is wrong.. So add this test for testing the time
we take to read the status of all the connectors from sysfs. It should do
us an average picture of how long we'd take to run xrandr (roughtly 2x
that value).

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-11-10 11:33:37 -02:00
Eugeni Dodonov
48186febf1 tests: add test for kernel segmentation fault
As asked by Daniel Vetter, this is a tech which checks if we can cause
division by zero in kernel by reading the i915_emon_status debugfs
entry repeatably.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-11-10 11:33:05 -02:00
Daniel Vetter
f4ba3f529e tests: disable pipe_control on i965g
That hw is broken.

Reported-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-08 12:36:24 +01:00
Chris Wilson
4c7c94ad98 testdisplay: Round tiled allocations up to pot stride and fence size
Be simple and use the strictest requirements from gen2/3 with old
kernels so that this simply works everywhere.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42585
2011-11-04 13:25:45 +00:00
Jesse Barnes
9c29be40bc testdisplay: find planes for each pipe
Fixes a bug where we were masking against the wrong value.
2011-11-03 17:38:55 -07:00
Jesse Barnes
3afb7b22d6 testdisplay: update to new addfb2 definition 2011-11-03 17:38:55 -07:00
Daniel Vetter
593cb1874a always require libdrm
... and also add the missing files to lib/Makefile.am

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-01 17:04:44 +01:00
Daniel Vetter
37c6400734 tests/gem_tiled_pread: fixup detiler for gen2
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-01 12:10:35 +01:00
Daniel Vetter
6b4f5c7ad8 tests/gem_largeobject: accomodate for puny apertures
... like on my i855gm.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-01 11:52:53 +01:00
Daniel Vetter
3291023151 tests: mark gem_bad_address as HANG
Kills my little i855gm.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-31 23:19:08 +01:00
Daniel Vetter
efd3a5d0b5 tests/debugfs_reader: fight bashism
debian's dash doesn't like this.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-31 17:40:37 +01:00
Daniel Vetter
cc85c4efb7 tests: actually add the drm client check script
Ooops.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-31 16:08:02 +01:00
Daniel Vetter
d4cc95b457 tests: check for other drm clients
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-31 16:07:02 +01:00