platform/upstream/libdrm.git
8 years agoexynos: support DRM_IOCTL_EXYNOS_GEM_MAP 97/49097/1 accepted/tizen/mobile/20151103.224637 accepted/tizen/tv/20151103.224645 accepted/tizen/wearable/20151103.224656 submit/tizen/20151103.025922
Joonyoung Shim [Tue, 6 Oct 2015 10:09:16 +0000 (19:09 +0900)]
exynos: support DRM_IOCTL_EXYNOS_GEM_MAP

The commit d41b7a3a745a("exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/
MMAP} ioctls") removed it same with the ioctl that this patch adds. The
reason that removed DRM_IOCTL_EXYNOS_GEM_MAP_OFFSET was we could use
DRM_IOCTL_MODE_MAP_DUMB. Both did exactly same thing.

Now exynos-drm driver of linux kernel revives it as DRM_EXYNOS_GEM_MAP
because of render node. DRM_IOCTL_MODE_MAP_DUMB isn't permitted in
render node, so this patch also supports DRM_IOCTL_EXYNOS_GEM_MAP.

Change-Id: Ib548dc8a6bea076375465f64ee2fdd658a90e435
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
8 years agoBuild vbltest irrespective of the presence of libudev. 96/49096/1
Joonyoung Shim [Tue, 6 Oct 2015 10:08:28 +0000 (19:08 +0900)]
Build vbltest irrespective of the presence of libudev.

The vbltest doesn't have any dependency of LIBUDEV.

Change-Id: I3dcf10235f72a8b2ed1d823d855e38bf1741e7de
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
8 years agoAdd manifest for security domain policy 66/45266/1
Mun, Gwan-gyeong [Tue, 4 Aug 2015 08:20:33 +0000 (17:20 +0900)]
Add manifest for security domain policy

Change-Id: I18f14262475041b2f1e919923907f998a8f12d87

8 years agoremove manifest for security domain policy 80/42980/1 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150707.063339 accepted/tizen/tv/20150707.063351 accepted/tizen/wearable/20150707.063404 submit/tizen/20150707.004123 submit/tizen_common/20151015.190624 submit/tizen_common/20151019.135620 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
Mun, Gwan-gyeong [Mon, 6 Jul 2015 13:04:25 +0000 (22:04 +0900)]
remove manifest for security domain policy

Change-Id: I556117f4dca6c11e3477b3404244f5a8c17b1ede
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
9 years agoVIGS: add PRIME functions 31/39731/1 tizen_3.0.2015.q2_common accepted/tizen/common/20150527.165312 accepted/tizen/mobile/20150528.004115 accepted/tizen/tv/20150528.004051 accepted/tizen/wearable/20150528.004102 submit/tizen/20150527.114459
Vasiliy Ulyanov [Wed, 25 Feb 2015 14:42:59 +0000 (17:42 +0300)]
VIGS: add PRIME functions

Change-Id: I488c4529c1fb1f52aec9081cb6eb82c40d256dc3
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
9 years agoipptest: change result directory 89/37089/1 accepted/tizen/common/20150422.080159 accepted/tizen/mobile/20150423.002647 accepted/tizen/tv/20150422.102137 accepted/tizen/wearable/20150422.102850 submit/tizen/20150421.044349
Seung-Woo Kim [Thu, 19 Mar 2015 05:06:43 +0000 (14:06 +0900)]
ipptest: change result directory

This patch changes the directory where the result files are stored
as /tmp instead of /opt/media.

Change-Id: Ie66c7140f4ffa27d28df22f4c1888a8e0a2ee779
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agoexynos: remove DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls 09/34809/1 accepted/tizen_3.0.2014.q4_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common accepted/tizen/3.0.2014.q4/common/20150224.150708 accepted/tizen/common/20150209.120851 accepted/tizen/common/20150209.120958 accepted/tizen/mobile/20150210.015244 accepted/tizen/tv/20150211.042342 accepted/tizen/wearable/20150210.014731 submit/tizen/20150203.075405 submit/tizen/20150204.080651 submit/tizen/20150206.024952 submit/tizen/20150206.025423 submit/tizen_3.0.2014.q4_common/20150224.000000
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.

