OSDN Git Service

android-x86/external-libdrm.git
9 years agoandroid: remove ${srcdir} from the includes
Emil Velikov [Tue, 17 Mar 2015 23:30:10 +0000 (23:30 +0000)]
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>
9 years agoandroid: simplify LOCAL_C_INCLUDES
Emil Velikov [Tue, 17 Mar 2015 23:30:09 +0000 (23:30 +0000)]
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>
9 years agoandroid: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
Emil Velikov [Tue, 17 Mar 2015 23:30:08 +0000 (23:30 +0000)]
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>
9 years agoRELEASING: Fix annouce typo
Damien Lespiau [Thu, 19 Mar 2015 16:29:52 +0000 (16:29 +0000)]
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>
9 years agoRELEASING: Fix the step numbering
Damien Lespiau [Thu, 19 Mar 2015 16:27:31 +0000 (16:27 +0000)]
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>
9 years agoRELEASING: Fix releasing instructions to match the latest release.sh
Damien Lespiau [Thu, 19 Mar 2015 16:24:49 +0000 (16:24 +0000)]
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>
9 years agointel: Merge latest i915_drm.h
Neil Roberts [Thu, 19 Mar 2015 17:11:08 +0000 (17:11 +0000)]
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>
9 years agobuild: Bump version number to 2.4.60 before release
Damien Lespiau [Thu, 19 Mar 2015 14:36:56 +0000 (14:36 +0000)]
build: Bump version number to 2.4.60 before release

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agointel: Export total subslice and EU counts
Jeff McGee [Mon, 9 Mar 2015 23:13:03 +0000 (16:13 -0700)]
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>
9 years agoconfigure.ac: error out if building freedreno_kgsl without freedreno
Emil Velikov [Tue, 17 Mar 2015 00:19:27 +0000 (00:19 +0000)]
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>
9 years agoconfigure.ac: fix help string copy/pasta
Emil Velikov [Tue, 17 Mar 2015 00:19:26 +0000 (00:19 +0000)]
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>
9 years agoconfigure.ac: fix host_cpu/atomics detection
Emil Velikov [Tue, 17 Mar 2015 00:19:25 +0000 (00:19 +0000)]
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>
9 years agoautogen.sh: handle out-of-tree invokation
Emil Velikov [Mon, 9 Mar 2015 12:08:17 +0000 (12:08 +0000)]
autogen.sh: handle out-of-tree invokation

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure: Stop using AM_MAINTAINER_MODE
Emil Velikov [Mon, 9 Mar 2015 12:08:16 +0000 (12:08 +0000)]
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>
9 years agoexynos: fimg2d: follow-up fix for G2D_COEFF_MODE_GB_COLOR
Tobias Jakobi [Wed, 11 Mar 2015 19:38:46 +0000 (20:38 +0100)]
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>
9 years agoexynos: add fimg2d header to common includes
Tobias Jakobi [Wed, 11 Mar 2015 19:38:45 +0000 (20:38 +0100)]
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>
9 years agoexynos: add exynos prefix to fimg2d header
Tobias Jakobi [Wed, 11 Mar 2015 19:38:44 +0000 (20:38 +0100)]
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>
9 years agoexynos: use structure initialization instead of memset
Tobias Jakobi [Mon, 16 Mar 2015 22:19:28 +0000 (22:19 +0000)]
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

