OSDN Git Service

android-x86/external-libdrm.git
7 years agoamdgpu: fix fence status query
Christian König [Thu, 2 Jun 2016 11:37:05 +0000 (13:37 +0200)]
amdgpu: fix fence status query

Not initializing the ip instance leads to sporadic fails in the tests.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
7 years agotests/amdgpu: adapt to new polaris10/11 uvd fw
Sonny Jiang [Thu, 12 May 2016 16:48:43 +0000 (12:48 -0400)]
tests/amdgpu: adapt to new polaris10/11 uvd fw

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agotests/amdgpu: add interface to adapt firmware requirement
Leo Liu [Thu, 17 Mar 2016 15:30:57 +0000 (11:30 -0400)]
tests/amdgpu: add interface to adapt firmware requirement

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agotests/amdgpu: expand write/copy tests to compute
Alex Deucher [Sat, 20 Feb 2016 00:28:23 +0000 (19:28 -0500)]
tests/amdgpu: expand write/copy tests to compute

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agotests/amdgpu: expand write/copy tests to compute
Alex Deucher [Sat, 20 Feb 2016 00:22:51 +0000 (19:22 -0500)]
tests/amdgpu: expand write/copy tests to compute

Uses same packets as gfx.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoBump version for release
Kenneth Graunke [Thu, 28 Apr 2016 00:52:50 +0000 (17:52 -0700)]
Bump version for release

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agointel/skl: Add missing SKL PCI IDs
Michał Winiarski [Wed, 17 Feb 2016 10:40:19 +0000 (11:40 +0100)]
intel/skl: Add missing SKL PCI IDs

Used by production devices:
    Intel(R) HD Graphics 510
    Intel(R) HD Graphics 535
    Intel(R) Iris(TM) Graphics 550
    Intel(R) Iris(TM) Graphics P555

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agofreedreno: add dummy fd_bo_from_fbdev implementation when KGSL is disabled
Nicolas Dechesne [Mon, 11 Apr 2016 14:50:23 +0000 (16:50 +0200)]
freedreno: add dummy fd_bo_from_fbdev implementation when KGSL is disabled

Make sure that this function is defined (even empty/dummy) when KGSL support is
disabled, since it's part of the driver i/f and it was reported to cause symbols
issues when building against musl libc implementation.

Reported-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoheaders: Update drm.h
Daniel Vetter [Wed, 30 Mar 2016 13:51:00 +0000 (15:51 +0200)]
headers: Update drm.h

This needs the kernel patch to make sure the C++ protection is in place.