Change-Id: I22cc748362aa87e6b62049ff884b1c697d4dec64
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 08/34808/1
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.

Change-Id: I4ecf8006f0cb2316dab8f368fc6870f7eb1440b5
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 agoipptest: replace DRM_EXYNOS_GEM_MAP_OFFSET/MMAP with generic mmap 07/34807/1
Seung-Woo Kim [Tue, 3 Feb 2015 05:15:02 +0000 (14:15 +0900)]
ipptest: replace DRM_EXYNOS_GEM_MAP_OFFSET/MMAP with generic mmap

The DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP ioctls are
removed from the linux kernel because there is already generic way
to mmap gem. This patch replaces the ioctls from ipptest for fimc
and rotator to drm generic ioctl and mmap.

Change-Id: I49d6bfac511946a6ad7bb898e77d03a812774629
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agoAdd values for dsi connector and encoder 62/34362/1
Seung-Woo Kim [Mon, 26 Jan 2015 07:26:21 +0000 (16:26 +0900)]
Add values for dsi connector and encoder

This patch exports dsi definition in kernel header.
This patch should be skipped during libdrm_2.4.59 rebase.

Change-Id: I9c3d1e1a7802334a5bc209ec07c321913a87d227
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 years agoMerge "clean spec file" into tizen
Philippe Coval [Tue, 6 Jan 2015 13:31:01 +0000 (05:31 -0800)]
Merge "clean spec file" into tizen

9 years agopackaging: depend on the same release 24/32624/1
Philippe Coval [Fri, 19 Dec 2014 15:46:58 +0000 (16:46 +0100)]
packaging: depend on the same release

Change-Id: I02c7ff42eb688c6a6b03532966f2a16daad8910f
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: cleanup 23/32623/1
Philippe Coval [Fri, 19 Dec 2014 15:45:57 +0000 (16:45 +0100)]
packaging: cleanup

Change-Id: I2abfe475335ceeebfc8c3fb55f6c25e1aa349659
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoclean spec file 30/28530/5
Ronan Le Martret [Thu, 9 Oct 2014 08:53:15 +0000 (10:53 +0200)]
clean spec file

 - allow build for yocto
 - improve rpmlint score

Change-Id: I1d563567b30914925e67fd3aebf3a6cc5e65026a
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
9 years agoadd COPYING file 82/30182/1
Boram Park [Wed, 12 Nov 2014 12:14:08 +0000 (21:14 +0900)]
add COPYING file

Change-Id: I5ce242bea2bdd74f8c58d30da82e987eeb9a5c55

9 years agoUpdate to 2.4.58 tizen_3.0_ivi 2.4.58 accepted/tizen/common/20141020.081215 accepted/tizen/ivi/20141023.073721 submit/tizen/20141020.053709 submit/tizen/20141020.075607 submit/tizen_mobile/20141120.000000 tizen_3.0_ivi_release
Quanxian Wang [Mon, 20 Oct 2014 05:23:49 +0000 (13:23 +0800)]
Update to 2.4.58

Change-Id: I953e2dfa5f07fa512b73541171fc133d938b70be
Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
9 years agopackaging: add tools-exynos for testing exynos_drm
Chanho Park [Fri, 12 Sep 2014 09:27:05 +0000 (18:27 +0900)]
packaging: add tools-exynos for testing exynos_drm

This patch adds tools-exynos package to test fimg2d/ipp/rottest.

Change-Id: I8dbd821f056ac3f7e2a043a97d0c39bec7f75b40
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoVIGS: Implement plane flip/rotate
Stanislav Vorobiov [Fri, 22 Aug 2014 06:53:59 +0000 (10:53 +0400)]
VIGS: Implement plane flip/rotate

Planes can now be horizontally/vertically flipped
and rotated by 90, 180 or 270 degrees

Change-Id: I3db7dc3854add2b777e41aed54039a0d2323e0b1
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
9 years agolibdrm/exynos: add support for IPP blending, dithering, and colorfill
Hyungwon Hwang [Tue, 2 Sep 2014 07:58:30 +0000 (16:58 +0900)]
libdrm/exynos: add support for IPP blending, dithering, and colorfill