9 years agoexynos: honor the repeat mode in g2d_copy_with_scale
Tobias Jakobi [Wed, 11 Mar 2015 19:38:42 +0000 (20:38 +0100)]
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>
9 years agoexynos: add g2d_scale_and_blend
Tobias Jakobi [Wed, 11 Mar 2015 19:38:41 +0000 (20:38 +0100)]
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>
9 years agotests/exynos: fimg2d: add a checkerboard test
Tobias Jakobi [Wed, 11 Mar 2015 19:38:40 +0000 (20:38 +0100)]
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>
9 years agomodetest: include into the build when libkms is not selected.
Emil Velikov [Tue, 10 Mar 2015 18:12:28 +0000 (18:12 +0000)]
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>
9 years agoAdd static qualifier to local functions
Jan Vesely [Fri, 27 Feb 2015 16:43:44 +0000 (11:43 -0500)]
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>
9 years agoFix unused, and unused-but-set variables warnings
Jan Vesely [Fri, 27 Feb 2015 17:47:46 +0000 (12:47 -0500)]
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>
9 years agodristat: Handle DRM_CONSISTENT
Jan Vesely [Fri, 27 Feb 2015 17:27:46 +0000 (12:27 -0500)]
dristat: Handle DRM_CONSISTENT

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
9 years agoFix type-limits, pointer-arith and sign-compare warnings
Jan Vesely [Fri, 27 Feb 2015 16:51:05 +0000 (11:51 -0500)]
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>
9 years agotests: String literals are const char *
Jan Vesely [Fri, 27 Feb 2015 16:45:56 +0000 (11:45 -0500)]
tests: String literals are const char *

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
9 years agoOn Solaris, #include <sys/mkdev.h> in xf86drm.c
Alan Coopersmith [Sat, 7 Mar 2015 19:44:32 +0000 (11:44 -0800)]
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>
9 years agonouveau: Do not add most bo's to the global bo list.
Maarten Lankhorst [Thu, 26 Feb 2015 10:54:04 +0000 (11:54 +0100)]
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>
9 years agonouveau: make nouveau importing global buffers completely thread-safe, with tests
Maarten Lankhorst [Thu, 26 Feb 2015 10:54:03 +0000 (11:54 +0100)]
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>
9 years agoUse __sync_add_and_fetch instead of __sync_fetch_and_add for atomic_dec_and_test
Maarten Lankhorst [Thu, 26 Feb 2015 10:54:02 +0000 (11:54 +0100)]
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>
9 years agoAdd atomic_inc_return to atomics.
Maarten Lankhorst [Thu, 26 Feb 2015 10:54:01 +0000 (11:54 +0100)]
Add atomic_inc_return to atomics.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoexynos: fimg2d: whitespace fix in g2d_flush
Tobias Jakobi [Tue, 24 Feb 2015 15:29:39 +0000 (16:29 +0100)]
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>
9 years agoexynos: fimg2d: introduce G2D_OP_INTERPOLATE
Tobias Jakobi [Tue, 24 Feb 2015 15:29:38 +0000 (16:29 +0100)]
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>
9 years agoexynos: fimg2d: unify register style
Tobias Jakobi [Tue, 24 Feb 2015 15:29:37 +0000 (16:29 +0100)]
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>
9 years agoexynos: fimg2d: fix comment for G2D_COEFF_MODE_GB_COLOR
Tobias Jakobi [Tue, 24 Feb 2015 14:20:52 +0000 (15:20 +0100)]
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>
9 years agoexynos: fimg2d: remove TRUE/FALSE from header
Tobias Jakobi [Tue, 24 Feb 2015 14:20:50 +0000 (15:20 +0100)]
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>
9 years agotests/exynos: improve error handling
Tobias Jakobi [Tue, 24 Feb 2015 14:20:48 +0000 (15:20 +0100)]
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>
9 years agoexynos: introduce g2d_add_base_addr helper function
Tobias Jakobi [Tue, 24 Feb 2015 14:20:46 +0000 (15:20 +0100)]
exynos: introduce g2d_add_base_addr helper function

In almost all functions the base address register is written, so it
makes sense to have a helper function for this.