Otherwise just new defines, using the right fixed-width types and
some shuffling in where stuff is defined (the DRM_CAP list moved, but
the #defines are the same).

Generated using make headers_install.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoheaders: Update drm_mode.h
Daniel Vetter [Wed, 30 Mar 2016 13:44:42 +0000 (15:44 +0200)]
headers: Update drm_mode.h

Generated using make headers_install.

Only cosmetics&new definitions here now.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoheaders: Update drm_fourcc.h
Daniel Vetter [Wed, 30 Mar 2016 13:39:12 +0000 (15:39 +0200)]
headers: Update drm_fourcc.h

Only real difference is switching to kernel types for fixed-width
integers, like we should.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoheaders: Update drm_sarea.h
Daniel Vetter [Wed, 30 Mar 2016 13:38:28 +0000 (15:38 +0200)]
headers: Update drm_sarea.h

Generated using make headers_install. Only difference is a new value
of SAREA_MAX for mips. Not that we ever shipped a dri1 driver on that
platform probably ...

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoheaders: Update drm_i915.h
Daniel Vetter [Wed, 30 Mar 2016 13:36:55 +0000 (15:36 +0200)]
headers: Update drm_i915.h

Generated using make header_install.

Generated fromd drm-intel-next-queued commit
55c561a708eec328822721233b1148119e80f5c3

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agotests/kms-steal-crtc: Use correct includes
Daniel Vetter [Wed, 30 Mar 2016 14:18:53 +0000 (16:18 +0200)]
tests/kms-steal-crtc: Use correct includes

It was relying on drm_fourcc.h providing <stdint.h>, which is silly.
Fix it.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agoheaders: Remove _DRM_GEM
Daniel Vetter [Wed, 30 Mar 2016 13:40:26 +0000 (15:40 +0200)]
headers: Remove _DRM_GEM

This was purely a kernel-internal type used in a early patch version
to add GEM bo mmap support. It was never used in-kernel in merged code
nor in userspace. Nuke it to align with kernel headers.

For reference the kernel patch:

commit 05f51722a154e73019434bd020e50ddb941046c5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Dec 11 11:34:32 2013 +0100

    drm/bufs: remove handling of _DRM_GEM mappings

    Gone with the new gem vma offset manager from David.

    We can also ditch the uapi header definition from the enum since
    userspace never used this. It ended up in there purely for historical
    reasons (for reusing the old drm mmap code essentially), not because
    userspace ever needed it.

Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agotegra: Sync with Linux kernel UAPI header
Thierry Reding [Thu, 31 Mar 2016 10:41:10 +0000 (12:41 +0200)]
tegra: Sync with Linux kernel UAPI header

Update the UAPI header to the latest version in the Linux kernel. This
changes the struct drm_tegra_gem_mmap to properly handle offsets on 64-
bit architectures.

See commit bdf765071a8b ("drm/tegra: gem: Return 64-bit offset for
mmap(2)") in the Linux kernel (as of v4.1).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoxf86drm: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:12 +0000 (19:48 +0100)]
xf86drm: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:11 +0000 (19:48 +0100)]
tests: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agointel: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:09 +0000 (19:48 +0100)]
intel: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agofreedreno: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:08 +0000 (19:48 +0100)]
freedreno: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoexynos: Fix spelling mistake
Eric Engestrom [Sun, 3 Apr 2016 18:48:07 +0000 (19:48 +0100)]
exynos: Fix spelling mistake

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoamdgpu: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:06 +0000 (19:48 +0100)]
amdgpu: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoproptest: print signed values correctly
Emil Velikov [Mon, 28 Mar 2016 21:15:03 +0000 (22:15 +0100)]
proptest: print signed values correctly

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agomodetest: print signed values correctly
Gustavo Padovan [Tue, 22 Mar 2016 21:42:52 +0000 (18:42 -0300)]
modetest: print signed values correctly

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agogitignore: ignore kms-steal-crtc and kms-universal-planes
Gustavo Padovan [Tue, 22 Mar 2016 21:42:51 +0000 (18:42 -0300)]
gitignore: ignore kms-steal-crtc and kms-universal-planes

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by; Emil Velikov <emil.l.velikov@gmail.com>

8 years agotests: add virtio_gpu to the driver list
Gustavo Padovan [Thu, 17 Mar 2016 21:42:25 +0000 (18:42 -0300)]
tests: add virtio_gpu to the driver list

modetest was failing to work with driver because it wasn't in the
module list.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agofreedreno: add support for FD_TIMESTAMP
Rob Clark [Tue, 23 Feb 2016 16:47:33 +0000 (11:47 -0500)]
freedreno: add support for FD_TIMESTAMP

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: update uapi
Rob Clark [Tue, 23 Feb 2016 16:39:53 +0000 (11:39 -0500)]
freedreno: update uapi

In drm-next.. needed for timestamp queries in mesa.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agointel: Adding missing Broxton PCI IDs.
Rodrigo Vivi [Wed, 2 Mar 2016 01:07:04 +0000 (17:07 -0800)]
intel: Adding missing Broxton PCI IDs.

These IDs were already part of the kernel since:

kernel commit 985dd4360fdf2533fe48a33a4a2094f2e4718dc0
Author: Imre Deak <imre.deak@intel.com>
Date:   Thu Jan 28 16:04:12 2016 +0200

    drm/i915/bxt: update list of PCIIDs

Cc: Venkateswarlu Vinjamuri <venkateswarlu.v.vinjamuri@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
8 years agoandroid: add virgl to be a valid driver
Chih-Wei Huang [Thu, 25 Feb 2016 16:41:53 +0000 (00:41 +0800)]
android: add virgl to be a valid driver

To avoid the warning:

external/libdrm/libkms/Android.mk:17: invalid GPU drivers: virgl

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agovmwgfx: update uapi
Thomas Hellstrom [Wed, 24 Feb 2016 09:08:28 +0000 (10:08 +0100)]
vmwgfx: update uapi

