Commit Graph

61 Commits (51553dd0e063cb2d27ad1c68746c247cb6dbd518)

Author SHA1 Message Date
Lucas De Marchi 1e3fcc495b autotools: make symbols hidden by default
Now that symbols that should be exported are annotated accordingly, make
all the rest hidden by default.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19 22:46:45 -07:00
Emil Velikov c64dc00fd9 tests/drmdevices: install alongside other utilities
It's mildly useful program, to ship it when the user wants the "tests"
installed. Obviously the "tests" in the name is a misnomer.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2018-07-24 16:27:37 +01:00
Emil Velikov 5c1c91b3d3 tests: automake: reorder makefile contents
Purely cosmetic changes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-12-05 17:24:32 +00:00
Emil Velikov 0c80fddd1d tests: remove useless legacy tests
All of these 'tests' cover UMS functionality which is neither being
worked on or actively maintained.

The only cases where developers touch UMS code is to unwrap it from the
KMS codepaths and ensure that those are secure.

Anyone who feels strong about having these around can revive them, but
in all honestly do consider _seriously_ what you're doing ;-)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-12-05 17:23:45 +00:00
The etnaviv authors 0659558f64 libdrm: add etnaviv tests
This adds the following basic unit tests:

- etnaviv_2d_test
  Let the 2D core render a defined pattern into a bo
  and store it as bmp.

- etnaviv_bo_cache_test
  Basic tests to validate the bo-cache behavior.

- etnaviv_cmd_stream_test
  Tests for the etna_cmd_stream API.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-09-17 15:05:33 +02:00
Thierry Reding c13c504ed2 tests: Add libkms-test library
This library contains abstractions for KMS that help remove the need for
a lot of boilerplate in KMS test programs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18 17:44:05 +00:00
Thierry Reding 1ec3c44bdd tests: Split helpers into library
Some of the helpers, such as the pattern drawing helpers or the format
lookup helpers, have potential to be reused. Move them into a separate
library to make it easier to share them.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18 17:43:40 +00:00
Emil Velikov f098d1c130 tests/drmdevice: add new 'test'
A simple example of how to use/what is the new drm{Get,Free}Devices()
interface.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-21 17:42:37 +01:00
Michel Dänzer a814152187 tests: Add -lm to LDADD for dristat
Fixes build failure due to unresolved log2.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-09 16:03:03 +01:00
Alex Deucher 3c5fe78801 drm: add tests/amdgpu (v3)
This adds some basic unit tests for the new amdgpu driver.

v2: use common util_math.h
v3: implement suggestions from Emil
    replace malloc/memset with calloc
    make header guards all caps
    use posix_memalign rather than mem_align
    replace malloc with calloc for pm4 allocations
    make CU_SuiteInfo static
    fix Makefile.am
    fix fd numbering
    use drmGetVersion/drmFreeVersion rather than open coding it
    close fd, clean up CU registry on error

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:48 -04:00
Joonyoung Shim 293f8fac0a Build vbltest irrespective of the presence of libudev.
The vbltest doesn't have any dependency of LIBUDEV.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-20 22:13:55 +01:00
Emil Velikov 1ed5faab24 tests/random: return non-zero on test failure
... and wire it up to make check

v2: s/rand - state->check/rand != state->check/. (Jan)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05 15:33:33 +01:00
Emil Velikov f1f4cabd8e tests/random: extract test out of xf86drmRandom.c
With follow up commits we can clear it up and wire to
make check

v2:
 - Use xf86drmRandom.h for common struct.(Jan)
 - Add test to .gitignore.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05 15:33:33 +01:00
