Commit Graph

367 Commits (4031dc17bb728850c9b079c8d5f9cc0a379b9d46)

Author SHA1 Message Date
Emil Velikov 128344c2cf modetest: replace malloc + memset with calloc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-28 15:40:16 +01:00
Emil Velikov c78917ee4f modetest: explicitly zero the newly allocated memory
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-28 15:40:13 +01:00
Rob Clark b4defea65f modetest: fix allocation for yuv420/yvu420
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-05-05 11:16:23 -04:00
Joonyoung Shim b091ecdbf9 modetest: fix the arguments of the MAKE_RGB_INFO define
The current order (rbg) seems wrong.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-29 17:28:32 +00:00
Joonyoung Shim 9915e68b3b modetest: destroy the cursor bo
Currently we are missing the bo_destroy() when modetest terminates.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 13:06:37 +01:00
Joonyoung Shim 4d760d7f46 modetest: clear buffer and framebuffer for planes
Currently we don't destroy buffer and remove framebuffer for
planes when closing modetest.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message. fb_id = 0 is unused]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 13:06:28 +01:00
Joonyoung Shim 21170a8c63 modetest: fix the error path handling
Remove the framebuffer and destroy the bo when error occurs on set_mode
and test_page_flip.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 13:04:49 +01:00
Joonyoung Shim bcaaa75cf4 modetest: make use of drmModeRmFB
We should remove the framebuffer before destroying the buffer.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message. fb_id = 0 is unused]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 13:04:15 +01:00
Joonyoung Shim 4e4d79d4ca modetest: fix Segmentation fault
If use -P option without -s option, the program segfaults due to
dev.mode.bo being NULL.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:27:18 +01:00
Tobias Jakobi b1d19de764 modetest: initialize handles/pitches in set_plane()
Only the 'offsets' array was initialized to zero.
Since bo_create only sets the handles which are
necessary, were we passing garbage data to the
kernel when calling drmModeAddFB2 later.

The issue only seems to appear when passing e.g.
NV12 data to the kernel, a case where not only
handles[0] is used. I therefore also removed the
corresponding comment.

v2: Do the same for set_mode(), set_cursors()
    and test_page_flip().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:23:14 +01:00
Greg Hackmann 0c8db0a563 Add missing <strings.h> includes
A couple of files use ffs() without explicitly including strings.h.
Some systems will pull in ffs()'s declaration through another header
anyway, but not when compiling against bionic in AOSP master.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:22:31 +01:00
Emil Velikov 41eb131dfe drm: use c99 __func__ over __FUNCTION__
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:21:02 +01:00
Emil Velikov 42465feb97 drm: rename libdrm{,_macros}.h
Provide a more meaningful name, considering what it does.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Rob Clark 0d78b37b1c modeprint: add missing encoder/connector type names
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-15 09:35:00 -04:00
Chris Wilson 5ed5fa1060 mode: Retrieve only the current information for a Connector
Add a new API that allows the caller to skip any forced probing, which
may require slow i2c to a remote display, and only report the currently
active mode and encoder for a Connector. This is often the information
of interest and is much, much faster than re-retrieving the link status
and EDIDs, e.g. if the caller only wishes to count the number of active
outputs.

v2: Fix error path to avoid double free after a failed GETCONNECTOR
ioctl.

v3: Daniel strongly disapproved of my disjoint in behaviour between
GetConnector and GetConnectorCurrent, and considering how best to make a
drop in replacement for drmmode_output_init() convinced me keeping the
API as consistent as possible was the right approach.

v4: Avoid probing on the second calls to GETCONNECTOR for unconnected
outputs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: David Herrmann <dh.herrmann@googlemail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-14 15:58:26 +01:00
Chih-Wei Huang 6f90b77ea9 android: remove unnecessary TARGET_OUT_HEADERS variable
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-09 16:26:59 +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 4fcb6637f0 tests/hash: style fixes
v2: Rebase on earlier changes. Keep count initialisation as is.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05 15:19:50 +01:00
Emil Velikov c53da3ac57 tests/hash: misc compilation fixes
Get the test from completely broken to working like a charm.

 - Use the same variable type for both HashInsert and HashLookup.
 - Use correct storage type for the HashLookup return value.
 - Remove useless backward iteration of HashLookup(i).

v2:
 - Use void * instead of unsigned long.
 - Change value to key << 16 | key.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05 15:19:47 +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
