Commit Graph

267 Commits (2b209fc409179a271751f57f6caad952e57eb3f6)

Author SHA1 Message Date
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