Emil Velikov 7e4f0664ac tests/hash: return non-zero on failure
... and wire up to `make check' now that it's useful.

v2: Really return non-zero on failure.
v3: Initialise ret.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> (v2)
2015-04-05 15:33:06 +01:00
Emil Velikov 79f9cf3eb7 tests/hash: extract test out of xf86drmHash.c
This way with follow up commits we can fix it and wire it up to
make check

v2:
 - Use xf86drmHash.h for common structs.(Jan)
 - Add test to .gitignore.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05 15:19:42 +01:00
Jan Vesely 7d8c946408 tests/drmsl: Extract tests out of xf86drmSL.c
v2: merge tests creation and xf86drmSL cleanup
    rename tests/drmsltest -> tests/drmsl
    move the test out of libudev test block
v3: run test even on noudev builds

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-04 13:48:54 -04:00
Emil Velikov 763ff19a2f modetest: include into the build when libkms is not selected.
With commit d7c0a08bc57(modetest: Allocate dumb buffers with the correct
bpp) we moved away from the libkms dependency. As such we are safe with
including the Makefile/subdir, even as we opt out of building the
library.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-03-16 22:18:04 +00:00
Maarten Lankhorst 5ea6f1c326 nouveau: make nouveau importing global buffers completely thread-safe, with tests
While I've closed off most races in a previous patch, a small race still existed
where importing then unreffing cound cause an invalid bo. Add a test for this case.

Racing sequence fixed:

- thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock.
- thread 2 increases refcount to 1.
- thread 2 decreases refcount to zero, blocks on acquiring nvdev->lock.

At this point the 2 threads will clean up the same bo.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Reviewed-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-13 20:26:33 +01:00
Emil Velikov b374a59e0e tests: automake: keep the libs link at the final stage
Currently the static archive libdrmtest.la links against libdrm.la.
Only to have both added to the executables' LDADD. Simplify things a
bit, by doing the link in the final module (the executables/tests in
this case).

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 18:11:35 +00:00
Emil Velikov f5b7a1d2da tests: move the SUBDIR at the top of the makefile
None of the subdirs require the modules built in the local makefile, so
moving them at the top makes things a hell lot easier to read.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 18:11:35 +00:00
Emil Velikov 58e5010a09 automake: drop the NULL variable from the makefile
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 18:11:35 +00:00
Emil Velikov 4c6b1b1a82 autotools: add WARN_CFLAGS to all targets
... minus test/ttmtest. The latter is not really hooked up with the
actual build.

This will give us 66 warnings on a distribution build of which
 - 12 -Wunused-variable
 - 11 -Wunused-function
 - 19 -Wmissing-prototypes
and a few -Wswitch-enum, -Wtype-limits etc.

Adding the CFLAGS gives some exposure to these so that we can fix them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:24 +00:00
Daniel Vetter 3a6c65c546 tests: remove intel-specific tests
These all moved to igt meanwhile.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11 15:37:26 +01:00
Thierry Reding 93035cfbeb tegra: Add simple test for drm_tegra_open()
This test opens a device, dumps the version information and checks that
a Tegra DRM context can be opened on it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27 17:20:27 +01:00
Paulo Zanoni 8f66c98818 tests: add proptest
A small program that allows us to see and modify properties.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 19:51:59 -05:00
Inki Dae bbf6e3dea3 libdrm/exynos: add test application for 2d gpu.
This patch adds library and test application for g2d gpu(fimg2d).

The fimg2d hardware is a 2D graphics accelerator(G2D) that
supports Bit Block Transfer(BitBLT).

The library includes the following primitive drawing operations:
.solid fill - This operation fills the given buffer with
	the given color data.
.copy - This operation copies contents in source buffer to
	destination buffer.
.copy_with_scale - This operation copies contents in source buffer
	to destination buffer scaling up or down properly.
.blend - This operation blends contents in source buffer with
	the ones in destination buffer.

And the above operations uses gem handle or user space address
allocated by malloc() as source or destination buffer.

And the test application includes just simple primitive drawing
tests with the above library.
And the guide to test is as the following,
	"#exynos_fimg2d_test -s connector_id@crtc_id:mode"

With this above simple command, four primitive drawing operations
would be called step by step and also rendered on the output device
to the given connector and crtc id.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
2013-03-08 11:49:42 -05:00
Jerome Glisse ca4971292c tests/radeon: radeon specific test
Initial test only include ttm test for stressing ttm memory
allocations.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-11-10 17:14:42 -05:00
Kristian Høgsberg edd41db37d Build modetest for all chipsets, always build modeprint 2011-03-03 21:35:28 -05:00
Matt Turner 3293eb95ca don't try to build modetest without libkms
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-03-03 21:27:24 -05:00
Jonathan Callen 52a3e9df62 Only build tests in make check
Currently, all the tests for libdrm are built during 'make all', even
if you do not wish to run tests.  Attached is a patch, based on
version 2.4.15, to make the tests build in 'make check'.
2010-05-12 13:55:54 -04:00
Jesse Barnes c42d1a10e3 tests: add new vblank test
Simple test for event frequency.
2010-04-27 15:43:44 -04:00
Jakob Bornecrantz d207a38701 tests: Add a very small libkms test 2010-01-08 15:34:44 +00:00
Kristian Høgsberg 22d4666904 Add drmGetDeviceNameFromFd function
Determines the /dev filename of the drm fd argument.
2009-11-23 20:51:34 -05:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00
Kristian Høgsberg a66cf9ce68 Use headers copied from kernel instead of shared-core 2009-11-17 10:54:11 -05:00
Chris Wilson ac34f599ea tests: Disable intel-specific tests with --disable-intel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 23:18:19 +01:00
Kristian Høgsberg ec9b7b320a test: Avoid recursive dependency in makefile 2009-04-09 15:17:51 -04:00
Kristian Høgsberg a85e07b903 test: Makefile.am grammar nazi 2009-04-09 15:02:40 -04:00
Dave Airlie 1faab66cfd drm: fix test makefile
no idea if this is correct but it works so meh
2009-04-07 09:26:32 +10:00
Kristian Høgsberg 8a5c4d567f XFAIL auth and lock test cases
They're writing to the read end of a pipe and failing.
2009-04-06 17:18:17 -04:00
Kristian Høgsberg e9d6116e5b Use libudev in test case to only run gem tests for intel devices. 2009-04-06 17:13:01 -04:00
Eric Anholt 06ab2f6436 libdrm: Fix modetest/modeprint to use automake stuff. 2008-12-17 10:41:21 -08:00
Jesse Barnes 731cd5526e libdrm: add mode setting files
Add mode setting files to libdrm, including xf86drmMode.* and the new
drm_mode.h header.  Also add a couple of tests to sanity check the
kernel interfaces and update code to support them.
2008-12-17 10:11:37 -08:00
Jesse Barnes 9583c099b4 Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db1055.

We really just want the libdrm and ioctl bits, not all the driver
stuff.
2008-12-10 15:50:22 -08:00
Dave Airlie 972f657265 Merge remote branch 'origin/master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/dri_bufmgr.h
	linux-core/drm_irq.c
	linux-core/drm_sysfs.c
	linux-core/drm_ttm.c
	shared-core/i915_dma.c
	shared-core/i915_irq.c
	shared-core/nouveau_drv.h
	shared-core/radeon_cp.c
2008-09-30 14:13:49 +10:00
Eric Anholt 09cf0f0213 drm: Add tests for GEM_FLINK ioctl. 2008-09-10 14:07:18 -07:00
Dave Airlie 0443d2a32a tests: add some basic radeon gem tests 2008-07-26 08:56:43 +10:00
Eric Anholt c530011aaa Update mm tests for GEM rename. 2008-05-01 16:38:25 -07:00
Eric Anholt 3148c16364 Move mmfs tests over to be drm tests. 2008-04-29 13:45:43 -07:00
Eric Anholt 22877864c2 Add mmap ioctl to mmfs. 2008-04-23 16:22:09 -07:00