v3: Wrap line 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>
9 years agotests/exynos: introduce wait_for_user_input
Tobias Jakobi [Tue, 24 Feb 2015 14:20:44 +0000 (15:20 +0100)]
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>
9 years agotests/exynos: disable the G2D userptr/blend test
Tobias Jakobi [Tue, 24 Feb 2015 14:20:42 +0000 (15:20 +0100)]
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>
9 years agotests/exynos: fix typos and change wording
Tobias Jakobi [Tue, 24 Feb 2015 14:20:41 +0000 (15:20 +0100)]
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>
9 years agoexynos: replace G2D_DOUBLE_TO_FIXED macro with function
Tobias Jakobi [Tue, 24 Feb 2015 14:20:40 +0000 (15:20 +0100)]
exynos: replace G2D_DOUBLE_TO_FIXED macro with function

This also avoids the floating point conversion steps and just
uses pure integer arithmetic.
Since the G2D hardware scaling approach is a bit unintuitive,
document it in the function as well.

v2: Explicitly mention the normalization constant.
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>
9 years agodrm: add drmGet(Primary|Render)DeviceNameFromFd functions
Emil Velikov [Sat, 7 Mar 2015 00:58:39 +0000 (00:58 +0000)]
drm: add drmGet(Primary|Render)DeviceNameFromFd functions

Currently most places assume reliable primary(master) <> render node
mapping. Although this may work in some cases, it is not correct.

Add a couple of helpers that hide the details and provide the name of
the master or render device name, given an fd. The latter may belong to
either the master, control or render node device.

v2:
 - Rename Device and Primary to Master (aka the /dev/dri/cardX device).
 - Check for the file via readdir_r() rather than stat().
 - Wrap the check into a single function.
 - Return NULL for non-linux platforms.

v3:
 - Don't segfault if name is NULL.
 - Update function names, as suggested by Frank Binns.

v4:
 - Update commit message to reflect the function name changes.

Cc: Frank Binns <frank.binns@imgtec.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
9 years agotests: automake: keep the libs link at the final stage
Emil Velikov [Wed, 25 Feb 2015 13:00:08 +0000 (13:00 +0000)]
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>
9 years agotests: move the SUBDIR at the top of the makefile
Emil Velikov [Tue, 10 Mar 2015 18:02:20 +0000 (18:02 +0000)]
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>
9 years agoautomake: drop the NULL variable from the makefile
Emil Velikov [Tue, 10 Mar 2015 18:01:24 +0000 (18:01 +0000)]
automake: drop the NULL variable from the makefile

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure: update help strings
Emil Velikov [Tue, 10 Mar 2015 17:57:59 +0000 (17:57 +0000)]
configure: update help strings

Mention that freedreno and intel are both auto-detected (depending on
the presence of atomics), plus host_cpu "defined".

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure: omap, freedreno and tegra require atomics
Emil Velikov [Tue, 2 Dec 2014 00:12:34 +0000 (00:12 +0000)]
configure: omap, freedreno and tegra require atomics

They have used them since day one, but the check was never there.

v2:
 - Update the freedreno message (API is no longer experimental).
 - Move the freedreno host_cpu detection next to the intel one.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoautomake: wrap an insanely long line
Emil Velikov [Tue, 2 Dec 2014 00:10:38 +0000 (00:10 +0000)]
automake: wrap an insanely long line

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoRevert "intel: Fix documentation for drm_intel_gem_bo_wait()"
Daniel Vetter [Fri, 6 Mar 2015 17:56:57 +0000 (18:56 +0100)]
Revert "intel: Fix documentation for drm_intel_gem_bo_wait()"

This reverts commit 080b4929b7452dc1fea32ac1d32e7e571e7fb38b.

Chris noticed that "negative values wait forever" is indeed intended
behaviour and the issue is just that we didn't have a testcase (fixed
now) and that a regression slipped through (fixed and on track for all
stable kernels).

So lets undo the documentation change for consistency, since working
around kernel regressions isn't good. Practical impact is nil anyway.

v2: Add a note to docs that some kernels have been broken.

v3: Remove the random garbage included by accident.

Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agointel: Fix documentation for drm_intel_gem_bo_wait()
Kristian Høgsberg [Sat, 28 Feb 2015 17:31:58 +0000 (09:31 -0800)]
intel: Fix documentation for drm_intel_gem_bo_wait()