This patch adds the fields for IPP bleding, dithering, and colorfill.

Change-Id: Ib9cd7c7b22ee9f1017d1db3ae34d39dea342ffec
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
9 years agoVIGS: Support DP memory
Stanislav Vorobiov [Mon, 16 Jun 2014 15:51:14 +0000 (19:51 +0400)]
VIGS: Support DP memory

DP memory is used by some of the tizen
gstreamer plugins, TBM and X.Org video driver.
Its main purpose is to share GEM buffers between
media decoding and presentation layers

Change-Id: Ie377119b46d6033355bf6ce00adc01e36096742a
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
9 years agodrm: ipptest: support ipp dynamic color range
Donghwa Lee [Wed, 20 Aug 2014 01:11:22 +0000 (10:11 +0900)]
drm: ipptest: support ipp dynamic color range

This patch supports dynamic range for color space conversion.
COLOR_RANGE_LIMITED: selects narrow -> Y(16 to 235), Cb/Cr(16 to 240)
COLOR_RANGE_FULL: selects wide -> Y/Cb/Cr(0 to 255), Wide default

Change-Id: I94190ac3f3630904d2461e226d34378ac2b82b9d
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
9 years agopackaging: add libdrm-tools
Chanho Park [Fri, 1 Aug 2014 13:14:13 +0000 (22:14 +0900)]
packaging: add libdrm-tools

This patch adds libdrm-tools package which includes test utilities such
as modetest/modeprint.

Change-Id: Icc10b1c56625af7954823664156cfec8b7b57c3e
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoipptest: add fimc and rotator test applications
Inki Dae [Thu, 8 May 2014 12:03:20 +0000 (21:03 +0900)]
ipptest: add fimc and rotator test applications

This patch adds two applications to test fimc and rotator
device drivers.

These devices are controlled by IPP(Integrated Post Processor)
framework of Exynos drm, and this patch updates IPP relevant
header and includes relevant test applications.

Change-Id: I3a0384375a082855162f5821c000389e234d5c15
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agofixed arch check for libdrm-intel requires.
Andriy Prystupa [Wed, 21 May 2014 13:06:03 +0000 (16:06 +0300)]
fixed arch check for libdrm-intel requires.
Currently we have invalid requires for libdrm-intel for non-arm and non-intel arches.

Change-Id: I19c90a272da284f63c6d862a2e67e94f110a2807
Signed-off-by: Andriy Prystupa <andriy.prystupa@globallogic.com>
9 years agolibdrm_vigs: Support plane z-pos setting
Stanislav Vorobiov [Tue, 18 Feb 2014 13:02:45 +0000 (17:02 +0400)]
libdrm_vigs: Support plane z-pos setting

Change-Id: I2e1418425f1b4a17f49f19fabb8c4a2bdc84e5ef
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
9 years agolibdrm_vigs: Scanout flag added to surfaces
Stanislav Vorobiov [Mon, 10 Feb 2014 15:02:51 +0000 (19:02 +0400)]
libdrm_vigs: Scanout flag added to surfaces

Change-Id: Ib6f96d2542c3df0b78f7ef1b610bcc3fa0b678d6
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
9 years agolibdrm_vigs: Fence support added
Stanislav Vorobiov [Mon, 16 Dec 2013 16:03:38 +0000 (20:03 +0400)]
libdrm_vigs: Fence support added

VIGS kernel driver now supports fences, so
update libdrm to expose them to user space

Change-Id: I9c07084a357c0a8dc87c049e01238f9049ca0828
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
9 years agopackaging: build using upstream tags
Philippe Coval [Wed, 5 Mar 2014 15:08:50 +0000 (16:08 +0100)]
packaging: build using upstream tags

Change-Id: I1587634bfdd59172b7032cd968d0005261f1ad77
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoupdate to 2.4.52
Quanxian Wang [Fri, 14 Feb 2014 04:00:00 +0000 (12:00 +0800)]
update to 2.4.52

9 years agoRemove dependency on xorg-macros
Alex Wu [Thu, 21 Nov 2013 04:25:38 +0000 (12:25 +0800)]
Remove dependency on xorg-macros