The libdrm shipped vmwgfx_drm.h is obsolete and incorrect.
Update it to latest kernel version.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
8 years agoamdgpu/tests: fix tests for asics with one VCE instance
Sonny Jiang [Thu, 18 Feb 2016 15:59:56 +0000 (10:59 -0500)]
amdgpu/tests: fix tests for asics with one VCE instance

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoadd libdrm_vc4.pc to .gitignore
Rob Clark [Mon, 15 Feb 2016 18:50:51 +0000 (13:50 -0500)]
add libdrm_vc4.pc to .gitignore

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoBump version for release
Rob Clark [Mon, 15 Feb 2016 18:42:51 +0000 (13:42 -0500)]
Bump version for release

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: add support for FD_MAX_FREQ
Rob Clark [Wed, 10 Feb 2016 17:27:33 +0000 (12:27 -0500)]
freedreno: add support for FD_MAX_FREQ

Only msm backend supports this.  Sorry, if you are using kgsl, no
time-elapsed query for you.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: small refactor for get_param
Rob Clark [Wed, 10 Feb 2016 17:26:55 +0000 (12:26 -0500)]
freedreno: small refactor for get_param

Will simplify next commit.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: update uapi
Rob Clark [Wed, 10 Feb 2016 17:26:20 +0000 (12:26 -0500)]
freedreno: update uapi

In drm-next.. needed for time-elapsed (and future perf ctrs) in mesa.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoamdgpu: fix for submition with no ibs
Ken Wang [Thu, 4 Feb 2016 05:52:22 +0000 (13:52 +0800)]
amdgpu: fix for submition with no ibs

Avoid a crash if no IBs are specified.

Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp dma copy
Alex Deucher [Wed, 3 Feb 2016 23:59:33 +0000 (18:59 -0500)]
tests/amdgpu: add a test for cp dma copy