The kernel doesn't actually wait indefinately when passed a negative,
timeout, it returns immediately.  Document this and suggest using INT64_MAX
for indefinite waits.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/radeon: set the list* functions as inline
Emil Velikov [Mon, 23 Feb 2015 14:17:19 +0000 (14:17 +0000)]
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>
9 years agoexynos_fimg2d_test: remove unused variables
Emil Velikov [Mon, 23 Feb 2015 14:08:24 +0000 (14:08 +0000)]
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>
9 years agotests: remove unused variables
Emil Velikov [Mon, 23 Feb 2015 14:02:44 +0000 (14:02 +0000)]
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>
9 years agoautotools: add WARN_CFLAGS to all targets
Emil Velikov [Mon, 23 Feb 2015 12:52:47 +0000 (12:52 +0000)]
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>
9 years agotests: fix implicit funciton declaration errors
Emil Velikov [Mon, 23 Feb 2015 13:42:15 +0000 (13:42 +0000)]
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>
9 years agoexynos_fimg2d_test: fix implicit funciton declaration errors
Emil Velikov [Mon, 23 Feb 2015 13:18:11 +0000 (13:18 +0000)]
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>
9 years agoautotools: add AM_DISTCHECK_CONFIGURE_FLAGS
Emil Velikov [Mon, 23 Feb 2015 13:10:56 +0000 (13:10 +0000)]
autotools: add AM_DISTCHECK_CONFIGURE_FLAGS

To make sure that the release/distribution tarball is not broken for all
the targets. Currently the experimental APIs are disabled by default
amongst others.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
9 years agotests: add support for imx-drm
Philipp Zabel [Fri, 12 Dec 2014 13:12:29 +0000 (14:12 +0100)]
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>
9 years agoAdd new drmGetNodeTypeFromFd function
Frank Binns [Fri, 13 Feb 2015 10:51:15 +0000 (10:51 +0000)]
Add new drmGetNodeTypeFromFd function

Add a helper function that returns the type of device node from an fd.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoandroid: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES
Chih-Wei Huang [Fri, 23 Jan 2015 06:25:10 +0000 (14:25 +0800)]
android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES

v2: Fold libpciaccess and libdrm into a single local_shared_libraries

Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agolibdrm: fix the Android 64bit build
Emil Velikov [Thu, 29 Jan 2015 02:04:35 +0000 (02:04 +0000)]
libdrm: fix the Android 64bit build

With 64bit bionic mmap now handles 64bit offset, thus we no longer
need the __mmap2 trick.

Fix from Chih-Wei Huang, over at the google forums.

Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agonouveau: fix unlock nouveau_bo_name_ref()
Jerome Glisse [Mon, 16 Feb 2015 19:58:21 +0000 (14:58 -0500)]
nouveau: fix unlock nouveau_bo_name_ref()

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
9 years agoAdd new drmOpenOnceWithType function (v2)
Jammy Zhou [Mon, 2 Feb 2015 10:06:27 +0000 (18:06 +0800)]
Add new drmOpenOnceWithType function (v2)

v2: call drmOpenOnceWithType in drmOpenOnce, and drop unused param
for drmOpenOnceWithType

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
9 years agoAdd new drmOpenWithType function (v4)
Jammy Zhou [Wed, 11 Feb 2015 04:40:51 +0000 (12:40 +0800)]
Add new drmOpenWithType function (v4)

v2: Add drmGetMinorBase, and call drmOpenWithType in drmOpen
v3: Pass 'type' to drmOpenByBusid and drmOpenDevice in drmOpenByName
v4: Renumber node type definitions, and return -1 for unsupported type

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v3)
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
9 years agoStop undefining _ATOMIC_TYPE in Solaris/NetBSD section of xf86atomic.h
Alan Coopersmith [Sat, 7 Feb 2015 17:12:25 +0000 (09:12 -0800)]
Stop undefining _ATOMIC_TYPE in Solaris/NetBSD section of xf86atomic.h

