Commit Graph

5450 Commits (7d8c9464081634f053e16e5eac9655a12fae1dc4)

Author SHA1 Message Date
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 3b2ee2b5bf drmSL: Fix neighbor lookup
Commit e4a519635f75bde38aeb5b09f2ff4efbf73453e9:
    Tidy up compile warnings by cleaning up types.

removed call to SLLocate which gutted the function of all functionality.
This patch restores the original behavior, with an additional fix
that zeros the update array in case SLLocate bails early.

v2: zero the update array instead of checking the return value.
    SLLocate returns NULL both on failure and if the element is greater
    than everything in the list
v3: Improve commit message

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-04 13:41:26 -04:00
Emil Velikov bc6b5174d3 android: remove explicit include to libpciaccess
Both android-x86 and android-ia versions of libpciacccess correctly
"export" the include. If anyone else is wrapping up their own version
they should do so as well.

Remove this fixed location hack from the build.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-03-26 20:37:10 +00: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 cfbe9c9807 Remove drmSetDebugMsgFunction and related infrastructure
Not used anywhere

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:36:04 -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
Emil Velikov d9b6a69252 autotools: remove ${srcdir} from the includes
Already handled by the build system.

v2: s/compiler/build system/

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:18:01 +00:00
Chih-Wei Huang 3b4f9fe26b android: get rid of LIBDRM_TOP
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
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
Emil Velikov 568b3a0954 android: add the missing tag "optional" to libkms
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:03:16 +00:00
Emil Velikov ff021215ea android: remove LOCAL_COPY_HEADERS* variables
With earlier changes we've implicitly add the relevant directories
to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.

v2: Update the top Android.mk as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:02:56 +00:00
Emil Velikov c277cbdd15 android: remove ${srcdir} from the includes
Already handled by the build system.

v2: s/compiler/build system/. Spotted by Chih-Wei.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:58 +00:00
Emil Velikov af4379f759 android: simplify LOCAL_C_INCLUDES
Each of the libdrm_${hw} modules pull libdrm for linking as such:

libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list.
The former of which is already set to ${top} and ${top}/include/drm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Emil Velikov 24ac8cd7db android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
- Don't add ${hw}/${hw}, but ${hw} to the includes path. The former
does not exist.
 - Set the variable for libkms.

Inspired by the work of from Chih-Wei from the Android-x86 project.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Damien Lespiau e2acca4e40 RELEASING: Fix annouce typo
That's the only typo :set spell found.

v2: Fix typo in commit message (Ilia Mirkin)

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-20 15:55:23 +00:00
Damien Lespiau 992940ca64 RELEASING: Fix the step numbering
v2: Really fix the numbering (Emil Velikov)

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-20 15:55:23 +00:00
Damien Lespiau 8f245b777b RELEASING: Fix releasing instructions to match the latest release.sh
It seems that the tests don't need DRM master anymore? at least make
distcheck passes when X is running.

release.sh is also invoked with just the path to the libdrm git checkout
and we don't want to pass additional arguments that will be treated as
additional modules we want to release.

Also, make a note that release.sh will run make distcheck for you, so we
don't strickly need to run it beforehand.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-20 15:53:57 +00:00
Neil Roberts 8576527cfa intel: Merge latest i915_drm.h
The main incentive to do this is to get I915_PARAM_REVISION.

v2: Rebase on top of some changes that were made to the header without
    copying the whole file from the kernel source.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-19 17:19:46 +00:00
Damien Lespiau 5f7b6723e1 build: Bump version number to 2.4.60 before release
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-19 14:36:56 +00:00
Jeff McGee d556e068a7 intel: Export total subslice and EU counts
Update kernel interface with new I915_GETPARAM ioctl entries for
subslice total and EU total. Add a wrapping function for each
parameter. Userspace drivers need these values when constructing
GPGPU commands. This kernel query method is intended to replace
the PCI ID-based tables that userspace drivers currently maintain.
The kernel driver can employ fuse register reads as needed to
ensure the most accurate determination of GT config attributes.
This first became important with Cherryview in which the config
could differ between devices with the same PCI ID.

The kernel detection of these values is device-specific. Userspace
drivers should continue to maintain ID-based tables for older
devices which return ENODEV when using this query.

v2: remove unnecessary include of <stdbool.h> and increment the
    I915_GETPARAM indices to match updated kernel patch.