Jan Vesely 8dff7a0478 tests/exynos: Fix missing static keyword
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-03-20 18:17:34 -04:00
Jan Vesely 6fc0e4ba1e Fix unused function warnings
v2: Remove the handler function instead of commenting out
    split debugmsg function removal to a separate patch

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 13:36:53 -04:00
Daniel Kurtz 9588e66dbd tests: add rockchip to modetest, kmstest, vbltest and proptest
There is a rockchip drm kms driver.
Add "rockchip" to the static lists of driver names in the the standard
set of tests.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
[Emil Velikov: Resolve trivial conflicts.]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:18:01 +00:00
Daniel Kurtz 292b5100e5 proptest: install it with --enable-install-test-programs
--enable-install-test-programs allows tests to be installed in $bindir.
This is disabled by default, but very useful when cross compiling.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:18:01 +00:00
Chih-Wei Huang a3b3c1afb7 android: simplify the including rule of subdirs
Use android build system functions to include Android.mk
of subdirs.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
[Emil Velikov: Resolve trivial conflicts.]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:07:21 +00:00
Tobias Jakobi 9a0949a8f4 exynos: add exynos prefix to fimg2d header
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-16 22:21:40 +00:00
Tobias Jakobi 736d6a1f0f exynos: use structure initialization instead of memset
Keeps the code cleaner, since the structs have to be initialized
once anyway.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
[evelikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

Conflicts:
	tests/exynos/exynos_fimg2d_test.c
2015-03-16 22:21:03 +00:00
Tobias Jakobi 6f950de953 tests/exynos: fimg2d: add a checkerboard test
This makes it easier to spot memory corruptions which don't become
visible when using a plain buffer filled with a solid color (so
corruptions that are just a permutation of the bytes in the buffer).

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-16 22:18:05 +00: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
Jan Vesely d729d75f84 Add static qualifier to local functions
v2: Don't bother marking dead functions static
    (handler, xf86VDrvMsgVerb, drmSetDebugMsgFunction)

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-15 14:17:02 -04:00
Jan Vesely 0706c14e7c Fix unused, and unused-but-set variables warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14 17:02:06 -04:00
Jan Vesely 13e34308b7 dristat: Handle DRM_CONSISTENT
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14 17:02:06 -04:00
Jan Vesely 65041c4a19 Fix type-limits, pointer-arith and sign-compare warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14 17:02:06 -04:00
Jan Vesely f11b8c955c tests: String literals are const char *
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14 17:02:05 -04: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
Tobias Jakobi 734d13b13b tests/exynos: improve error handling
Check for a useable connector and also if the resolution is sane
(width and height are both non-zero).

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:52 +00:00
Tobias Jakobi 6e2a9f936e tests/exynos: introduce wait_for_user_input
Currently getchar() is used to pause execution after each test.
The user isn't informed if one is supposed to do anything for
the tests to continue, so print a simple message to make this
more clear.

v3: Compactify printf calls as pointed out by
    Emil Velikov <emil.l.velikov@gmail.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:33 +00:00
Tobias Jakobi a7c865dc0a tests/exynos: disable the G2D userptr/blend test
v2: Move the commit description into the patch itself.
v3: Use common commenting style as pointed out by
    Emil Velikov <emil.l.velikov@gmail.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:21 +00:00
Tobias Jakobi c8168fe5b8 tests/exynos: fix typos and change wording
No functional changes.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:18 +00: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 f799a527db tests/radeon: set the list* functions as inline
To silence the chatty compiler.
As a future work we may want to merge these with libdrm_lists.h

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:36 +00:00
Emil Velikov 0b3e540aa4 exynos_fimg2d_test: remove unused variables
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:32 +00:00
Emil Velikov bb6cc7c972 tests: remove unused variables
As kindly pointed out by GCC.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:28 +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
Emil Velikov 794810d62d tests: fix implicit funciton declaration errors
ioctl() and strcmp() were used without the relevent header being
included.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:15 +00:00
Emil Velikov 2b209fc409 exynos_fimg2d_test: fix implicit funciton declaration errors
As one adds WARN_CFLAGS to the build the compiler throws a couple of
lovely error messages. Add the relevant includes to fix them.

  error: implicit declaration of function ‘time’
  error: implicit declaration of function ‘getopt’

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:08 +00:00
Philipp Zabel 77703f61cb tests: add support for imx-drm
Since imx-drm has graduated from staging it seems to be a good idea to
recognize it by default in the libdrm tests.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-25 17:51:22 +01: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
Jan Vesely de8532dd83 Fix gcc -Wextra warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-10 15:25:28 -05:00
Frank Binns ad8bbfd3c7 Rename DRM_NODE_RENDER to DRM_NODE_PRIMARY
Now that there are render nodes it doesn't seem appropriate for the type of
the card nodes to be DRM_NODE_RENDER. For this reason, rename this type to
DRM_NODE_PRIMARY as this name better represents the purpose of these nodes.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2015-01-23 23:02:06 +00:00
Laurent Pinchart d7c0a08bc5 modetest: Allocate dumb buffers with the correct bpp
The modetest application uses libkms to allocate dumb buffers, leading
to overallocation due to the hardcoded 32 bpp value. This can even cause
failures in drivers when the resulting pitch is too large for the
hardware to handle and gets rejected by the driver when creating the
frame buffer.

Fix this by computing the required bpp value and allocating dumb buffers
directly without going through libkms.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-01-11 14:37:53 +02: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
Thierry Reding d6a4c2cbd1 libdrm: Add NVIDIA Tegra support
Add the libdrm_tegra helper library to encapsulate Tegra-specific
interfaces to the DRM.

Furthermore, Tegra is added to the list of supported chips in the
modetest and vbltest programs.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27 17:05:35 +01:00
Rob Clark fb4177046d update signed/object prop types
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 19:56:50 -05:00
Ville Syrjälä c2c0346e1f modetest: Print newline for empty blobs
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 19:54:35 -05:00
Rob Clark b958d76f77 modetest: alpha buffers
Make upper-left corner for RGB32 buffers translucent, for testing
blending of AR24 vs XR24.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 19:53:41 -05: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
Rob Clark 1fec623b02 modetest: universal plane support
Minimal support, so we can at least dump properties of primary/cursor
planes.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 13:43:10 -05:00
Jasper St. Pierre 29bb4c6911 modetest: Use threads for cursors instead of SIGALRM
This fixes an issue when trying to use -v and -C together. When trying
to read the page flip event, we are interrupted by the SIGALRM that
comes in, and so we think we timed out when we simply got EINTR. While
we could just loop checking for EINTR, SIGALRM is just bad idea to
begin with, so just rewrite it to use a thread.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-22 11:45:02 -05:00
Rob Clark 0599f2fd6a more compile fix
Signed-off-by: Rob Clark <robdclark@gmail.com>
2014-09-28 14:52:51 -04:00
Emil Velikov 268dce4192 automake: pick up all files for distribution.
Autotools is already smart enough to pick the *.pc.in files but it
needs some help with the Android.mk ones.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Benjamin Gaignard 33bad73b27 modetest: Add support of STI driver
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov 6f95526a81 modetest: add Android build
v2: include modetest rather than modeset.
Spotted by Mauro Rossi and Paulo Sergio.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
2014-09-28 17:09:34 +01:00
Emil Velikov fea3831133 modetest: move sources lists to makefiles.sources
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov 8e93afc976 all: include config.h only when available and use its defines
... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Maarten Lankhorst a328b02c1d exynos: do not build fimg2d_test when building without libkms support.
This prevents a build failure.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-07-25 11:38:55 +02:00
Thomas Klausner c0b34dca26 radeon: Add missing header includes.
unistd.h for close() and xf86drm.h for drmOpen().

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2014-07-16 12:16:08 +09:00
Daniel Kurtz d1000c432c exynos_fimg2d_test: fix drmModeRmFB
The first parameter should be the drm fd, second param is the fb id.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
2014-05-12 23:09:20 -04:00
Daniel Kurtz 382043ee48 exynos: remove unusable "run" target
This looks like it was copied from kmstest, but isn't needed, and doesn't
actually work since exynos_fimg2d_test requires parameters.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
2014-05-12 23:09:19 -04:00
Daniel Kurtz 71bbf86f58 eyxnos: install exynos tests if HAVE_INSTALL_TESTS
This exynos test was added just before HAVE_INSTALL_TESTS, and so didn't
get this annotation.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
2014-05-12 23:09:11 -04:00
Rob Clark 0e512794bf modetest: add cursor support
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-04-22 11:14:12 -04:00
Thierry Reding d4083dc762 tests: Use drmFreeVersion() instead of drmFree()
drmFreeVersion() frees the memory allocated for the name, date and desc
fields in addition to that for the struct _drmVersion.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-17 16:21:47 +02:00
Thierry Reding 44b08c0ddf Mark functions printf-like where possible
These functions all take a format string and either a list of variable
arguments or a va_list. Use the new DRM_PRINTFLIKE macro to tell the
compiler about it so that the arguments can be checked against the
format string.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-17 16:21:40 +02:00
Lucas Stach ce62b8e059 modeprint: pretty print connector names
Use same names as the kernel, makes it easier to identify
connectors in the common case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2014-01-24 17:51:05 -05:00
Vincent ABRIOU de09702030 modetest: add the possibility to select the refresh frequency for a mode
When mode is selected we only give the name of the mode as parameter.
But sometime, two different modes have the same name but not
the same vrefresh frequency.
This patch give the possibility to select a mode by its name
and optionally by its refresh frequency.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-12 08:24:00 -05:00
Hyungwon Hwang 3732ef59eb tests/kmstest: support exynos
In this patch, to support exynos for KMS, Exynos KMS driver is newly added.
Also, Exynos is added to the list of kmstest supported modules.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-12 08:23:38 -05:00
Ilia Mirkin d8954154fe modetest: allow setting a scaling factor when showing plane
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-09-11 11:25:32 -04:00
Ilia Mirkin b50826dbd6 modetest: add a -D option to specify a device to be used
This is helpful for differentiating between multiple devices that use
the same module.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-09-11 11:25:17 -04:00
Emil Velikov 4a8da02e52 tests/modetest: silence compiler warning about uninitialised variables
The compiler is unaware of that we have at least one crts/connector/plane
thus it complains that some of our variables will be used uninitialised.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-08-30 11:37:05 -04:00
Emil Velikov 0100473de6 tests/*version: add missing string.h header
Prodives memset() and strlen(), used in tests/setversion
tests/getversion respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-08-30 11:36:20 -04:00
Rob Clark dba6bec3ab tests: add msm
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-08-30 11:36:20 -04:00
Laurent Pinchart 3c967e7155 modetest: Allocate NV buffers large enough for the two planes
Multiple the image height by 1.5 for NV12/NV21 and by 2 for NV16/NV61 to
make room for the chroma plane.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart 1ef179d09c modetest: Fix line stride in SMPTE YUV packet pattern generator
The line stride passed to the function is expressed in bytes, there's no
need to multiply it by 2.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart a4f2f1b9d1 modetest: Try all possible encoders for a connector
When building the pipeline, instead of using only the encoders attached
to a connector, take all possible encoders into account to locate a
CRTC.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart 2c5ee84d30 modetest: Support pipes with multiple connectors
The -s argument can now take a list of connectors. Configure all of them
in cloned mode using a single CRTC.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart b1e0bdeb70 modetest: Rename struct connector_arg to struct pipe_arg
This prepares the code for handling multiple connectors in a single
pipeline in a cloned configuration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart 3813e0f8e1 modetest: Split mode setting and plane setup
There's not reason to require setting a mode to test planes. Split the
two operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart eabf199dff modetest: Give the CRTC ID to the -P option
Planes are associated with CRTCs, not connectors. Don't try to be too
clever, use the CRTC ID in the -P option. This prepares for splitting
CRTC and planes setup.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart 56592680bb modetest: Store the mode in the crtc structure
This prepares the code for the split in separate functions of CRTC and
planes setup.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:45 +02:00
Laurent Pinchart a6349d0a0f modetest: Store the crtc in the connector_arg structure
This prepares the code for the split in separate functions of CRTC and
planes setup.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00
Laurent Pinchart b373de3095 modetest: Remove the struct connector_arg encoder field
The field is no needed, make it a local variable where used.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00
Laurent Pinchart 605efd7e05 modetest: Compute CRTC pipe number as needed
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00
Laurent Pinchart 549fe0ba62 modetest: Create a device structure
Instead of passing the device fd and resources as global variables group
them in a device structure and pass it explictly to all functions that
need it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00
Laurent Pinchart dab3c80203 modetest: Remove the -m argument
The argument isn't used, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00
Laurent Pinchart 581c7cf86a modetest: Print the plane ID when setting up a plane
As modetest automatically selects an unused plan, providing the plane ID
allows modifying plane properties for the selected planes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05 14:21:44 +02:00