summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-11-14 13:35:38 -0500
committerChris Michael <cp.michael@samsung.com>2016-11-15 08:42:07 -0500
commit8421a373132e4d8ad0f980adac853dde64923a7d (patch)
treea25904ca9cab48c2271ba1efffc76fdd69a81cc5 /src/lib/ecore_drm2/ecore_drm2.c
parent0a2c06fc58b4eac4cdcd9f7907e940d1c742dd92 (diff)
ecore-drm2: Make calls to symlink'd libdrm functions
Instead of linking to libdrm and calling drmMode functions, we will instead symlink the functions we need during runtime and call those symlinks. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2.c b/src/lib/ecore_drm2/ecore_drm2.c
index 3728866..ddedac6 100644
--- a/src/lib/ecore_drm2/ecore_drm2.c
+++ b/src/lib/ecore_drm2/ecore_drm2.c
@@ -5,6 +5,46 @@ static void *drm_lib = NULL;
5 5
6int _ecore_drm2_log_dom = -1; 6int _ecore_drm2_log_dom = -1;
7 7
8int (*sym_drmHandleEvent)(int fd, drmEventContext *evctx) = NULL;
9void *(*sym_drmGetVersion)(int fd) = NULL;
10void (*sym_drmFreeVersion)(void *drmver) = NULL;
11void *(*sym_drmModeGetProperty)(int fd, uint32_t propertyId) = NULL;
12void (*sym_drmModeFreeProperty)(drmModePropertyPtr ptr) = NULL;
13void *(*sym_drmModeGetPropertyBlob)(int fd, uint32_t blob_id) = NULL;
14void (*sym_drmModeFreePropertyBlob)(drmModePropertyBlobPtr ptr) = NULL;
15int (*sym_drmModeDestroyPropertyBlob)(int fd, uint32_t id) = NULL;
16int (*sym_drmIoctl)(int fd, unsigned long request, void *arg) = NULL;
17void *(*sym_drmModeObjectGetProperties)(int fd, uint32_t object_id, uint32_t object_type) = NULL;
18void (*sym_drmModeFreeObjectProperties)(drmModeObjectPropertiesPtr ptr) = NULL;
19int (*sym_drmModeCreatePropertyBlob)(int fd, const void *data, size_t size, uint32_t *id) = NULL;
20# ifdef HAVE_ATOMIC_DRM
21void *(*sym_drmModeAtomicAlloc)(void) = NULL;
22void (*sym_drmModeAtomicFree)(drmModeAtomicReqPtr req) = NULL;
23int (*sym_drmModeAtomicAddProperty)(drmModeAtomicReqPtr req, uint32_t object_id, uint32_t property_id, uint64_t value) = NULL;
24int (*sym_drmModeAtomicCommit)(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *user_data) = NULL;
25void (*sym_drmModeAtomicSetCursor)(drmModeAtomicReqPtr req, int cursor) = NULL;
26# endif
27void *(*sym_drmModeGetEncoder)(int fd, uint32_t encoder_id) = NULL;
28void (*sym_drmModeFreeEncoder)(drmModeEncoderPtr ptr) = NULL;
29void *(*sym_drmModeGetCrtc)(int fd, uint32_t crtcId) = NULL;
30void (*sym_drmModeFreeCrtc)(drmModeCrtcPtr ptr) = NULL;
31int (*sym_drmModeSetCrtc)(int fd, uint32_t crtcId, uint32_t bufferId, uint32_t x, uint32_t y, uint32_t *connectors, int count, drmModeModeInfoPtr mode) = NULL;
32void *(*sym_drmModeGetResources)(int fd) = NULL;
33void (*sym_drmModeFreeResources)(drmModeResPtr ptr) = NULL;
34void *(*sym_drmModeGetConnector)(int fd, uint32_t connectorId) = NULL;
35void (*sym_drmModeFreeConnector)(drmModeConnectorPtr ptr) = NULL;
36int (*sym_drmModeConnectorSetProperty)(int fd, uint32_t connector_id, uint32_t property_id, uint64_t value) = NULL;
37int (*sym_drmGetCap)(int fd, uint64_t capability, uint64_t *value) = NULL;
38int (*sym_drmSetClientCap)(int fd, uint64_t capability, uint64_t value) = NULL;
39void *(*sym_drmModeGetPlaneResources)(int fd) = NULL;
40void (*sym_drmModeFreePlaneResources)(drmModePlaneResPtr ptr) = NULL;
41void *(*sym_drmModeGetPlane)(int fd, uint32_t plane_id) = NULL;
42void (*sym_drmModeFreePlane)(drmModePlanePtr ptr) = NULL;
43int (*sym_drmModeAddFB)(int fd, uint32_t width, uint32_t height, uint8_t depth, uint8_t bpp, uint32_t pitch, uint32_t bo_handle, uint32_t *buf_id) = NULL;
44int (*sym_drmModeRmFB)(int fd, uint32_t bufferId) = NULL;
45int (*sym_drmModePageFlip)(int fd, uint32_t crtc_id, uint32_t fb_id, uint32_t flags, void *user_data) = NULL;
46int (*sym_drmModeDirtyFB)(int fd, uint32_t bufferId, drmModeClipPtr clips, uint32_t num_clips) = NULL;
47
8EAPI int ECORE_DRM2_EVENT_OUTPUT_CHANGED = -1; 48EAPI int ECORE_DRM2_EVENT_OUTPUT_CHANGED = -1;
9EAPI int ECORE_DRM2_EVENT_ACTIVATE = -1; 49EAPI int ECORE_DRM2_EVENT_ACTIVATE = -1;
10 50