summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-27tegra: Implement drm_tegra_bo_{get,set}_flags()Thierry Reding
These two functions are simple wrappers around the corresponding IOCTLs and operate on drm_tegra_bo objects. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Add SET/GET_FLAGS IOCTLsThierry Reding
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>
2014-11-27tegra: Add GET/SET_TILING IOCTLsThierry Reding
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>
2014-11-27tegra: Add simple test for drm_tegra_open()Thierry Reding
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>
2014-11-27libdrm: Add NVIDIA Tegra supportThierry Reding
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>
2014-11-24update signed/object prop typesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: Print newline for empty blobsVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: alpha buffersRob Clark
Make upper-left corner for RGB32 buffers translucent, for testing blending of AR24 vs XR24. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24tests: add proptestPaulo Zanoni
A small program that allows us to see and modify properties. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: universal plane supportRob Clark
Minimal support, so we can at least dump properties of primary/cursor planes. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-22modetest: Use threads for cursors instead of SIGALRMJasper St. Pierre
This fixes an issue when trying to use -v and -C together. When trying to read the page flip event, we are interrupted by the SIGALRM that comes in, and so we think we timed out when we simply got EINTR. While we could just loop checking for EINTR, SIGALRM is just bad idea to begin with, so just rewrite it to use a thread. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-21intel: Avoid overcounting fences when emitting self-referential relocsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-20intel: Fix SIGSEGV in libdrm for heigth = 0 and width = 0Thomas Meyer
drm_intel_gem_bo_free() crashes because the list bo_gem->vma_list is not yet initialised, but the error path tries to free it. See also https://bugs.freedesktop.org/show_bug.cgi?id=75844 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-11-18freedreno: do handle lookup on handle and dmabuf importRob Clark
We also need to check handle_table in the _from_handle() path and the _from_dmabuf() (which goes through _from_handle()) to avoid duplicate imports. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-30intel/skl: add gen9 to the CS decoding initDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30intel/skl: Add gen9 to the buffer manager initDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30intel/skl: Add SKL PCI idsDamien Lespiau
v2: Add more PCI IDs (Michael H. Nguyen) v3: Synchronize one more with the kernel PCI IDs (Damien) Reviewed-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Michael H. Nguyen <michael.h.nguyen@intel.com>
2014-09-29radeon: Always multiply pitch_bytes by nsamples, not by slice_ptMichel Dänzer
slice_pt is tileb[0] / tile_split, which isn't directly related to the pitch. This caused pitch_bytes to be too large in some cases. [0] Tile size in bytes Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-09-28configure.ac: bump version to 2.4.58 for releaseRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-28more compile fixRob Clark
Signed-off-by: Rob Clark <robdclark@gmail.com>
2014-09-28fix compile error on 32bit systemsRob Clark
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>
2014-09-28configure.ac: bump version to 2.4.57 for releaseRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-28intel: use drm_mmap/drm_munmap wrappersEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28freedreno: use drm_mmap/drm_munmap wrappersEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28radeon: use drm_mmap/drm_munmap wrappersEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28nouveau: use drm_mmap/drm_munmap wrappersEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28libkms: use drm_mmap/drm_munmap wrappersEmil Velikov
... for all by exynos. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28drm: use drm_mmap/drm_munmap wrappersEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28Add private mmap/munmap wrappersEmil Velikov
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)
2014-09-28automake: pick up all files for distribution.Emil Velikov
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>
2014-09-28modetest: Add support of STI driverBenjamin Gaignard
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28modetest: add Android buildEmil Velikov
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)
2014-09-28modetest: move sources lists to makefiles.sourcesEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28libkms: add Android buildEmil Velikov
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28libkms: move sources lists to makefile.sourcesEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28libkms: build the intel backend only when neededEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28configure: unconditionally check for atomic ops/primitivesEmil Velikov
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>
2014-09-28automake: fix 'make commit-headers'Emil Velikov
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>
2014-09-28Remove i810_drm.h and i830_drm.h from the distribution tarballEmil Velikov
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>
2014-09-28automake: remove obsolete makefilesEmil Velikov
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>
2014-09-21freedreno: add dmabuf import/export helpersRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-19intel: Don't leak the test page in an has_userptr() error pathDamien Lespiau
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>
2014-09-19intel: Adding locks for drm objects synchronization.Rafal Sapala
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>
2014-09-17intel: Add support for userptr objectsTvrtko Ursulin
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)
2014-09-15intel: make drm_intel_gem_bo_get_reloc_count() thread safeLionel Landwerlin
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>
2014-09-15intel: make bo_unreference() thread safeLionel Landwerlin
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>
2014-09-15intel: make bufmgr_gem shareable from different APILionel Landwerlin
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>
2014-09-15atomic: add atomic_add_unless()Lionel Landwerlin
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>
2014-09-01freedreno: fd_bo_from_handle() remove duplicate declarationEmil Velikov
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>
2014-09-01android: add CleanSpec.mkEmil Velikov
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>