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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Maarten Lankhorst [Wed, 21 Jan 2015 10:11:55 +0000 (11:11 +0100)]
configure.ac: bump version to 2.4.59 for release
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Paulo Zanoni [Tue, 15 May 2012 21:38:30 +0000 (18:38 -0300)]
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>
Rob Clark [Mon, 24 Nov 2014 18:43:10 +0000 (13:43 -0500)]
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>
Jasper St. Pierre [Sat, 22 Nov 2014 05:37:12 +0000 (21:37 -0800)]
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>
Chris Wilson [Wed, 8 May 2013 15:30:44 +0000 (16:30 +0100)]
intel: Avoid overcounting fences when emitting self-referential relocs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Meyer [Fri, 7 Nov 2014 18:43:04 +0000 (19:43 +0100)]
intel: Fix SIGSEGV in libdrm for heigth = 0 and width = 0
drm_intel_gem_bo_free() crashes because the list bo_gem->vma_list is not
yet initialised, but the error path tries to free it.
See also https://bugs.freedesktop.org/show_bug.cgi?id=75844
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Rob Clark [Wed, 22 Oct 2014 16:57:16 +0000 (12:57 -0400)]
freedreno: do handle lookup on handle and dmabuf import
We also need to check handle_table in the _from_handle() path and the
_from_dmabuf() (which goes through _from_handle()) to avoid duplicate
imports.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Damien Lespiau [Wed, 13 Feb 2013 16:09:38 +0000 (16:09 +0000)]
intel/skl: add gen9 to the CS decoding init
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Damien Lespiau [Wed, 13 Feb 2013 16:09:37 +0000 (16:09 +0000)]
intel/skl: Add gen9 to the buffer manager init
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Damien Lespiau [Mon, 20 Jan 2014 19:40:39 +0000 (19:40 +0000)]
intel/skl: Add SKL PCI ids
v2: Add more PCI IDs (Michael H. Nguyen)
v3: Synchronize one more with the kernel PCI IDs (Damien)
Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Michael H. Nguyen <michael.h.nguyen@intel.com>
Michel Dänzer [Fri, 26 Sep 2014 09:19:12 +0000 (18:19 +0900)]
radeon: Always multiply pitch_bytes by nsamples, not by slice_pt
slice_pt is tileb[0] / tile_split, which isn't directly related to the
pitch.
This caused pitch_bytes to be too large in some cases.
[0] Tile size in bytes
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Rob Clark [Sun, 28 Sep 2014 18:53:34 +0000 (14:53 -0400)]
configure.ac: bump version to 2.4.58 for release
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sun, 28 Sep 2014 18:48:16 +0000 (14:48 -0400)]
more compile fix
Signed-off-by: Rob Clark <robdclark@gmail.com>
Rob Clark [Sun, 28 Sep 2014 18:19:14 +0000 (14:19 -0400)]
fix compile error on 32bit systems
4c2766b (drm_mmap/drm_unmap) brought this error for every .c file that
was not #including config.h:
In file included from private.h:4:0,
from abi16.c:29:
../libdrm.h: In function 'drm_munmap':
../libdrm.h:81:4: error: size of unnamed array is negative
Signed-off-by: Rob Clark <robdclark@gmail.com>
Rob Clark [Sun, 28 Sep 2014 16:25:21 +0000 (12:25 -0400)]
configure.ac: bump version to 2.4.57 for release
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Emil Velikov [Sun, 7 Sep 2014 18:47:06 +0000 (19:47 +0100)]
intel: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 18:44:48 +0000 (19:44 +0100)]
freedreno: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 18:43:53 +0000 (19:43 +0100)]
radeon: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 18:42:08 +0000 (19:42 +0100)]
nouveau: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 18:41:37 +0000 (19:41 +0100)]
libkms: use drm_mmap/drm_munmap wrappers
... for all by exynos.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 19:03:05 +0000 (20:03 +0100)]
drm: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 18:29:00 +0000 (19:29 +0100)]
Add private mmap/munmap wrappers
Unlike Linux, Android (bionic) has separate functions - mmap & mmap64.
Add a local wrapper (inspired by gallium) that will be used throughout
libdrm to combat this bionic feature.
v2:
- Drop the undefined unlikely macro.
- Use macro for munmap under Android.
- Wrap long lines.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
Emil Velikov [Sun, 7 Sep 2014 14:48:48 +0000 (15:48 +0100)]
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>
Benjamin Gaignard [Sun, 7 Sep 2014 17:26:06 +0000 (18:26 +0100)]
modetest: Add support of STI driver
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 17:23:38 +0000 (18:23 +0100)]
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)
Emil Velikov [Sun, 7 Sep 2014 17:20:03 +0000 (18:20 +0100)]
modetest: move sources lists to makefiles.sources
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 17:13:10 +0000 (18:13 +0100)]
libkms: add Android build
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 17:00:16 +0000 (18:00 +0100)]
libkms: move sources lists to makefile.sources
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 16:54:39 +0000 (17:54 +0100)]
libkms: build the intel backend only when needed
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 16:39:46 +0000 (17:39 +0100)]
configure: unconditionally check for atomic ops/primitives
Just have the check once, and let new drivers opt-in if they want
to use them. Move the block further up the script, to tie nicely
with the actual usage of $HW defines.
Move the final $HW users to be alongside their brethren.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 14:54:16 +0000 (15:54 +0100)]
automake: fix 'make commit-headers'
Not too long ago the in-kernel drm public headers were moved. Since then
we could no longer fetch/update the ones in libdrm using the command.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Emil Velikov [Sun, 7 Sep 2014 14:46:42 +0000 (15:46 +0100)]
Remove i810_drm.h and i830_drm.h from the distribution tarball
Both of these headers are not installed since they were imported.
They are not even used internally. The latter no longer exist in the
kernel...
Note the * symbol in EXTRA_DIST causes 'make distcheck' to fail. When
was the last time we ran it ?
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Emil Velikov [Sun, 7 Sep 2014 14:31:00 +0000 (15:31 +0100)]
automake: remove obsolete makefiles
Rather than having two extra makefiles in order to ship ~10 headers
just fold its 5 lines of code into the top one makefile.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Rob Clark [Tue, 16 Sep 2014 20:26:50 +0000 (16:26 -0400)]
freedreno: add dmabuf import/export helpers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Damien Lespiau [Wed, 17 Sep 2014 12:33:45 +0000 (13:33 +0100)]
intel: Don't leak the test page in an has_userptr() error path
When handling the error on GEM_CLOSE, we weren't freeing the allocated
page. Plug that.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Rafal Sapala [Tue, 5 Aug 2014 18:51:38 +0000 (14:51 -0400)]
intel: Adding locks for drm objects synchronization.
The changes make sure that members of the bufmgr_gem and bo_gem
name lists are sychronized between threads
when using the create from prime and create from name methods.
Signed-off-by: Rafal Sapala <rafal.a.sapala@intel.com>
Testcase: igt/drm_import_export
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tvrtko Ursulin [Thu, 19 Jun 2014 14:52:03 +0000 (15:52 +0100)]
intel: Add support for userptr objects
Allow userptr objects to be created and used via libdrm_intel.
At the moment tiling and mapping to GTT aperture is not supported
due hardware limitations across different generations and uncertainty
about its usefulness.
v2: Improved error handling in feature detection per review comments.
v3: Rebase on top of the drm_public addition, minor whitespace addition.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v3)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1,v2)
Lionel Landwerlin [Fri, 12 Sep 2014 12:48:38 +0000 (13:48 +0100)]
intel: make drm_intel_gem_bo_get_reloc_count() thread safe
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Lionel Landwerlin [Fri, 12 Sep 2014 12:48:37 +0000 (13:48 +0100)]
intel: make bo_unreference() thread safe
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Lionel Landwerlin [Fri, 12 Sep 2014 12:48:36 +0000 (13:48 +0100)]
intel: make bufmgr_gem shareable from different API
When using Mesa and LibVA in the same process, one would like to be
able bind buffers from the output of the decoder to a GL texture
through an EGLImage.
LibVA can reuse buffers allocated by Gbm through a file descriptor. It
will then wrap it into a drm_intel_bo with
drm_intel_bo_gem_create_from_prime().
The problem at the moment is that both library get a different
drm_intel_bufmgr object when they call drm_intel_bufmgr_gem_init()
even though they're using the same drm file descriptor. As a result,
instead of manipulating the same buffer object for a given file
descriptor, they get 2 different drm_intel_bo objects and 2 different
refcounts, leading one of the library to get errors from the kernel on
invalid BO when one of the 2 library is done with a shared buffer.
This patch modifies drm_intel_bufmgr_gem_init() so, given a file
descriptor, it will look for an already existing drm_intel_bufmgr
using the same file descriptor and return that object.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Lionel Landwerlin [Fri, 12 Sep 2014 12:48:35 +0000 (13:48 +0100)]
atomic: add atomic_add_unless()
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Emil Velikov [Sun, 24 Aug 2014 22:48:39 +0000 (23:48 +0100)]
freedreno: fd_bo_from_handle() remove duplicate declaration
Already declared in our public header freedreno_drmif.h
Cc: Rob Clark <robclark@freedesktop.org>
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Emil Velikov [Mon, 4 Aug 2014 18:49:08 +0000 (19:49 +0100)]
android: add CleanSpec.mk
The file contains rules that are executed on incremental builds. This
way one can avoid doing a full clean and ensure that the new object
(library) is correctly build. Let's also cleanup the headers.
Inspired by the work of Chih-Wei Huang, from the Android-x86 project.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 01:38:35 +0000 (02:38 +0100)]
freedreno: add Android build support
v2 Rename the headers variable(s) to *_H_FILES.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Mon, 28 Jul 2014 01:33:08 +0000 (02:33 +0100)]
nouveau: add Android build support
v2 Rename the headers variable(s) to *_H_FILES.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sun, 27 Jul 2014 17:51:59 +0000 (18:51 +0100)]
radeon: add Android build support
v2 Rename the headers variable(s) to *_H_FILES.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Fri, 27 Apr 2012 18:20:53 +0000 (13:20 -0500)]
libdrm,intel: rework android header handling
Contains the following patches squashed in:
commit
99247a5bd724ddcf0f06a5518baad207c53f1e2b
Author: Haitao Huang <haitao.huang@intel.com>
Date: Fri, 27 Apr 2012 13:20:53 -0500
Android.mk: use LOCAL_COPY_HEADERS to export headers.
Export necessary header files used by other components for
Android, such as libva intel-driver, gralloc, hwcomposer, etc.
Change-Id: I2feabf6941379ef4d756e942f30eba059de641f1
Signed-off-by: Haitao Huang <haitao.huang@intel.com>
[chad: Fixed inconsistent indentation.]
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
commit
7d0b528cb69995d7ea4e29b2daa1e3b28a362f42
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date: Sun, 27 Jul 2014 18:22:41 +0100
android: reuse headers lists, separate libdrm from intel headers
Rather than having a duplicate copy of the headers list(s),
reuse the existing one(s). Distinguish that the intel headers
should be copied when libdrm_intel is used.
v2 Rename the headers variable(s) to *_H_FILES.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
commit
361de3ba4cadd5357596d1537bb3f216d281532b
Author: Piotr Luc <piotr.luc@intel.com>
Date: Fri, 14 Jun 2013 13:00:39 +0200
Export include dir from libdrm
BZ: 116218
Google introduced new method of specifying include path(s)
between modules. This allows a module to include header from a
library without directly specifyining by includer the path where
headers are located.
The method requires from library that holds headers to export
include path(s) in LOCAL_EXPORT_C_INCLUDE_DIRS variable.
These exported include path(s) are automatically added to
include path(s) of modules that have name of the library in the
LOCAL_SHARED_LIBRARIES or LOCAL_STATIC_LIBRARIES list.
This change sets LOCAL_EXPORT_C_INCLUDE_DIRS to folders that
contain headers file that used by other modules in order to
export these paths.
Change-Id: Id1ac885b31ef2efe194e0289fbcaecd9eb533df0
Signed-off-by: Piotr Luc <piotr.luc@intel.com>
Reviewed-on: http://android.intel.com:8080/113562
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Luc, Piotr <Piotr.Luc@intel.com>
Reviewed-by: Purushothaman, Vijay A <vijay.a.purushothaman@intel.com>
Reviewed-by: Stimson, Dale B <dale.b.stimson@intel.com>
Tested-by: Stimson, Dale B <dale.b.stimson@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
commit
2bf22fcbd4cbb9e7c7764d5eff0bb4e75ab1a005
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date: 27 Jul 2014 18:27:21 +0100
android: Separate libdrm and intel LOCAL_EXPORT_C_INCLUDE_DIRS
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>