Use the CP to copy data between buffers

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_copy_linear generic
Alex Deucher [Wed, 3 Feb 2016 23:55:20 +0000 (18:55 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_copy_linear generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp dma fill
Alex Deucher [Wed, 3 Feb 2016 23:52:18 +0000 (18:52 -0500)]
tests/amdgpu: add a test for cp dma fill

Use the CP to fill to memory.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_const_fill generic
Alex Deucher [Wed, 3 Feb 2016 23:38:50 +0000 (18:38 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_const_fill generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp write data
Alex Deucher [Wed, 3 Feb 2016 23:33:45 +0000 (18:33 -0500)]
tests/amdgpu: add a test for cp write data

Use the CP to write data to memory.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_write_linear generic
Alex Deucher [Thu, 4 Feb 2016 17:23:43 +0000 (12:23 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_write_linear generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_sdma_test_exec_cs() generic (v2)
Alex Deucher [Wed, 3 Feb 2016 23:14:48 +0000 (18:14 -0500)]
tests/amdgpu: make amdgpu_sdma_test_exec_cs() generic (v2)

Share with upcoming CP tests.

v2: drop unnecessary forward declaration

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoandroid: enable building static version of libdrm
Sumit Semwal [Fri, 29 Jan 2016 16:00:47 +0000 (10:00 -0600)]
android: enable building static version of libdrm

Android needs libdrm built statically for recovery;
enable that as well.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agolibkms: add libdrm to Requires.private
Emil Velikov [Thu, 28 Jan 2016 11:39:03 +0000 (11:39 +0000)]
libkms: add libdrm to Requires.private

Analogous to last two changes (amdgpu and radeon).

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeon: add libdrm to Requires.private
Emil Velikov [Thu, 28 Jan 2016 11:33:34 +0000 (11:33 +0000)]
radeon: add libdrm to Requires.private

Equivalent to the amdgpu commit before. Additionally, when libdrm is
installed to a 'non-default' location, users of libdrm_radeon will fail
to build, as radeon_cs.h (and maybe others) won't have their
dependencies (drm.h radeon_drm.h) fulfilled.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoamdgpu: add libdrm as private requirement/dependency
Emil Velikov [Thu, 28 Jan 2016 11:26:24 +0000 (11:26 +0000)]
amdgpu: add libdrm as private requirement/dependency

Otherwise libdrm.so won't end up in the --libs, when one static links
libdrm_amdgpu.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agovc4: Add headers and .pc files for VC4 userspace development.
Eric Anholt [Mon, 25 Jan 2016 18:16:56 +0000 (10:16 -0800)]
vc4: Add headers and .pc files for VC4 userspace development.

The headers were originally written in Mesa, imported to the kernel,
and improved upon in vc4-gpu-tools.  These come from the v-g-t copies
and will replace the Mesa and v-g-t copies, and hopefully be used from
new tests in igt, as well.

v2: Fix linking against libdrm_intel instead of libdrm.
v3: Drop Libs and Cflags since they'll be inherited from libdrm.
v4: Switch to Requires.private.  I was wrong about standard practice,
    apparently only Intel was doing plain Requires (sorry to all
    involved).

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoutil: Add support for vc4.
Eric Anholt [Sat, 23 Jan 2016 00:37:25 +0000 (16:37 -0800)]
util: Add support for vc4.

This lets allows using modetest for overlay plane testing.

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agovc4: Add the DRM header file.
Eric Anholt [Sat, 23 Jan 2016 00:34:14 +0000 (16:34 -0800)]
vc4: Add the DRM header file.

I'll build some libdrm C code soon, but for now this lets libdrm users
use vc4 ioctls.  Produced from headers_install of
1df59b8497f47495e873c23abd6d3d290c730505 (drm-next) in the kernel.

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agotests/kmstest: inverse the order of LDADD libraries
Emil Velikov [Wed, 27 Jan 2016 11:59:43 +0000 (11:59 +0000)]
tests/kmstest: inverse the order of LDADD libraries

The utils library depends on libdrm. Flip the order, orderwise we might
error during link stage like below:

  CC       main.o
  CCLD     kmstest
/usr/bin/ld: ../../tests/util/.libs/libutil.a(libutil_la-kms.o):
undefined reference to symbol 'drmOpen'

Reported-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Include poll.h rather than sys/poll.h
Kylie McClain [Wed, 20 Jan 2016 03:27:28 +0000 (22:27 -0500)]
tests: Include poll.h rather than sys/poll.h

sys/poll.h is a non-standard location of the poll.h header, and is
incorrect on non-glibc libcs. poll.h, however, is defined in SUS (v2)
and is more portable.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93764
http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Include sys/select.h
Khem Raj [Wed, 20 Jan 2016 05:35:11 +0000 (05:35 +0000)]
tests: Include sys/select.h

Used in compliance with POSIX 2001/2008

Fixes errors e.g.
error: implicit declaration of function 'select'

and helps with missing definitions of FD_* defines

v2: conditionally include sys/select.h, include in every test where
needed.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com> (v1)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: util: Fixup util_open() parameter order
Thierry Reding [Tue, 5 Jan 2016 14:21:23 +0000 (15:21 +0100)]
tests: util: Fixup util_open() parameter order

util_open() takes a device parameter, followed by a module parameter.
The existing tests used the drmOpen() function, which uses a different
ordering of the parameters, and the old ordering was accidentally kept
during the conversion.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: add fsl-dcu-drm to modules
Stefan Agner [Sun, 20 Dec 2015 05:52:59 +0000 (21:52 -0800)]
tests: add fsl-dcu-drm to modules

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agokmstest: Use util_open()
Stefan Agner [Sun, 20 Dec 2015 05:52:58 +0000 (21:52 -0800)]
kmstest: Use util_open()

Use the new util_open() helper instead of open-coding the method for
finding a usable device. While at it, make the command-line interface
more consistent with that of modetest by adding the -D and -M options.

Signed-off-by: Stefan Agner <stefan@agner.ch>
v2: correctly use util_open() - swap device, module
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoconfigure.ac: don't detect disabled options dependencies
Marcin Ślusarz [Sun, 24 Jan 2016 12:17:34 +0000 (13:17 +0100)]
configure.ac: don't detect disabled options dependencies

Currently with --disable-amdgpu --disable-valgrind --disable-cairo-tests
cunit, valgrind and cairo are still detected.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoxf86drm: Bound strstr() to the allocated data
Damien Lespiau [Fri, 22 Jan 2016 12:41:55 +0000 (12:41 +0000)]
xf86drm: Bound strstr() to the allocated data

We are reading at most sizeof(data) bytes, but then data may not contain
a terminating '\0', at least in theory, so strstr() may overflow the
stack allocated array.

Make sure that data always contains at least one '\0'.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
8 years agoradeon: Pass radeon_bo_open flags to the DRM_RADEON_GEM_CREATE ioctl
Michel Dänzer [Thu, 21 Jan 2016 09:08:49 +0000 (18:08 +0900)]
radeon: Pass radeon_bo_open flags to the DRM_RADEON_GEM_CREATE ioctl

Not doing so makes it impossible for radeon_bo_open callers to set any
RADEON_GEM_* flags for the newly created BO.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoamdgpu: Add new symbols to amdgpu-symbols-check
Michel Dänzer [Wed, 20 Jan 2016 06:59:08 +0000 (15:59 +0900)]
amdgpu: Add new symbols to amdgpu-symbols-check

Fixes make check.

Trivial.

8 years agoamdgpu: list each entry safely for sw semaphore when submit ib
Junwei Zhang [Tue, 8 Dec 2015 00:34:55 +0000 (08:34 +0800)]
amdgpu: list each entry safely for sw semaphore when submit ib

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agotests/amdgpu: add semaphore test
Chunming Zhou [Mon, 10 Aug 2015 09:08:25 +0000 (17:08 +0800)]
tests/amdgpu: add semaphore test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoamdgpu: add semaphore support
Marek Olšák [Tue, 12 Jan 2016 21:13:07 +0000 (22:13 +0100)]
amdgpu: add semaphore support

the semaphore is a binary semaphore. the work flow is:
1. create sem
2. signal sem
3. wait sem, reset sem after signalled
4. destroy sem.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoamdgpu: validate user memory for userptr
Chunming Zhou [Mon, 30 Nov 2015 06:08:07 +0000 (14:08 +0800)]
amdgpu: validate user memory for userptr

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoamdgpu: drop address patching logics
monk.liu [Tue, 25 Aug 2015 08:53:07 +0000 (16:53 +0800)]
amdgpu: drop address patching logics

we don't support non-page-aligned cpu pointer anymore

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoconfigure.ac: disable annoying warning -Wmissing-field-initializers
Marek Olšák [Tue, 12 Jan 2016 21:09:24 +0000 (22:09 +0100)]
configure.ac: disable annoying warning -Wmissing-field-initializers

It warns for all "{}" initializers.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agoFix memory leak with drmModeGetConnectorCurrent()
Ville Syrjälä [Tue, 15 Dec 2015 12:18:32 +0000 (14:18 +0200)]
Fix memory leak with drmModeGetConnectorCurrent()

drmModeGetConnectorCurrent() must provide temporary storage for the
kernel to fill in at least one mode (asking for !=0 modes is how
you prevent the heavyweight probe in the kernel). Currently we malloc
that temp storage but we fail to free it before overwriting the
pointer with the address of the actual storage we use to store the
real mode list we get from the kernel in the second ioctl call.

Let's just keep the temporary storage on the stack and thus we avoid the
leak and also eliminate some pointless mallocs.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 5ed5fa10600f ("mode: Retrieve only the current information for a Connector")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agointel/kbl: Add Kabylake PCI ids
Rodrigo Vivi [Fri, 18 Sep 2015 18:26:39 +0000 (11:26 -0700)]
intel/kbl: Add Kabylake PCI ids

Also, following kernel definition Kabylake is skylake.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
8 years agointel: Restore formatting of offsets in debug statements
Michał Winiarski [Tue, 15 Dec 2015 15:28:55 +0000 (16:28 +0100)]
intel: Restore formatting of offsets in debug statements

Using lower_32_bits and upper_32_bits macros was accidentally dropped in:

    commit 8b4d57e7b75cb0bd01d11ad7f597909034a316aa
    Author: Michał Winiarski <michal.winiarski@intel.com>
    Date:   Wed Sep 9 16:07:10 2015 +0200

intel: Add support for softpin

Let's restore previous, more readable format.

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoBump version for release
Ben Skeggs [Tue, 24 Nov 2015 01:57:39 +0000 (11:57 +1000)]
Bump version for release

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: clean up nouveau.h, noting deprecated members/functions
Ben Skeggs [Wed, 25 Nov 2015 22:24:55 +0000 (08:24 +1000)]
nouveau: clean up nouveau.h, noting deprecated members/functions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: add support for newer kernel interfaces
Ben Skeggs [Tue, 24 Nov 2015 03:08:21 +0000 (13:08 +1000)]
nouveau: add support for newer kernel interfaces

v2.
- leave client-provided pointer unmodified on sclass_get() failure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: add new interface to create a nouveau_device
Ben Skeggs [Tue, 24 Nov 2015 01:21:05 +0000 (11:21 +1000)]
nouveau: add new interface to create a nouveau_device

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: remove nouveau_object_find()
Ben Skeggs [Fri, 27 Nov 2015 00:16:13 +0000 (10:16 +1000)]
nouveau: remove nouveau_object_find()

No more internal users, and there's never been external users.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: make use of nouveau_drm::fd instead of nouveau_device::fd
Ben Skeggs [Tue, 24 Nov 2015 01:00:53 +0000 (11:00 +1000)]
nouveau: make use of nouveau_drm::fd instead of nouveau_device::fd

The latter is deprecated, and will not be valid for newer clients.

v2.
- split out nouveau_object_find removal

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: stack legacy nouveau_device on top of nouveau_drm
Ben Skeggs [Tue, 24 Nov 2015 00:45:01 +0000 (10:45 +1000)]
nouveau: stack legacy nouveau_device on top of nouveau_drm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: introduce object to represent the kernel client
Ben Skeggs [Tue, 24 Nov 2015 00:33:56 +0000 (10:33 +1000)]
nouveau: introduce object to represent the kernel client

Because NVIF intentionally lacks some of the paths necessary to be
compatible with various mistakes we've made over the years, libdrm
needs to know whether a client has been updated and that it's safe
to make use of the new kernel interfaces.

Clients still using nouveau_device_open()/wrap() will be forced to
make use of ABI16 instead of NVIF.

v2.
- remove lib_version, nothing used it
- leave client-provided pointer unmodified on failure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: add interfaces to query information about supported classes
Ben Skeggs [Tue, 24 Nov 2015 00:10:04 +0000 (10:10 +1000)]
nouveau: add interfaces to query information about supported classes

This will expose functionality supported by newer kernel interfaces.

Current userspace uses the chipset to determine which classes are likely
exposed, which generally works pretty well, but isn't as flexible as it
could be.

Unfortunately, the G98:GF100 video code in Mesa is still relying on the
kernel exposing incorrect vdec classes on some chipsets.  The ABI16
kernel interfaces have a workaround for this in place, but that will no
longer be available once libdrm supports NVIF.

To prevent a regression when NVIF support is added, if there's no kernel
support for NVIF, libdrm will magic up a class list containing correct
vdec classes anyway instead of failing with -ENODEV.

v2.
- add description of abi16/vdec workaround
- add description of sclass/mclass
- leave client-provided pointer unmodified on abi16_sclass() failure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: add interface to call an object's methods
Ben Skeggs [Mon, 23 Nov 2015 23:58:39 +0000 (09:58 +1000)]
nouveau: add interface to call an object's methods

This will expose functionality supported by newer kernel interfaces,
giving access to things such as ZBC controls, perfmon, etc.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: make it possible to init object in pre-allocated memory
Ben Skeggs [Mon, 23 Nov 2015 23:28:23 +0000 (09:28 +1000)]
nouveau: make it possible to init object in pre-allocated memory

Required for an upcoming patch, not exposed to library clients.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: move object functions up, to avoid future foward decls
Ben Skeggs [Tue, 24 Nov 2015 04:36:48 +0000 (14:36 +1000)]
nouveau: move object functions up, to avoid future foward decls

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: move more abi16-specific logic into abi16.c
Ben Skeggs [Mon, 23 Nov 2015 23:17:52 +0000 (09:17 +1000)]
nouveau: move more abi16-specific logic into abi16.c

v2.
- add a comment about the (ab)use of nouveau_object::length
- add a comment about abi16_object() return values
v3.
- handle new client + old kernel for sw classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonouveau: import and install a selection of nvif headers from the kernel
Ben Skeggs [Thu, 29 Oct 2015 23:27:13 +0000 (09:27 +1000)]
nouveau: import and install a selection of nvif headers from the kernel

This commit also modifies the install path of the main libdrm_nouveau
header to be under a nouveau/ subdirectory.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: remove missleading comments
Stefan Agner [Fri, 18 Dec 2015 08:14:49 +0000 (00:14 -0800)]
tests: remove missleading comments

The comment has been copied from modetest and is not applicable
for vbltest.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agovbltest: Use util_open()
Thierry Reding [Wed, 9 Dec 2015 17:37:48 +0000 (18:37 +0100)]
vbltest: Use util_open()

Use the new util_open() helper instead of open-coding the method for
finding a usable device. While at it, this adds -D and -M command-line
options to vbltest to make its usage more consistent with its siblings
modetest and proptest.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoproptest: Use util_open()
Thierry Reding [Wed, 9 Dec 2015 17:37:47 +0000 (18:37 +0100)]
proptest: Use util_open()

Use the new util_open() helper instead of open-coding the method for
finding a usable device. While at it, make the command-line interface
more consistent with that of modetest by adding the -D and -M options.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agomodetest: Use util_open()
Thierry Reding [Wed, 9 Dec 2015 17:37:46 +0000 (18:37 +0100)]
modetest: Use util_open()

Use the new util_open() helper instead of open-coding the method for
finding a usable device.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Add helper to open a device/module
Thierry Reding [Wed, 9 Dec 2015 17:37:45 +0000 (18:37 +0100)]
tests: Add helper to open a device/module

The new function util_open() encapsulates the standard method employed
by tests to open a device or module. There is a verbatim copy of this in
almost all test programs, with slight variations in the list of modules.
Moving this code into a common helper allows code reuse and makes tests
more consistent.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: kms: Implement universal planes test
Thierry Reding [Wed, 9 Dec 2015 17:37:44 +0000 (18:37 +0100)]
tests: kms: Implement universal planes test

This small program allows universal planes to be tested. Currently this
isn't very flexible because it allows only the first plane of a given
type to be tested on the first CRTC. However it should be simple to
extend this with some additional command-line arguments.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: kms: Implement CRTC stealing test
Thierry Reding [Wed, 9 Dec 2015 17:37:43 +0000 (18:37 +0100)]
tests: kms: Implement CRTC stealing test

This test program sets a mode and framebuffer on a connector and cycles
through all CRTCs, moving the connector to each of them in turn. This is
useful to verify that CRTC stealing is properly handled in the DRM core
and drivers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
8 years agotests: Add libkms-test library
Thierry Reding [Wed, 9 Dec 2015 17:37:42 +0000 (18:37 +0100)]
tests: Add libkms-test library

This library contains abstractions for KMS that help remove the need for
a lot of boilerplate in KMS test programs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoproptest: Add Android support
Thierry Reding [Wed, 9 Dec 2015 17:37:41 +0000 (18:37 +0100)]
proptest: Add Android support

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Move name tables to libutil
Thierry Reding [Wed, 9 Dec 2015 17:37:40 +0000 (18:37 +0100)]
tests: Move name tables to libutil

These tables are duplicated in several places, so move them into libutil
so that they can be shared.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Split helpers into library
Thierry Reding [Wed, 9 Dec 2015 17:37:39 +0000 (18:37 +0100)]
tests: Split helpers into library

Some of the helpers, such as the pattern drawing helpers or the format
lookup helpers, have potential to be reused. Move them into a separate
library to make it easier to share them.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoexynos: bump version number
Tobias Jakobi [Mon, 30 Nov 2015 03:12:21 +0000 (12:12 +0900)]
exynos: bump version number

The Exynos API was extended quite a bit, so reflect this in the
version number.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
8 years agotests/exynos: add test for g2d_move
Tobias Jakobi [Mon, 30 Nov 2015 03:12:20 +0000 (12:12 +0900)]
tests/exynos: add test for g2d_move

To check if g2d_move() works properly we create a small checkerboard
pattern in the center of the screen and then shift this pattern
around with g2d_move(). The pattern should be properly preserved
by the operation (but not the surrounding area).

Tested-by: Hyungwon Hwang <human.hwang@samsung.com>
Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
[Emil Velikov: add g2d_move to the symbol check]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoexynos/fimg2d: add g2d_move
Tobias Jakobi [Mon, 30 Nov 2015 03:12:19 +0000 (12:12 +0900)]
exynos/fimg2d: add g2d_move

We already have g2d_copy() which implements G2D copy
operations from one buffer to another. However we can't
do a overlapping copy operation in one buffer.

Add g2d_move() which acts like the standard memmove()
and properly handles overlapping copies.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
8 years agoexynos: fimg2d: add g2d_set_direction
Tobias Jakobi [Mon, 30 Nov 2015 03:12:18 +0000 (12:12 +0900)]
exynos: fimg2d: add g2d_set_direction

This allows setting the two direction registers, which specify how
the engine blits pixels. This can be used for overlapping blits,
which happen e.g. when 'moving' a rectangular region inside a
fixed buffer.

Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>