Add an API to get the fd used by the kms 90/30490/4
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Thu, 13 Mar 2014 02:02:03 +0000 (11:02 +0900)
committerTony SIM <chinyeow.sim.xt@renesas.com>
Thu, 18 Dec 2014 09:36:37 +0000 (01:36 -0800)
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 <chinyeow.sim.xt@renesas.com>
wayland-kms.c
wayland-kms.h

index c592135..62466f3 100644 (file)
@@ -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)
index 197c736..1d11c58 100644 (file)
@@ -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,