From: Damian Hobson-Garcia Date: Thu, 13 Mar 2014 02:02:03 +0000 (+0900) Subject: Add an API to get the fd used by the kms X-Git-Tag: accepted/tizen/ivi/20150202.020104~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86230840982a761e0d0b48c4609e3ab58b76a895;p=platform%2Fadaptation%2Frenesas_rcar%2Fwayland-kms.git Add an API to get the fd used by the kms If wayland->kms has been initialized in this process, allow the kms device fd to be exported. Change-Id: Ia3f0920cb0a5900f3c173493157e0edb09e3200a Signed-off-by: Tony SIM --- diff --git a/wayland-kms.c b/wayland-kms.c index c592135..62466f3 100644 --- a/wayland-kms.c +++ b/wayland-kms.c @@ -219,6 +219,11 @@ bind_kms(struct wl_client *client, void *data, uint32_t version, uint32_t id) wl_resource_post_event(resource, WL_KMS_FORMAT, WL_KMS_FORMAT_XRGB8888); } +int wayland_kms_fd_get(struct wl_kms* kms) +{ + return kms->fd; +} + struct wl_kms_buffer *wayland_kms_buffer_get(struct wl_resource *resource) { if (resource == NULL) diff --git a/wayland-kms.h b/wayland-kms.h index 197c736..1d11c58 100644 --- a/wayland-kms.h +++ b/wayland-kms.h @@ -43,6 +43,8 @@ struct wl_kms_buffer { int fd; }; +int wayland_kms_fd_get(struct wl_kms *kms); + struct wl_kms_buffer *wayland_kms_buffer_get(struct wl_resource *resource); struct wl_kms *wayland_kms_init(struct wl_display *display,