summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-04-28drm: use c99 __func__ over __FUNCTION__Emil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: rename libdrm{,_macros}.hEmil Velikov
Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-15modeprint: add missing encoder/connector type namesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-14mode: Retrieve only the current information for a ConnectorChris Wilson
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-09android: remove unnecessary TARGET_OUT_HEADERS variableChih-Wei Huang
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-05tests/random: return non-zero on test failureEmil Velikov
... 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-05tests/random: extract test out of xf86drmRandom.cEmil Velikov
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-05tests/hash: return non-zero on failureEmil Velikov
... 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-05tests/hash: style fixesEmil Velikov
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-05tests/hash: misc compilation fixesEmil Velikov
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-05tests/hash: extract test out of xf86drmHash.cEmil Velikov
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-04tests/drmsl: Extract tests out of xf86drmSL.cJan Vesely
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-03-20tests/exynos: Fix missing static keywordJan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-03-20Fix unused function warningsJan Vesely
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-20tests: add rockchip to modetest, kmstest, vbltest and proptestDaniel Kurtz
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-20proptest: install it with --enable-install-test-programsDaniel Kurtz
--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-20android: simplify the including rule of subdirsChih-Wei Huang
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-16exynos: add exynos prefix to fimg2d headerTobias Jakobi
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-16exynos: use structure initialization instead of memsetTobias Jakobi
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-16tests/exynos: fimg2d: add a checkerboard testTobias Jakobi
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-16modetest: include into the build when libkms is not selected.Emil Velikov
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-15Add static qualifier to local functionsJan Vesely
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-14Fix unused, and unused-but-set variables warningsJan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14dristat: Handle DRM_CONSISTENTJan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14Fix type-limits, pointer-arith and sign-compare warningsJan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14tests: String literals are const char *Jan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-13nouveau: make nouveau importing global buffers completely thread-safe, with ↵Maarten Lankhorst
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-10tests/exynos: improve error handlingTobias Jakobi
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-10tests/exynos: introduce wait_for_user_inputTobias Jakobi
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-10tests/exynos: disable the G2D userptr/blend testTobias Jakobi
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-10tests/exynos: fix typos and change wordingTobias Jakobi
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-10tests: automake: keep the libs link at the final stageEmil Velikov
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-10tests: move the SUBDIR at the top of the makefileEmil Velikov
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-10automake: drop the NULL variable from the makefileEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-27tests/radeon: set the list* functions as inlineEmil Velikov
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-27exynos_fimg2d_test: remove unused variablesEmil Velikov
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-27tests: remove unused variablesEmil Velikov
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-27autotools: add WARN_CFLAGS to all targetsEmil Velikov
... 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-27tests: fix implicit funciton declaration errorsEmil Velikov
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-27exynos_fimg2d_test: fix implicit funciton declaration errorsEmil Velikov
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-25tests: add support for imx-drmPhilipp Zabel
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-11tests: remove intel-specific testsDaniel Vetter
These all moved to igt meanwhile. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-10Fix gcc -Wextra warningsJan Vesely
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-01-23Rename DRM_NODE_RENDER to DRM_NODE_PRIMARYFrank Binns
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-11modetest: Allocate dumb buffers with the correct bppLaurent Pinchart
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>
2014-11-27tegra: Add simple test for drm_tegra_open()Thierry Reding
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-27libdrm: Add NVIDIA Tegra supportThierry Reding
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-24update signed/object prop typesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: Print newline for empty blobsVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: alpha buffersRob Clark
Make upper-left corner for RGB32 buffers translucent, for testing blending of AR24 vs XR24. Signed-off-by: Rob Clark <robclark@freedesktop.org>