For: VIZ-4636
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-18 18:15:37 +00:00
Emil Velikov d20413a7ce configure.ac: error out if building freedreno_kgsl without freedreno
The former is a subset of the latter. Error out early so the user is
aware that they are doing something very wrong.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2015-03-17 22:37:05 +00:00
Emil Velikov 648508518e configure.ac: fix help string copy/pasta
The message "enabled on x86" was meant for the intel libdrm.
Take the opportunity to mention how libkms is autodetected.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-17 22:37:03 +00:00
Emil Velikov 0e4d5a3a46 configure.ac: fix host_cpu/atomics detection
Previous code was busted, as it wasn't checking directly for what it was
meant to, and at the end changing the user's selection if host_cpu
heuristics were involved.

Simplify things by adding a macro that does the long message printing
for us, and check for only what we need.

This fixes commit 36cff14bb03(configure: omap, freedreno and tegra
require atomics) which incorrectly assumed that the code was working
fine, and effectively made impossible to enable freedreno due to it's
host_cpu detection.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-17 22:37:02 +00:00
Emil Velikov ffb1e28530 autogen.sh: handle out-of-tree invokation
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-17 22:35:51 +00:00
Emil Velikov d8ea64d90b configure: Stop using AM_MAINTAINER_MODE
AM_MAINTAINER_MODE can be used to disable generation of rebuild rules.
This is not something we want to condone/support, considering it can
cause greater problems than the perceived benefits. Additionally the
Automake manual leans towards avoiding the use of AM_MAINTAINER_MODE.

http://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-17 22:34:59 +00:00
Tobias Jakobi 858b21f6af exynos: fimg2d: follow-up fix for G2D_COEFF_MODE_GB_COLOR
Also add the register field formatting info provided by
Inki Dae <inki.dae@samsung.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Suggested-by: Inki Dae <inki.dae@samsung.com>
2015-03-16 22:21:40 +00:00
Tobias Jakobi 3f12191f29 exynos: add fimg2d header to common includes
The reason for this change is to let userspace use the header.
Currently 'make install' does not install it.

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 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 89037326ca exynos: honor the repeat mode in g2d_copy_with_scale
This is useful when the default repeat mode, which is 'repeat'
produces artifacts at the borders of the copied image.
Choose the 'pad' mode to make use of the color of the destination
image.

In my usage case the destination is the framebuffer, which is
solid filled with a background color. Scaling with 'pad' mode
would then just do the right thing and also produces nice
borders on the output.

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
Tobias Jakobi 03c9cccfa0 exynos: add g2d_scale_and_blend
This is a combination of g2d_copy_with_scale and g2d_scale.
It is a pretty common operation to scale one buffer and then
blend it on top of another, so provide a direct way to that
operation.

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
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
Alan Coopersmith 0e1135de5c On Solaris, #include <sys/mkdev.h> in xf86drm.c
Needed on Solaris for the definitions of major() & minor() used in
drmGetNodeTypeFromFd() and makedev() used in drmOpenMinor()

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-14 08:37:36 -07:00
Maarten Lankhorst ba5a0b6274 nouveau: Do not add most bo's to the global bo list.
Only add wrapped bo's and bo's that have been exported through flink or dma-buf.
This avoids a lock in the common case, and decreases traversal needed for importing
a dma-buf or flink.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Tested-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-13 20:28:16 +01: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
Maarten Lankhorst 7caa442e76 Use __sync_add_and_fetch instead of __sync_fetch_and_add for atomic_dec_and_test
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-13 20:21:57 +01:00
Maarten Lankhorst cd4685498b Add atomic_inc_return to atomics.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-13 20:21:00 +01:00
Tobias Jakobi f7b0586f16 exynos: fimg2d: whitespace fix in g2d_flush
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 19:23:49 +00:00
Tobias Jakobi 0d48697e7c exynos: fimg2d: introduce G2D_OP_INTERPOLATE
This sets up the blending equation in the following way:
out = src * src_alpha + dst * (1 - src_alpha)

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:23:49 +00:00
Tobias Jakobi 81b71e48e7 exynos: fimg2d: unify register style
Register defines all use uppercase hex codes.

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:23:49 +00:00
Tobias Jakobi ac9e095847 exynos: fimg2d: fix comment for G2D_COEFF_MODE_GB_COLOR
The coefficient mode enables use of global color, not alpha.

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:23:49 +00:00
Tobias Jakobi ba858e06d8 exynos: fimg2d: remove TRUE/FALSE from header
The fimg2d header was defining TRUE and FALSE, but actually
these defines are just used once. Remove them, since they
don't make the code better readable/understandable.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 19:23:45 +00:00