Commit Graph

49 Commits (911280cb4a0106b869405e36f7317957628181d5)

Author SHA1 Message Date
Andreas Boll a5446775f2 automake: Don't include Android Makefiles in the release tarball
Currently only some Android Makefiles are included in the release tarball.
To be more consistent one could either add the remaining files or don't
ship Android Makefiles altogether.

According to Emil the Android folk doesn't use our release tarballs.
Thus it makes sense to remove those files from distribution which also
means less work for maintenance in the future.

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-07-23 09:45:53 +02:00
Mike Frysinger 8c8d5dd76f pull in sys/sysmacros.h when available
This header provides major/minor/makedev funcs under most Linux C
libs.  Pull it in to fix building with newer versions that drop the
implicit include via sys/types.h.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94231
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-07-06 16:58:38 +01:00
Rob Herring d342cd34ac Android: strip out header files from sources list
AOSP master now errors if LOCAL_SRC_FILES contains headers, so filter
out header files from the source lists.

Signed-off-by: Rob Herring <robh@kernel.org>
2016-07-06 16:58:38 +01:00
Chih-Wei Huang 4274539673 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>
2016-02-25 17:03:20 +00:00
Emil Velikov ca5017b69c 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>
2016-02-04 13:22:50 +00:00
Emil Velikov aecd5a1879 libkms: use static const for good measure
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-04 21:39:06 +01:00
Tapani Pälli 1c205749fe remove usage of 'c_plusplus' preprocessor macro
Use only __cplusplus which is supported by the C++ standard.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-10 11:25:39 +03:00
Alan Coopersmith dfed5e18f3 include <sys/types.h> & <sys/mkdev.h> directly for major() and minor()
Linux seems to pick these up via another header, but Solaris needs them
explicitly included, or we get undefined symbol errors for major & minor.

v2: use headers documented in makedev(3C) man page instead of sysmacros.h

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

v3 [Emil Velikov]: include sys/mkdev.h only when available.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-13 19:38:28 +01:00
Emil Velikov 42465feb97 drm: rename libdrm{,_macros}.h
Provide a more meaningful name, considering what it does.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov b0d4ee6907 libkms: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov 983892d275 libkms: annotate private symbols
Cc: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov 568b3a0954 android: add the missing tag "optional" to libkms
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:03:16 +00:00
Emil Velikov ff021215ea android: remove LOCAL_COPY_HEADERS* variables
With earlier changes we've implicitly add the relevant directories
to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.

v2: Update the top Android.mk as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:02:56 +00:00
Emil Velikov af4379f759 android: simplify LOCAL_C_INCLUDES
Each of the libdrm_${hw} modules pull libdrm for linking as such:

libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list.
The former of which is already set to ${top} and ${top}/include/drm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Emil Velikov 24ac8cd7db android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
- Don't add ${hw}/${hw}, but ${hw} to the includes path. The former
does not exist.
 - Set the variable for libkms.

Inspired by the work of from Chih-Wei from the Android-x86 project.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Hyungwon Hwang d41b7a3a74 exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctls
The ioctl DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP are removed from
the linux kernel. This patch modifies libdrm and libkms to use drm generic
ioctls instead of the removed ioctls.

v2: The original patch was erroneous. In case the MODE_MAP_DUMB ioctl failed
    it would return the retvalue as a void-pointer. Users of libdrm would then
    happily use that ptr, eventually leading to a segfault. Change this to
    return NULL in that case and also restore the previous behaviour of logging
    to stderr.
    The other error was that 'bo->vaddr' was never filled with the mapped
    buffer address. Hence exynos_bo_map still returned NULL even if the
    buffer mapping succeeded.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-02-02 14:45:39 -05:00