Since the atomic_set() macro references _ATOMIC_TYPE, undefining it
broke that macro, resulting in build errors of:
"intel_bufmgr_gem.c", line 775: undefined symbol: _ATOMIC_TYPE

Now that we're leaving the macro in the namespace, renamed it to start
with LIBDRM_ instead of _ to avoid polluting others namespace.

Regression introduced in 87fdd32c8779648 Add NetBSD atomic ops support.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-By: Thomas Klausner <wiz@NetBSD.org>
9 years agoxf86drm: Fix ioctl struct clearing in drmGetVersion
Daniel Vetter [Wed, 11 Feb 2015 16:25:30 +0000 (17:25 +0100)]
xf86drm: Fix ioctl struct clearing in drmGetVersion

Oops, fumbled that one.

Reported-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agotests: remove intel-specific tests
Daniel Vetter [Wed, 11 Feb 2015 11:55:38 +0000 (12:55 +0100)]
tests: remove intel-specific tests

These all moved to igt meanwhile.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agoxf86drm: Unconditionally clear ioctl structs
Daniel Vetter [Wed, 11 Feb 2015 11:41:04 +0000 (12:41 +0100)]
xf86drm: Unconditionally clear ioctl structs

We really have to do this to avoid surprises when extending the ABI
later on. Especially when growing the structures.

A bit overkill to update all the old legacy ioctl wrappers, but can't
hurt really either.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agodrm: use drmIoctl everywhere
Daniel Vetter [Wed, 11 Feb 2015 11:30:04 +0000 (12:30 +0100)]
drm: use drmIoctl everywhere

Well just core drm. All the other callers in there that still use
direct calls to ioctl have some custom retry logic already, so should
be good already.

All the other offenders (tests, freedreno/kgsl, ...) don't really
matter (e.g. kgsl is the blob library and so not a drm thing) or are
again special exceptions with their own retry loops.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agoxf86drmMode: Unconditionally clear ioctl structs
Daniel Vetter [Wed, 11 Feb 2015 11:03:12 +0000 (12:03 +0100)]
xf86drmMode: Unconditionally clear ioctl structs

We really have to do this to avoid surprises when extending the ABI
later on. Especially when growing the structures.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agointel: Unconditionally clear ioctl structs
Daniel Vetter [Wed, 11 Feb 2015 10:59:52 +0000 (11:59 +0100)]
intel: Unconditionally clear ioctl structs

We really have to do this to avoid surprises when extending the ABI
later on. Especially when growing the structures.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agoFix gcc -Wextra warnings
Jan Vesely [Sun, 30 Nov 2014 17:53:18 +0000 (12:53 -0500)]
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>
9 years agorandom: Use unsigned long for seed
Jan Vesely [Sun, 30 Nov 2014 18:04:23 +0000 (13:04 -0500)]
random: Use unsigned long for seed

v2: Remove unrelated change in main()

This is more consistent with the rest, and avoids potential undefined
behavior (signed overflow) ind drmRandom()

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>
9 years agoexynos: remove DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls
Hyungwon Hwang [Fri, 16 Jan 2015 22:57:34 +0000 (23:57 +0100)]
exynos: remove DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls

This patch removes the ioctls which are removed from the linux kernel.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agoexynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls
Hyungwon Hwang [Fri, 16 Jan 2015 22:57:33 +0000 (23:57 +0100)]
exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls

The ioctl DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP are removed from
the linux kernel. This patch modifies libdrm and libkms to use drm generic
ioctls instead of the removed ioctls.

v2: The original patch was erroneous. In case the MODE_MAP_DUMB ioctl failed
    it would return the retvalue as a void-pointer. Users of libdrm would then
    happily use that ptr, eventually leading to a segfault. Change this to
    return NULL in that case and also restore the previous behaviour of logging
    to stderr.
    The other error was that 'bo->vaddr' was never filled with the mapped
    buffer address. Hence exynos_bo_map still returned NULL even if the
    buffer mapping succeeded.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agonouveau: Remove unused static function.
