Commit Graph

167 Commits (99a0522aef04e08c6e0be7a7a020f12c51d24c47)

Author SHA1 Message Date
Emil Velikov faf51d5694 drm: use drm_mmap/drm_munmap wrappers
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
Daniel Kurtz 305478ce02 drmOpenByName: remove redundant drmAvailable check
drmOpenByName() is a static function that is only called by drmOpen().
drmOpen() already checks drmAvailable(), so the check in
drmOpenByName() is redundant.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-05-13 12:14:19 +02:00
Thierry Reding 303ff26311 libdrm: Remove extraneous parameter
The debug message's format string doesn't contain any conversion
specifiers, therefore making the fd argument unused.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-17 16:21:46 +02:00
Thierry Reding 44b08c0ddf Mark functions printf-like where possible
These functions all take a format string and either a list of variable
arguments or a va_list. Use the new DRM_PRINTFLIKE macro to tell the
compiler about it so that the arguments can be checked against the
format string.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-17 16:21:40 +02:00
Damien Lespiau ddbbdb13d8 drm: Introduce a drmSetClientCap() wrapper
That wraps around the new DRM_SET_CLIENT_CAP ioctl.

v2: SET_CAP -> SET_CLIENT_CAP renaming

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 13:35:49 +01:00
Daniel Kurtz 1eb2860b4b drm: Fix error message in drmWaitVBlank
If clock_gettime did fail, it would return -1 and set errno.
What we really want to strerror() is the errno.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
2013-03-28 08:34:30 -07:00
Dave Airlie cc0a14575d libdrm: add prime fd->handle and handle->fd interfaces
These are just basic ioctl wrappers around the prime ioctls,
along with the capability reporting.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-16 02:39:56 +01:00
Jeremy Huddleston 961bf9b5c2 Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-01 14:42:13 -07:00
Dave Airlie 3b04c73650 libdrm: oops fix get cap return value. 2011-03-04 15:48:31 +10:00
Ben Skeggs 5c6c6913d1 Implement drmGetCap() to query device/driver capabilities
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-03-04 15:25:51 +10:00
Dave Airlie 39e5e98224 drm: don't do the create the node ourselves if we have udev.
this can remove nodes it shouldn't, let udev run the show.

this is needed for reliably GPU switch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-07 14:26:09 +10:00
Adam Jackson 0a1ff35c70 s/drmStrdup/strdup/
_DRM_MALLOC hasn't been a relevant concern since we split libdrm out
from xserver.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-27 18:46:57 -04:00
Benjamin Herrenschmidt b04515c5d6 libdrm: Fix PCI domain domain support
This works in conjunction with newer kernels. If we succeed in requesting
interface 1.4, the we know the kernel provides proper domain numbers. If
not, ignore the domain number as it's bogus (except on Alpha).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-08-06 09:38:43 -04:00
Kristian Høgsberg fbc8b2d95f Be less chatty in drmSetMaster/drmDropMaster 2009-12-15 08:44:40 -05:00
Robert Noland 6f66de982a Correctly set DRM_MAX_MINOR for all platforms.
DRM_MAJOR is platform specific, but not used outside of xf86drm.c
that I can find.
2009-11-25 15:09:24 -06:00
Kristian Høgsberg 22d4666904 Add drmGetDeviceNameFromFd function
Determines the /dev filename of the drm fd argument.
2009-11-23 20:51:34 -05:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00