Emil Velikov dadc9eff9f libkms: use drm_mmap/drm_munmap wrappers
... for all by exynos.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov 268dce4192 automake: pick up all files for distribution.
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-28 17:09:34 +01:00
Emil Velikov a3dfd6d40d libkms: add Android build
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-28 17:09:34 +01:00
Emil Velikov 1a75044a39 libkms: move sources lists to makefile.sources
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov f3fd11beaa libkms: build the intel backend only when needed
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov 02b3ad7e19 libkms: remove explicit define _FILE_OFFSET_BITS 64
configure.ac has AC_SYS_LARGEFILE which provides the define and/or
approapriate magic when required.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Emil Velikov 8e93afc976 all: include config.h only when available and use its defines
... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Hyungwon Hwang 3732ef59eb tests/kmstest: support exynos
In this patch, to support exynos for KMS, Exynos KMS driver is newly added.
Also, Exynos is added to the list of kmstest supported modules.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-12 08:23:38 -05:00
Laurent Pinchart aa4afdf0b3 kms: Return a negative error code in kms_bo_create()
The function returns returns 0 on success or a negative value in case of an
error, except when given invalid attributes in which case it returns the
positive EINVAL value. Replace that with -EINVAL to allow the caller to detect
errors with a < 0 check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
2013-04-18 10:07:01 -04:00
Laurent Pinchart 9fa4a4b1a8 kms: Make libkms.h usable in C++
Wrap the header in extern "C" { ... };.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
2013-04-18 10:05:53 -04:00
Maxime Villard baf0a7daaf libkms: return -EINVAL on fstat error
On error fstat return -1, instead return -EINVAL to caller

Signed-off-by: Maxime Villard <rustyBSD@gmx.fr>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2013-01-02 10:57:07 -05:00
Maxime Villard 1f4b5e11e6 libkms: fix memory leak in error path
Signed-off-by: Maxime Villard <rustyBSD@gmx.fr>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2013-01-02 10:55:50 -05:00
Marcin Slusarz 9c3c95fc0c libkms: link against libdrm
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
2012-09-08 00:50:22 +02:00
Chris Wilson 61be94018a libkms: All current BO_TYPE are 32bpp
... so request a 32bpp dumb buffer rather than a 16bpp.

Fixes modetest and friends.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-14 11:17:23 +01:00
Dave Airlie bb99465366 libkms: add dumb support
this uses the drm cap interface to check if the dumb ioctl
is supported.
2011-03-04 15:25:51 +10:00
nobled ed7d177f66 libkms/radeon: Add backend
Todo: What tiling should be set on scanout buffers?

Haven't tested besides compiling it.
2011-02-17 09:26:30 +01:00
Daniel Stone ae57dcf6e0 libkms: Fix include paths
Otherwise xf86drm.h isn't found, or the wrong one.
2010-06-01 19:23:42 +01:00
Marcin Kościelnicki d5a2e77682 libkms/nouveau: Add support 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki 23f62721b7 libkms/intel: Throw out unused intel_bo fields.
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-02-28 00:25:22 +00:00
Jakob Bornecrantz a5c8f55397 libkms: Use a standard version number 2010-02-18 16:29:36 +01:00
Jakob Bornecrantz 25c0c638c4 libkms: Add missing include file to libkms source 2010-02-18 13:28:52 +01:00
Jakob Bornecrantz 44a0e0a099 libkms: Rework interface to not duplicate fields from kms and make formats explicit
List of changes:
Fixes the cursor size to 64x64, you still need ti supply width and height
Explicitly make the cursor format A8R8G8B8
Explicitly make the scanout format X8R8G8B8
2010-01-28 17:32:54 +01:00
Jakob Bornecrantz dfa7297860 libkms: Fix return value in vmwgfx_bo_create 2010-01-23 01:39:07 +00:00
Jakob Bornecrantz 2959266188 libkms: Fix multiple map unmap in vmwgfx and add comment in intel 2010-01-15 20:13:20 +00:00
Jakob Bornecrantz d920fa9d0b libkms: Use sysfs instead of udev to find driver
Udev code is still there just commented out.
2010-01-12 21:10:12 +00:00
Jakob Bornecrantz 8838bb1d63 libkms/intel: Don't fail to create bo if we fail to tile 2010-01-08 15:19:44 +00:00
Jakob Bornecrantz bfa44bb861 libkms: Add intel backend 2010-01-08 03:05:31 +00:00
Jakob Bornecrantz 9042d72109 libkms: Pick driver backend via pci id that we get from udev 2010-01-08 03:05:00 +00:00
Jakob Bornecrantz 5dbc1b333b libkms: Make vmwgfx optional 2010-01-05 21:06:13 +01:00
Jakob Bornecrantz dfbaffea07 libkms: Remove duped vmwgfx_drm.h header 2010-01-05 21:04:57 +01:00
Jakob Bornecrantz 77ddc78566 vmwgfx: Fetch the latest header 2009-12-14 22:53:10 +01:00
Jakob Bornecrantz 201f5795a2 libkms: Change destroy api a bit 2009-12-04 16:11:56 +01:00
Jakob Bornecrantz 8c0571a733 libkms: Add libkms 2009-12-04 16:11:55 +01:00