Thomas Klausner [Sun, 30 Mar 2014 12:23:46 +0000 (14:23 +0200)]
nouveau: Remove unused static function.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
9 years agointel: Only define variable when it's used.
Thomas Klausner [Sun, 30 Mar 2014 12:22:26 +0000 (14:22 +0200)]
intel: Only define variable when it's used.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
9 years agoAdd NetBSD atomic ops support.
Thomas Klausner [Sun, 20 Jul 2014 08:23:58 +0000 (10:23 +0200)]
Add NetBSD atomic ops support.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
9 years agoFix libdrm's atomic_dec_and_test on Solaris.
Thomas Klausner [Sun, 20 Jul 2014 08:24:26 +0000 (10:24 +0200)]
Fix libdrm's atomic_dec_and_test on Solaris.

_nv means new value, not old value!

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
9 years agoAdd new drmOpenRender function
Frank Binns [Wed, 14 Jan 2015 14:07:51 +0000 (14:07 +0000)]
Add new drmOpenRender function

Add a new function, drmOpenRender, that can be used to open render nodes. This
can be used in the same way that drmOpenControl is used to open control nodes.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
9 years agoRename DRM_NODE_RENDER to DRM_NODE_PRIMARY
Frank Binns [Wed, 14 Jan 2015 14:07:50 +0000 (14:07 +0000)]
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>
9 years agoconfigure.ac: bump version to 2.4.59 for release
Maarten Lankhorst [Wed, 21 Jan 2015 10:11:55 +0000 (11:11 +0100)]
configure.ac: bump version to 2.4.59 for release

9 years agoonly enable support for freedreno on arm automatically
Maarten Lankhorst [Wed, 21 Jan 2015 10:46:04 +0000 (11:46 +0100)]
only enable support for freedreno on arm automatically

Users can still override this by explicitly passing --enable-freedreno
to configure.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
9 years agoradeon: align r600/700 fmask to 128 X blocks.
Dave Airlie [Fri, 9 Jan 2015 03:34:41 +0000 (13:34 +1000)]
radeon: align r600/700 fmask to 128 X blocks.

After much searching and empricial testing, and reading of
things I've no justifcation for this fix, other than it really
appears this is what the hw is doing or close enough.

It makes sense that each entry in the FMASK corresponds to
an entry in the CMASKm and the CMASK is organised into 128x128
blocks, but I can't find anything in any of the docs/info from AMD.

But I've spent a lot of time on this, and this seems to be the
simplest fix, in that we don't over allocate things too much,
once this fix in place we can nuke the extra multiplier in mesa.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoconfigure/freedreno: enable freedreno by default
Rob Clark [Tue, 13 Jan 2015 16:00:09 +0000 (11:00 -0500)]
configure/freedreno: enable freedreno by default

Now that enabling freedreno doesn't automatically enable kgsl, lets
enable it by default.  The drm/msm driver has been upstream for a
while now, and it's ABI is locked.  So I don't think we need to keep
calling it experimental.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agoconfigure/freedreno: make KGSL support optional
Rob Clark [Tue, 13 Jan 2015 15:53:42 +0000 (10:53 -0500)]
configure/freedreno: make KGSL support optional

libdrm_freedreno currently supports two backends, 'msm' for the upstream
drm/msm driver, and 'kgsl' which supports (to some extent), the android/
downstream kgsl driver plus a sort of drm shim nonsense to get flink
names.

However, kgsl support is strictly on a best-effort basis.  Different
android devices with different versions of kgsl may have different
abi's.  And the existing kgsl interface (at least the parts of it that
we use) is completely broken for 64bit.  Lets disable it by default lest
anyone actually try to use it.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agointel: Fix GTT entry setup for aub dump
Zhenyu Wang [Thu, 8 Jan 2015 07:23:04 +0000 (15:23 +0800)]
intel: Fix GTT entry setup for aub dump

