summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-31headers: Update drm.hfor-xexaxoDaniel Vetter1-26/+41
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>
2016-03-31headers: Update drm_mode.hDaniel Vetter1-51/+119
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>
2016-03-31headers: Update drm_fourcc.hDaniel Vetter1-4/+13
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>
2016-03-31headers: Update drm_sarea.hDaniel Vetter1-0/+2
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>
2016-03-31headers: Update drm_i915.hDaniel Vetter1-8/+35
Generated using make header_install. Generated fromd drm-intel-next-queued commit 55c561a708eec328822721233b1148119e80f5c3 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-30tests/kms-steal-crtc: Use correct includesDaniel Vetter1-0/+1
It was relying on drm_fourcc.h providing <stdint.h>, which is silly. Fix it. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-30headers: Remove _DRM_GEMDaniel Vetter1-1/+0
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>
2016-02-04android: enable building static version of libdrmSumit Semwal1-0/+19
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>
2016-02-04libkms: add libdrm to Requires.privateEmil Velikov1-0/+1
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>
2016-02-04radeon: add libdrm to Requires.privateEmil Velikov1-0/+1
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>
2016-02-04amdgpu: add libdrm as private requirement/dependencyEmil Velikov1-0/+1
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>
2016-02-03vc4: Add headers and .pc files for VC4 userspace development.Eric Anholt7-0/+742
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>
2016-02-03util: Add support for vc4.Eric Anholt1-0/+1
This lets allows using modetest for overlay plane testing. Signed-off-by: Eric Anholt <eric@anholt.net>
2016-02-03vc4: Add the DRM header file.Eric Anholt2-0/+280
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>
2016-01-27tests/kmstest: inverse the order of LDADD librariesEmil Velikov1-2/+2
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>
2016-01-26tests: Include poll.h rather than sys/poll.hKylie McClain2-2/+2
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>
2016-01-26tests: Include sys/select.hKhem Raj5-1/+13
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>
2016-01-26tests: util: Fixup util_open() parameter orderThierry Reding3-3/+3
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>
2016-01-26tests: add fsl-dcu-drm to modulesStefan Agner1-0/+1
Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-26kmstest: Use util_open()Stefan Agner2-17/+32
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>
2016-01-24configure.ac: don't detect disabled options dependenciesMarcin Ślusarz1-14/+22
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>
2016-01-22xf86drm: Bound strstr() to the allocated dataDamien Lespiau1-1/+2
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>
2016-01-21radeon: Pass radeon_bo_open flags to the DRM_RADEON_GEM_CREATE ioctlMichel Dänzer1-1/+1
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>
2016-01-20amdgpu: Add new symbols to amdgpu-symbols-checkMichel Dänzer1-0/+4
Fixes make check. Trivial.
2016-01-20amdgpu: list each entry safely for sw semaphore when submit ibJunwei Zhang1-2/+2
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>
2016-01-20tests/amdgpu: add semaphore testChunming Zhou1-0/+133
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>
2016-01-20amdgpu: add semaphore supportMarek Olšák3-4/+249
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>
2016-01-20amdgpu: validate user memory for userptrChunming Zhou1-1/+2
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2016-01-20amdgpu: drop address patching logicsmonk.liu1-10/+1
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>
2016-01-20configure.ac: disable annoying warning -Wmissing-field-initializersMarek Olšák2-3/+2
It warns for all "{}" initializers. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-07Fix memory leak with drmModeGetConnectorCurrent()Ville Syrjälä1-4/+7
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>
2016-01-06intel/kbl: Add Kabylake PCI idsRodrigo Vivi1-1/+56
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>
2015-12-22intel: Restore formatting of offsets in debug statementsMichał Winiarski1-9/+14
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>
2015-12-22Bump version for releaseBen Skeggs1-1/+1
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>
2015-12-22nouveau: clean up nouveau.h, noting deprecated members/functionsBen Skeggs1-113/+114
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>
2015-12-22nouveau: add support for newer kernel interfacesBen Skeggs2-7/+155
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>
2015-12-22nouveau: add new interface to create a nouveau_deviceBen Skeggs3-47/+89
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>
2015-12-22nouveau: remove nouveau_object_find()Ben Skeggs3-13/+0
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>
2015-12-22nouveau: make use of nouveau_drm::fd instead of nouveau_device::fdBen Skeggs3-31/+40
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>
2015-12-22nouveau: stack legacy nouveau_device on top of nouveau_drmBen Skeggs1-25/+21
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>
2015-12-22nouveau: introduce object to represent the kernel clientBen Skeggs3-0/+55
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>
2015-12-22nouveau: add interfaces to query information about supported classesBen Skeggs5-1/+117
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>
2015-12-22nouveau: add interface to call an object's methodsBen Skeggs3-0/+10
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>
2015-12-22nouveau: make it possible to init object in pre-allocated memoryBen Skeggs1-16/+48
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>
2015-12-22nouveau: move object functions up, to avoid future foward declsBen Skeggs1-56/+56
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>
2015-12-22nouveau: move more abi16-specific logic into abi16.cBen Skeggs3-58/+93
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>
2015-12-22nouveau: import and install a selection of nvif headers from the kernelBen Skeggs10-2/+473
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>
2015-12-18tests: remove missleading commentsStefan Agner1-14/+1
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>
2015-12-18vbltest: Use util_open()Thierry Reding2-21/+20
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>
2015-12-18proptest: Use util_open()Thierry Reding1-22/+38
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>