libdrm didn't use any macros from xorg-macros, so remove it.

Change-Id: I37cda1f7bc48a2d0f98c9a319c78f8dca6b0f90c
Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
9 years agolibdrm_vigs added
jinhyung.jo [Thu, 26 Sep 2013 05:58:40 +0000 (14:58 +0900)]
libdrm_vigs added

Change-Id: Ie67c19bdb4a6f9e2190dbb4d3f825e878fca3635
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
9 years agoadd values for virtual connector and encoder
SooChan Lim [Mon, 23 Sep 2013 06:17:30 +0000 (15:17 +0900)]
add values for virtual connector and encoder

Change-Id: I09bbf2691cff9d43d5073918f4ce96b92f5f59e3

9 years agoUpdate to 2.4.45
Wang Quanxian [Tue, 9 Jul 2013 03:38:51 +0000 (11:38 +0800)]
Update to 2.4.45

9 years agoresetting manifest requested domain to floor
Alexandru Cornea [Fri, 28 Jun 2013 23:46:18 +0000 (02:46 +0300)]
resetting manifest requested domain to floor

9 years agoFixed groups, dependencies and rpmlint warnings
Anas Nashif [Wed, 26 Jun 2013 11:12:39 +0000 (07:12 -0400)]
Fixed groups, dependencies and rpmlint warnings

9 years agoDo not build slp module
Anas Nashif [Sun, 24 Mar 2013 14:05:05 +0000 (07:05 -0700)]
Do not build slp module

9 years agoslp support moved to libtbm
Anas Nashif [Sun, 24 Mar 2013 00:53:35 +0000 (17:53 -0700)]
slp support moved to libtbm

9 years agoFixed package groups
Anas Nashif [Tue, 19 Mar 2013 03:37:31 +0000 (20:37 -0700)]
Fixed package groups

9 years agoreadd baselibs.conf
Anas Nashif [Mon, 11 Feb 2013 16:17:34 +0000 (08:17 -0800)]
readd baselibs.conf

9 years agoadded baselibs for multi lib support( deleted by mistake)
Anas Nashif [Mon, 11 Feb 2013 16:17:09 +0000 (08:17 -0800)]
added baselibs for multi lib support( deleted by mistake)

9 years agoUpdate to 2.4.42
Anas Nashif [Mon, 11 Feb 2013 16:06:25 +0000 (08:06 -0800)]
Update to 2.4.42

9 years agodo not install libdrm_intel on ARM
Anas Nashif [Wed, 21 Nov 2012 14:25:24 +0000 (06:25 -0800)]
do not install libdrm_intel on ARM

9 years agodo not install libdrm_intel on ARM
Anas Nashif [Wed, 21 Nov 2012 14:01:16 +0000 (06:01 -0800)]
do not install libdrm_intel on ARM

9 years agodo not install libdrm_intel on ARM
Anas Nashif [Wed, 21 Nov 2012 13:33:07 +0000 (05:33 -0800)]
do not install libdrm_intel on ARM

9 years agoadd packaging
Anas Nashif [Tue, 13 Nov 2012 15:03:45 +0000 (07:03 -0800)]
add packaging