On recent emulator GTT entry setup for aub dump needs mem type as
GTT_ENTRY instead of NONLOCAL. NONLOCAL would write data in main
memory space which is wrong with new memory layout. GTT_ENTRY write
would setup GTT memory pool and other required internal buffers. With
this I can run aub dump on latest release without crash.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
9 years agomodetest: Allocate dumb buffers with the correct bpp
Laurent Pinchart [Tue, 9 Dec 2014 20:00:58 +0000 (22:00 +0200)]
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>
9 years agoAdd new DRM_MODE_CONNECTOR and _ENCODER defines
Adam Cheney [Tue, 16 Dec 2014 17:22:38 +0000 (12:22 -0500)]
Add new DRM_MODE_CONNECTOR and _ENCODER defines

Update drm_mode.h defines from kernel upstream for connector and
encoder types to expose DSI and other newly defined types.

Signed-off-by: Adam Cheney <acheney@nvidia.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agotegra: Implement drm_tegra_bo_{get,set}_tiling()
Thierry Reding [Thu, 27 Nov 2014 14:32:43 +0000 (15:32 +0100)]
tegra: Implement drm_tegra_bo_{get,set}_tiling()

These two functions are simple wrappers around the corresponding IOCTLs
and operate on drm_tegra_bo objects.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agotegra: Implement drm_tegra_bo_{get,set}_flags()
Thierry Reding [Thu, 27 Nov 2014 14:31:34 +0000 (15:31 +0100)]
tegra: Implement drm_tegra_bo_{get,set}_flags()

These two functions are simple wrappers around the corresponding IOCTLs
and operate on drm_tegra_bo objects.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agotegra: Add SET/GET_FLAGS IOCTLs
Thierry Reding [Tue, 10 Jun 2014 10:41:58 +0000 (12:41 +0200)]
tegra: Add SET/GET_FLAGS IOCTLs

The DRM_TEGRA_GEM_SET_FLAGS IOCTL can be used to set the flags of a
buffer object after it has been allocated or imported. Flags associated
with a buffer object can be queried using the DRM_TEGRA_GEM_GET_FLAGS
IOCTL.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agotegra: Add GET/SET_TILING IOCTLs
Thierry Reding [Wed, 4 Jun 2014 08:36:43 +0000 (10:36 +0200)]
tegra: Add GET/SET_TILING IOCTLs

Currently the tiling parameters of buffer objects can only be set at
allocation time, and only a single tiled mode is supported. This new
DRM_TEGRA_GEM_SET_TILING IOCTL allows more modes to be set and also
allows the tiling mode to be changed after the allocation. This will
enable the Tegra DRM driver to import buffers from a GPU and directly
scan them out by configuring the display controller appropriately.

To complement this, the DRM_TEGRA_GEM_GET_TILING IOCTL can query the
current tiling mode of a buffer object. This is necessary when importing
buffers via handle (as is done in Mesa for example) so that userspace
can determine the proper parameters for the 2D or 3D engines.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agotegra: Add simple test for drm_tegra_open()
Thierry Reding [Wed, 19 Feb 2014 13:48:31 +0000 (14:48 +0100)]
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>
9 years agolibdrm: Add NVIDIA Tegra support
Thierry Reding [Sat, 1 Dec 2012 09:30:38 +0000 (10:30 +0100)]
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>
9 years agoupdate signed/object prop types
Rob Clark [Sat, 12 Oct 2013 16:16:44 +0000 (12:16 -0400)]
update signed/object prop types

Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agomodetest: Print newline for empty blobs
Ville Syrjälä [Fri, 8 Jun 2012 10:28:16 +0000 (13:28 +0300)]
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>
9 years agomodetest: alpha buffers
Rob Clark [Sat, 12 Oct 2013 16:21:49 +0000 (12:21 -0400)]
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>