summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-29exynos: fimg2d: fix return codesTobias Jakobi
Even if flushing the command buffer doesn't succeed, the G2D calls would still return zero. Fix this by just passing the flush return code. In fact error handling currently ignores the fact that g2d_add_cmd() can fail. This is going to be handled in a later patch. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29configure: Add flag to disable valgrind support.Matt Turner
v2 [Emil Velikov]: Autodetect valgrind. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29xf86drmMode: include config.h before anything elseEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29xf86drmMode: remove unused valgrind(VG) macrosEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29Add blob property create/destroy ioctl wrappersDaniel Stone
v2: Use memclear to zero out structure. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
2015-06-29Support atomic modesetting ioctlVille Syrjälä
Add support for the atomic modesetting ioctl through a property-set API. v1: Squashed intermediate patches from Ville, Rob and myself. Updated for current kernel interface (no blobs). v2: Rewrite user-facing API to provide transactional/cursor interface. Use memclear to zero out ioctl. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org> Signed-off-by: Daniel Stone <daniels@collabora.com> v3 [Emil Velikov]: Remove DRM_CAP_ATOMIC - superseded by DRM_CLIENT_CAP_ATOMIC. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29Revert "Add device enumeration interface (v4)"Emil Velikov
This reverts commit fde4969176822fe54197b6baa78f8b0ef900baba. The commit adds an API that does not seem flexible enough to be used in current open-source projects. Additionally it adds a hidden dependency of libudev, which when used in mesa caused grief when combined with Steam('s runtime). Let's revert this for now and add a tweaked API later on that can be used in mesa/xserver. Cc: Frank Min <frank.min@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-21nouveau: add asserts to make sure krefs are thereIlia Mirkin
This should help catch odd bugs at the callsites rather than much later on with completely bogus bo indices. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-05-28tests/kmstest: support atmel-hlcdcBoris BREZILLON
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2015-05-28modetest: add atmel-hlcdc driver supportBoris BREZILLON
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2015-05-28modetest: only select plane with matching formatTobias Jakobi
Don't assume that a plane supports any kind of pixelformat but do a check first. v2: Simplify the format check. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-28modetest: make middle SMPTE colors transparentTobias Jakobi
This enables us to check for overlay planes which are located 'below' the primary plane. Since the alpha value only has an effect when creating surfaces with an alpha-pixelformat this doesn't affect the regular XRGB8888 primary surface. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-28drmPrime*: initialize output args to 0Guillaume Desmottes
Fix Valgrind errors because those memory was uninitialized. https://bugs.freedesktop.org/show_bug.cgi?id=90194 Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> v2: Explicitly zero the whole struct using memclear. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-28Fix one warning (v2)Jammy Zhou
xf86drm.c:356:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] group = (serv_group >= 0) ? serv_group : DRM_DEV_GID; ^ v2: do 'int' cast to fix the warning Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-28xf86drm: simplify drmMalloc/drmFreeEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-28modetest: replace malloc + memset with callocEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-28modetest: explicitly zero the newly allocated memoryEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-26Add device enumeration interface (v4)frank
Add an interface for enumerating PCI devices on a system. v3: switch to udev/sysfs for the enumeration v4: fix warnings Signed-off-by: Frank Min <frank.min@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-05-26radeon: add new bonaire pci idAlex Deucher
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-21nouveau: add coherent BO attributeAlexandre Courbot
Add a flag allowing Nouveau to specify that an object should be coherent at allocation time. This is required for some class of objects like fences which are randomly-accessed by both the CPU and GPU. This flag instructs the kernel driver to make sure the object remains coherent even on architectures for which coherency is not guaranteed by the bus. Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2015-05-18intel: Add the Broxton PCI IDsDamien Lespiau
Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-07configure.ac: bump version to 2.4.61 for releaseBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-05-06nouveau: restore check that avoids multiple user bos per kernel boBen Skeggs
Lost in 5ea6f1c32628887c9df0c53bc8c199eb12633fec, triggering fdo#89842. Unlike the PRIME fd->handle interfaces, the GEM_OPEN interface doesn't do anything at the kernel level to prevent this situation occuring, and we end up with multiple GEM handles for a single kernel buffer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-05-05modetest: fix allocation for yuv420/yvu420Rob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-29freedreno: link against CLOCK_LIBEmil Velikov
Required by clock_gettime() Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-29android: set the HAVE_VISIBILITY defineEmil Velikov
... in order to limit the exported symbols only to the required ones. Both compilers used with Android (GCC and LLVM) support this, so set it unconditionally. Cc: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-29modetest: fix the arguments of the MAKE_RGB_INFO defineJoonyoung Shim
The current order (rbg) seems wrong. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-29intel: Leak the userptr test boTvrtko Ursulin
In order to use userptr, the kernel tracks the owner's mm with a mmu_notifier. Setting that is very expensive - it involves taking all mm_locks and a stop_machine(). This tracking lives only for as long as the client is using userptr objects - so if the client allocates then frees a userptr in a loop, we will be executing that heavyweight setup everytime. To ammoritize this cost, just leak the test bo and the single backing page we use for detecting userptr. v2: Free the object and memory when bufmgr is destroyed. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-04-28modetest: destroy the cursor boJoonyoung Shim
Currently we are missing the bo_destroy() when modetest terminates. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: clear buffer and framebuffer for planesJoonyoung Shim
Currently we don't destroy buffer and remove framebuffer for planes when closing modetest. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix the error path handlingJoonyoung Shim
Remove the framebuffer and destroy the bo when error occurs on set_mode and test_page_flip. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: make use of drmModeRmFBJoonyoung Shim
We should remove the framebuffer before destroying the buffer. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix Segmentation faultJoonyoung Shim
If use -P option without -s option, the program segfaults due to dev.mode.bo being NULL. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: initialize handles/pitches in set_plane()Tobias Jakobi
Only the 'offsets' array was initialized to zero. Since bo_create only sets the handles which are necessary, were we passing garbage data to the kernel when calling drmModeAddFB2 later. The issue only seems to appear when passing e.g. NV12 data to the kernel, a case where not only handles[0] is used. I therefore also removed the corresponding comment. v2: Do the same for set_mode(), set_cursors() and test_page_flip(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28Add missing <strings.h> includesGreg Hackmann
A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master. Signed-off-by: Greg Hackmann <ghackmann@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28man: rework the Makefile.amEmil Velikov
Remove GNU make specific constructs and take into consideration that Solaris man 7 is not the same as Linux man 7. This commit introduces a dependency of xorg-macros 1.12 (released 4+ years ago) which is used to handle the above man section discrepancies. Cc: Niveditha Rau <niveditha.rau@oracle.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: use c99 __func__ over __FUNCTION__Emil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28configure: request/set the compiler in C99 modeEmil Velikov
Required by intel and drmstat at least. Considering that every compiler used to build libdrm is C99 compatible, just enable it for the whole build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove drm_public macroEmil Velikov
Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove no longer needed VISIBILITY_CFLAGSEmil Velikov
With earlier commits we've annotated the private symbols, thus we no longer require the -fvisibility=hidden CFLAGS. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: rename libdrm{,_macros}.hEmil Velikov
Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28tegra: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28omap: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28exynos: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28libkms: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28libkms: annotate private symbolsEmil Velikov
Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28nouveau: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28nouveau: annotate the private symbolsEmil Velikov
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: add symbols testEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: annotate the private symbolsEmil Velikov
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>