9 years agoconfigure.ac: bump version to 2.4.58 for release libdrm-2.4.58 upstream/2.4.58
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>
9 years agomore compile fix
Rob Clark [Sun, 28 Sep 2014 18:48:16 +0000 (14:48 -0400)]
more compile fix

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agofix compile error on 32bit systems
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>
9 years agoconfigure.ac: bump version to 2.4.57 for release 2.4.57 libdrm-2.4.57
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>
9 years agointel: use drm_mmap/drm_munmap wrappers
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>
9 years agofreedreno: use drm_mmap/drm_munmap wrappers
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>
9 years agoradeon: use drm_mmap/drm_munmap wrappers
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>
9 years agonouveau: use drm_mmap/drm_munmap wrappers
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>
9 years agolibkms: use drm_mmap/drm_munmap wrappers
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>
9 years agodrm: use drm_mmap/drm_munmap wrappers
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>
9 years agoAdd private mmap/munmap wrappers
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)
9 years agoautomake: pick up all files for distribution.
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>
9 years agomodetest: Add support of STI driver
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>
9 years agomodetest: add Android build
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)
9 years agomodetest: move sources lists to makefiles.sources
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>
9 years agolibkms: add Android build
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>
9 years agolibkms: move sources lists to makefile.sources
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>
9 years agolibkms: build the intel backend only when needed
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>
9 years agoconfigure: unconditionally check for atomic ops/primitives
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>
9 years agoautomake: fix 'make commit-headers'
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>
9 years agoRemove i810_drm.h and i830_drm.h from the distribution tarball
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>
9 years agoautomake: remove obsolete makefiles
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>
9 years agofreedreno: add dmabuf import/export helpers
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>
9 years agointel: Don't leak the test page in an has_userptr() error path
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>
9 years agointel: Adding locks for drm objects synchronization.
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>
9 years agointel: Add support for userptr objects
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)
9 years agointel: make drm_intel_gem_bo_get_reloc_count() thread safe
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>
9 years agointel: make bo_unreference() thread safe
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>
9 years agointel: make bufmgr_gem shareable from different API
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>
9 years agoatomic: add atomic_add_unless()
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>
9 years agofreedreno: fd_bo_from_handle() remove duplicate declaration
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>
9 years agoandroid: add CleanSpec.mk
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>
9 years agofreedreno: add Android build support
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>
9 years agonouveau: add Android build support
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>
9 years agoradeon: add Android build support
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>
9 years agolibdrm,intel: rework android header handling
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>
9 years agolibdrm,intel: Add Android build
Emil Velikov [Sun, 27 Jul 2014 16:27:50 +0000 (17:27 +0100)]
libdrm,intel: Add Android build

Contains the following patches squashed in:

    commit f340a8b9f2b84d5762553bef046914e0bde20795
    Author: Chad Versace <chad.versace@linux.intel.com>
    Date: Wed, 21 Dec 2011 11:43:57 -0800

        libdrm,intel: Add Android makefiles (v2)

        This enables libdrm.so and libdrm_intel.so to build on Android
        IceCreamSandwich.

        v2: Link libdrm_intel to libpciaccess.

        Change-Id: Ie5ed4bc0e6b4f9f819e3ec44488e385c35e97128
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
    commit 8fb3f42389dea34218ed1fe59550ec2abb4d6953
    Author: Andrew Boie <andrew.p.boie@intel.com>
    Date: Wed, 26 Sep 2012 13:32:05 -0700

        libdrm, libdrm_intel: Skip driver name checks

        These libraries have 'optional' tags, which means they won't get
        built unless something else depends on them or they are added to
        PRODUCT_PACKAGES. There's no need for additional filtering.

        Change-Id: I5d90969f38671f8144c0dc27d47144b3f09a15ce
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
9 years agolibdrm, freedreno, intel, nouveau, radeon: add Makefile.sources
Emil Velikov [Sun, 24 Aug 2014 18:26:14 +0000 (19:26 +0100)]
libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources

Will be used to consolidate the required sources lists as well as the
install-able headers. This is turn will help us to avoid the
duplication with the upcoming Android build support.

v2: Rename the headers variable to *_H_FILES.
v3: Rebase on top of symbol visibility patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agolibkms: remove explicit define _FILE_OFFSET_BITS 64
Emil Velikov [Sun, 27 Jul 2014 13:54:59 +0000 (14:54 +0100)]
libkms: remove explicit define _FILE_OFFSET_BITS 64

configure.ac has AC_SYS_LARGEFILE which provides the define and/or
approapriate magic when required.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoall: include config.h only when available and use its defines
Emil Velikov [Sun, 27 Jul 2014 13:46:45 +0000 (14:46 +0100)]
all: include config.h only when available and use its defines

... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoradeon: Fix surf->bankh init by default value when surf->tile_split == 0
Maks Naumov [Mon, 18 Aug 2014 19:59:35 +0000 (12:59 -0700)]
radeon: Fix surf->bankh init by default value when surf->tile_split == 0

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
9 years agoradeon: add new SI pci ids
Alex Deucher [Thu, 21 Aug 2014 15:06:33 +0000 (11:06 -0400)]
radeon: add new SI pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoradeon: add new CIK pci ids
Alex Deucher [Thu, 21 Aug 2014 15:04:51 +0000 (11:04 -0400)]
radeon: add new CIK pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoexynos: Use symbol visibility.
Maarten Lankhorst [Mon, 4 Aug 2014 09:23:52 +0000 (11:23 +0200)]
exynos: Use symbol visibility.

No changes to exported symbols.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
9 years agofreedreno: Use symbol visibility.
Maarten Lankhorst [Mon, 4 Aug 2014 09:23:20 +0000 (11:23 +0200)]
freedreno: Use symbol visibility.

Hiding fd_device_del_locked, and fd_cleanup_bo_cache.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
9 years agoomap: Use symbol visibility.
Maarten Lankhorst [Mon, 4 Aug 2014 09:22:33 +0000 (11:22 +0200)]
omap: Use symbol visibility.

No changes to exported symbols.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
9 years agodrm: Implement drmCheckModesettingSupported() for DragonFly
François Tigeot [Sat, 26 Jul 2014 11:39:58 +0000 (13:39 +0200)]
drm: Implement drmCheckModesettingSupported() for DragonFly

For the sake of simplicity, KMS support can always be considered
present on DragonFly.

If some particular version doesn't support KMS yet, appropriate
checks are already done in Dports's x11-drivers/ Makefiles and
KMS-enabled driver packages don't get built.

Signed-off-by: François Tigeot <ftigeot@wolfpond.org>
Signed-off-by: Maarten Lankhorst <dev@mblankhorst.nl>
9 years agointel: Use symbol visibility.
Maarten Lankhorst [Thu, 31 Jul 2014 13:07:27 +0000 (15:07 +0200)]
intel: Use symbol visibility.

No exports changed for this driver.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoradeon: Use symbol visibility.
Maarten Lankhorst [Thu, 31 Jul 2014 13:39:15 +0000 (15:39 +0200)]
radeon: Use symbol visibility.

All the bof_* symbols are now no longer exported.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
9 years agonouveau: Only export public functions.
Maarten Lankhorst [Thu, 31 Jul 2014 12:33:36 +0000 (14:33 +0200)]
nouveau: Only export public functions.

This hides all the abi16_* functions and the nouveau_debug variable,
they should have been private to begin with.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure: Support symbol visibility when available
Thierry Reding [Wed, 19 Feb 2014 14:56:50 +0000 (15:56 +0100)]
configure: Support symbol visibility when available

Checks whether or not the compiler supports the -fvisibility option. If
so it sets the VISIBILITY_CFLAGS variable which can be added to the per
directory AM_CFLAGS where appropriate.

By default all symbols will be hidden via the VISIBILITY_CFLAGS. The
drm_public macro can be used to mark symbols that should be exported.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoconfigure.ac: bump version to 2.4.56 for release 2.4.56 libdrm-2.4.56
Marek Olšák [Tue, 29 Jul 2014 16:54:33 +0000 (18:54 +0200)]
configure.ac: bump version to 2.4.56 for release

9 years agoradeon: fix typo in sample split / fixes MSAA on Hawaii
Marek Olšák [Sat, 26 Jul 2014 18:07:33 +0000 (20:07 +0200)]
radeon: fix typo in sample split / fixes MSAA on Hawaii

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agolibdrm: Fix drm.h include in qxl drm header file
Andreas Boll [Mon, 5 May 2014 21:28:23 +0000 (23:28 +0200)]
libdrm: Fix drm.h include in qxl drm header file

Use "drm.h" instead of "drm/drm.h" as used in the other header files.
Fixes xserver-xorg-video-qxl build with KMS support on Debian, where this
file is installed in /usr/include/libdrm.

Fixes Debian bug #746807

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agobump to version 2.4.55 for release libdrm-2.4.55
Maarten Lankhorst [Fri, 25 Jul 2014 13:08:23 +0000 (15:08 +0200)]
bump to version 2.4.55 for release