summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* drm/tegra: Add SET/GET_FLAGS IOCTLsbaserock/jjardon/drm_2.4.58/jetsonbaserock/drm_2.4.58/jetsonThierry Reding2014-11-211-0/+21
| | | | | | | | | The DRM_TEGRA_GEM_SET_FLAGS IOCTL can be used to set the flags of a buffer object after it has been allocated or imported. Flags associated with a buffer object can be queried using the DRM_TEGRA_GEM_GET_FLAGS IOCTL. Signed-off-by: Thierry Reding <treding@nvidia.com>
* libdrm: tegra: Add GET/SET_TILING IOCTLsThierry Reding2014-11-211-0/+25
| | | | | | | | | | | | | | | | Currently the tiling parameters of buffer objects can only be set at allocation time, and only a single tiled mode is supported. This new DRM_TEGRA_GEM_SET_TILING IOCTL allows more modes to be set and also allows the tiling mode to be changed after the allocation. This will enable the Tegra DRM driver to import buffers from a GPU and directly scan them out by configuring the display controller appropriately. To complement this, the DRM_TEGRA_GEM_GET_TILING IOCTL can query the current tiling mode of a buffer object. This is necessary when importing buffers via handle (as is done in Mesa for example) so that userspace can determine the proper parameters for the 2D or 3D engines. Signed-off-by: Thierry Reding <treding@nvidia.com>
* libdrm: Make indentation consistentThierry Reding2014-11-211-2/+2
| | | | Signed-off-by: Thierry Reding <treding@nvidia.com>
* libdrm: Remove gratuitous blank linesThierry Reding2014-11-211-11/+0
| | | | | | | Usage of blank lines can be a matter of taste, of course, but for these we can surely all agree that they're not needed and inconsistent. Signed-off-by: Thierry Reding <treding@nvidia.com>
* WIP: VIC testThierry Reding2014-11-212-1/+103
|
* WIP: Add VIC supportThierry Reding2014-11-213-0/+6
|
* libdrm: valgrind-clear a few more IOCTL argumentsThierry Reding2014-11-211-0/+2
| | | | | | Fixes a few complaints raised by valgrind when running the Tegra tests. Signed-off-by: Thierry Reding <treding@nvidia.com>
* tegra: Add gr2d-fill testThierry Reding2014-11-213-0/+148
| | | | | | | | | | This test uses the IOCTLs for job submission and fences to fill a sub- region of the screen to a specific color using gr2d. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v2: - free framebuffer when done
* tegra: Add helper library for testsThierry Reding2014-11-215-1/+524
| | | | | | | | | | | | | This library provides helpers for common functionality needed by test programs. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v3: - fix libdrm-test.la link failure Changes in v2: - fix a couple of memory leaks and get rid of some unneeded code
* tegra: Add channel, job, pushbuf and fence APIsThierry Reding2014-11-218-0/+713
| | | | | | | | | | | | | These functions can be used to open channels to engines, manage job submissions, create push buffers to store command streams in and wait until jobs have been completed. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v2: - automatically allocate buffer objects as required by pushbuffers - pushbuffers can now have more than one associated buffer object - add drm_tegra_pushbuf_prepare() function
* tegra: Add simple test for drm_tegra_open()Thierry Reding2014-11-215-0/+91
| | | | | | | | | | This test opens a device, dumps the version information and checks that a Tegra DRM context can be opened on it. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v2: - fix in-tree build failure
* libdrm: Add NVIDIA Tegra supportThierry Reding2014-11-2112-4/+561
| | | | | | | | | | | | | | | | | Add the libdrm_tegra helper library to encapsulate Tegra-specific interfaces to the DRM. Furthermore, Tegra is added to the list of supported chips in the modetest and vbltest programs. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v3: - remove extraneous padding from struct drm_tegra_submit - add missing PTHREADSTUBS_CFLAGS - distribute private.h header
* configure.ac: bump version to 2.4.58 for releaselibdrm-2.4.582.4.58Rob Clark2014-09-281-1/+1
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* more compile fixRob Clark2014-09-281-0/+4
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* fix compile error on 32bit systemsRob Clark2014-09-2813-0/+52
| | | | | | | | | | | | 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>
* configure.ac: bump version to 2.4.57 for releaselibdrm-2.4.572.4.57Rob Clark2014-09-281-1/+1
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* intel: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-282-10/+9
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* freedreno: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-284-6/+5
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* radeon: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-283-6/+3
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* nouveau: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-281-3/+3
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-285-18/+16
| | | | | | | ... for all by exynos. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* drm: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-281-4/+4
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* Add private mmap/munmap wrappersEmil Velikov2014-09-281-0/+55
| | | | | | | | | | | | | | 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)
* automake: pick up all files for distribution.Emil Velikov2014-09-287-4/+11
| | | | | | | | 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>
* modetest: Add support of STI driverBenjamin Gaignard2014-09-281-1/+1
| | | | Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* modetest: add Android buildEmil Velikov2014-09-282-1/+16
| | | | | | | | | 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)
* modetest: move sources lists to makefiles.sourcesEmil Velikov2014-09-282-4/+9
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: add Android buildEmil Velikov2014-09-282-1/+55
| | | | | | Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: move sources lists to makefile.sourcesEmil Velikov2014-09-282-11/+32
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: build the intel backend only when neededEmil Velikov2014-09-283-6/+18
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* configure: unconditionally check for atomic ops/primitivesEmil Velikov2014-09-281-85/+82
| | | | | | | | | | | 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>
* automake: fix 'make commit-headers'Emil Velikov2014-09-281-2/+2
| | | | | | | | 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>
* Remove i810_drm.h and i830_drm.h from the distribution tarballEmil Velikov2014-09-283-624/+1
| | | | | | | | | | | | | | | | 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>
* automake: remove obsolete makefilesEmil Velikov2014-09-287-59/+31
| | | | | | | | 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>
* freedreno: add dmabuf import/export helpersRob Clark2014-09-213-0/+46
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* intel: Don't leak the test page in an has_userptr() error pathDamien Lespiau2014-09-191-3/+2
| | | | | | | | 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>
* intel: Adding locks for drm objects synchronization.Rafal Sapala2014-09-191-4/+24
| | | | | | | | | | 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>
* intel: Add support for userptr objectsTvrtko Ursulin2014-09-174-1/+193
| | | | | | | | | | | | | | | | 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)
* intel: make drm_intel_gem_bo_get_reloc_count() thread safeLionel Landwerlin2014-09-151-0/+7
| | | | | | 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>
* intel: make bo_unreference() thread safeLionel Landwerlin2014-09-151-3/+8
| | | | | | 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>
* intel: make bufmgr_gem shareable from different APILionel Landwerlin2014-09-151-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* atomic: add atomic_add_unless()Lionel Landwerlin2014-09-151-0/+9
| | | | | | 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>
* freedreno: fd_bo_from_handle() remove duplicate declarationEmil Velikov2014-09-011-3/+0
| | | | | | | | | 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>
* android: add CleanSpec.mkEmil Velikov2014-09-011-0/+3
| | | | | | | | | | 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>
* freedreno: add Android build supportEmil Velikov2014-09-012-0/+31
| | | | | | v2 Rename the headers variable(s) to *_H_FILES. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add Android build supportEmil Velikov2014-09-012-0/+31
| | | | | | v2 Rename the headers variable(s) to *_H_FILES. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* radeon: add Android build supportEmil Velikov2014-09-012-1/+36
| | | | | | v2 Rename the headers variable(s) to *_H_FILES. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* libdrm,intel: rework android header handlingEmil Velikov2014-09-012-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libdrm,intel: Add Android buildEmil Velikov2014-09-012-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libdrm, freedreno, intel, nouveau, radeon: add Makefile.sourcesEmil Velikov2014-09-0112-84/+120
| | | | | | | | | | | 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>