monitor: enhance ttrace option for layer, pp, capture
[platform/core/uifw/libtdm.git] / src / tdm_private.h
index bdb1a20..8c710a8 100644 (file)
 #include <poll.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
+#include <sys/eventfd.h>
+#include <math.h>
+#include <grp.h>
 
+#include <wayland-server-protocol.h>
 #include <tbm_bufmgr.h>
 #include <tbm_surface_queue.h>
 
@@ -72,17 +76,45 @@ extern "C" {
  * @brief The private header file for a frontend library
  */
 
-extern int tdm_debug_buffer;
-extern int tdm_debug_mutex;
-extern int tdm_debug_thread;
+enum {
+       TDM_DEBUG_NONE,
+       TDM_DEBUG_BUFFER    = (1 << 0),
+       TDM_DEBUG_MUTEX     = (1 << 1),
+       TDM_DEBUG_THREAD    = (1 << 2),
+       TDM_DEBUG_SERVER    = (1 << 3),
+       TDM_DEBUG_VBLANK    = (1 << 4),
+       TDM_DEBUG_COMMIT    = (1 << 5),
+};
+
+enum {
+       TDM_TTRACE_NONE,
+       TDM_TTRACE_VBLANK    = (1 << 0),
+       TDM_TTRACE_CLIENT    = (1 << 1),
+       TDM_TTRACE_LAYER     = (1 << 2),
+       TDM_TTRACE_PP        = (1 << 3),
+       TDM_TTRACE_CAPTURE   = (1 << 4),
+};
+
+extern int tdm_debug_module;
+extern int tdm_debug_dump;
+extern int tdm_ttrace_module;
+extern int tdm_ttrace_output;
 
 #ifdef HAVE_TTRACE
 #include <ttrace.h>
-#define TDM_TRACE_BEGIN(NAME) traceBegin(TTRACE_TAG_GRAPHICS, "TDM:"#NAME)
+#define TDM_TRACE_BEGIN(fmt, ...) traceBegin(TTRACE_TAG_GRAPHICS, fmt, ##__VA_ARGS__)
 #define TDM_TRACE_END() traceEnd(TTRACE_TAG_GRAPHICS)
+#define TDM_TRACE_ASYNC_BEGIN(key, name,...) traceAsyncBegin(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__)
+#define TDM_TRACE_ASYNC_END(key, name,...) traceAsyncEnd(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__)
+#define TDM_TRACE_COUNT(count, fmt, ...) traceCounter(TTRACE_TAG_GRAPHICS, count, fmt, ##__VA_ARGS__)
+#define TDM_TRACE_MARK(fmt, ...) traceMark(TTRACE_TAG_GRAPHICS, fmt, ##__VA_ARGS__)
 #else
-#define TDM_TRACE_BEGIN(NAME)
+#define TDM_TRACE_BEGIN(fmt, ...)
 #define TDM_TRACE_END()
+#define TDM_TRACE_ASYNC_BEGIN(key, name,...)
+#define TDM_TRACE_ASYNC_END(key, name,...)
+#define TDM_TRACE_COUNT(count, fmt, ...)
+#define TDM_TRACE_MARK(fmt, ...)
 #endif
 
 typedef enum {
@@ -90,17 +122,35 @@ typedef enum {
        TDM_CAPTURE_TARGET_LAYER,
 } tdm_capture_target;
 
+enum {
+       TDM_DUMP_FLAG_LAYER   = (1 << 0),
+       TDM_DUMP_FLAG_PP      = (1 << 1),
+       TDM_DUMP_FLAG_CAPTURE = (1 << 2),
+       TDM_DUMP_FLAG_WINDOW = (1 << 3),
+};
+
+#define TDM_DUMP_DIR    "/tmp"
+
+typedef enum {
+       TDM_COMMIT_TYPE_NONE,
+       TDM_COMMIT_TYPE_OUTPUT,
+       TDM_COMMIT_TYPE_LAYER,
+} tdm_commit_type;
+
 typedef struct _tdm_private_display tdm_private_display;
 typedef struct _tdm_private_output tdm_private_output;
 typedef struct _tdm_private_layer tdm_private_layer;
+typedef struct _tdm_private_hwc_window tdm_private_hwc_window;
 typedef struct _tdm_private_pp tdm_private_pp;
 typedef struct _tdm_private_capture tdm_private_capture;
 typedef struct _tdm_private_loop tdm_private_loop;
 typedef struct _tdm_private_server tdm_private_server;
 typedef struct _tdm_private_thread tdm_private_thread;
 typedef struct _tdm_private_vblank_handler tdm_private_vblank_handler;
-typedef struct _tdm_private_commit_handler tdm_private_commit_handler;
+typedef struct _tdm_private_output_commit_handler tdm_private_output_commit_handler;
+typedef struct _tdm_private_layer_commit_handler tdm_private_layer_commit_handler;
 typedef struct _tdm_private_change_handler tdm_private_change_handler;
+typedef struct _tdm_private_layer_buffer tdm_private_layer_buffer;
 
 struct _tdm_private_display {
        pthread_mutex_t lock;
@@ -120,6 +170,7 @@ struct _tdm_private_display {
        tdm_func_display func_display;
        tdm_func_output func_output;
        tdm_func_layer func_layer;
+       tdm_func_hwc_window func_hwc_window;
        tdm_func_pp func_pp;
        tdm_func_capture func_capture;
 
@@ -140,12 +191,15 @@ struct _tdm_private_display {
 
        /* output order */
        tdm_output **outputs;
+
+       int print_fps;
 };
 
 struct _tdm_private_output {
        struct list_head link;
 
-       unsigned long stamp;
+       int index;
+       double stamp;
 
        tdm_private_display *private_display;
 
@@ -154,46 +208,101 @@ struct _tdm_private_output {
 
        unsigned int pipe;
        tdm_output_dpms current_dpms_value;
+       unsigned int waiting_dpms_change;
+       const tdm_output_mode *current_mode;
 
        int regist_vblank_cb;
        int regist_commit_cb;
        int regist_change_cb;
+       int regist_dpms_cb;
 
        struct list_head layer_list;
+       struct list_head hwc_window_list;
        struct list_head capture_list;
        struct list_head vblank_handler_list;
-       struct list_head commit_handler_list;
+       struct list_head output_commit_handler_list;
+
+       /* for layer commit */
+       struct list_head layer_commit_handler_list;
+       struct list_head pending_commit_handler_list;
+       tdm_vblank *vblank;
+       int layer_waiting_vblank;
 
        /* seperate list for multi-thread*/
        struct list_head change_handler_list_main;
        struct list_head change_handler_list_sub;
 
        void **layers_ptr;
+
+       /* TODO: temp solution for handling DPMS things in sub-htread */
+       tdm_event_loop_source *dpms_changed_timer;
+
+       struct {
+               /* look at the tdm_output_set_need_revalidate_handler() declaration for the details */
+               tdm_output_need_validate_handler hndl;
+               int event_fd;
+       } need_validate;
+
+       /* calling a output commit per a vblank */
+       int commit_per_vblank;
+       tdm_commit_type commit_type;
+
+       /* for ttrace vblank */
+       tdm_vblank *ttrace_vblank;
 };
 
 struct _tdm_private_layer {
        struct list_head link;
 
+       int index;
+
        tdm_private_display *private_display;
        tdm_private_output *private_output;
 
        tdm_caps_layer caps;
        tdm_layer *layer_backend;
 
+       /* pending data until committed */
+       unsigned int pending_info_changed;
+       tdm_info_layer pending_info;
+       unsigned int pending_buffer_changed;
        tbm_surface_h pending_buffer;
-       tbm_surface_h waiting_buffer;
-       tbm_surface_h showing_buffer;
+
+       /* When a buffer is set to a layer, it will be stored to waiting_buffer.
+        * And when a layer is committed, it will be moved to committed_buffer.
+        * Finally when a commit handler is called, it will be moved to showing_buffer.
+        */
+       tdm_private_layer_buffer *waiting_buffer;
+       tdm_private_layer_buffer *committed_buffer;   /* for output_commit */
+       tdm_private_layer_buffer *showing_buffer;
        tbm_surface_queue_h buffer_queue;
 
        struct list_head capture_list;
 
        unsigned int usable;
+       unsigned int committing;
+
+       double fps_stamp;
+       unsigned int fps_count;
+};
+
+struct _tdm_private_hwc_window {
+       struct list_head link;
+
+       int index;
+       uint32_t zpos;
+
+       tdm_private_display *private_display;
+       tdm_private_output *private_output;
+
+       tdm_hwc_window *hwc_window_backend;
 };
 
+
 struct _tdm_private_pp {
        struct list_head link;
 
-       unsigned long stamp;
+       double stamp;
 
        tdm_private_display *private_display;
 
@@ -202,14 +311,18 @@ struct _tdm_private_pp {
        struct list_head pending_buffer_list;
        struct list_head buffer_list;
 
+       tdm_info_pp info;
        pid_t owner_tid;
+
+       tdm_pp_done_handler done_func;
+       void *done_user_data;
 };
 
 struct _tdm_private_capture {
        struct list_head link;
        struct list_head display_link;
 
-       unsigned long stamp;
+       double stamp;
 
        tdm_capture_target target;
 
@@ -222,7 +335,11 @@ struct _tdm_private_capture {
        struct list_head pending_buffer_list;
        struct list_head buffer_list;
 
+       tdm_info_capture info;
        pid_t owner_tid;
+
+       tdm_capture_done_handler done_func;
+       void *done_user_data;
 };
 
 /* CAUTION:
@@ -261,13 +378,15 @@ struct _tdm_private_vblank_handler {
        struct list_head link;
 
        tdm_private_output *private_output;
+       int interval;
+       int sync;
        tdm_output_vblank_handler func;
        void *user_data;
 
        pid_t owner_tid;
 };
 
-struct _tdm_private_commit_handler {
+struct _tdm_private_output_commit_handler {
        struct list_head link;
 
        tdm_private_output *private_output;
@@ -277,6 +396,16 @@ struct _tdm_private_commit_handler {
        pid_t owner_tid;
 };
 
+struct _tdm_private_layer_commit_handler {
+       struct list_head link;
+
+       tdm_private_layer *private_layer;
+       tdm_layer_commit_handler func;
+       void *user_data;
+
+       tdm_private_layer_buffer *committed_buffer;   /* for layer_commit */
+};
+
 struct _tdm_private_change_handler {
        struct list_head link;
 
@@ -287,6 +416,11 @@ struct _tdm_private_change_handler {
        pid_t owner_tid;
 };
 
+struct _tdm_private_layer_buffer {
+       tbm_surface_h buffer;
+       struct list_head link;
+};
+
 typedef struct _tdm_buffer_info {
        tbm_surface_h buffer;
 
@@ -300,16 +434,28 @@ typedef struct _tdm_buffer_info {
        struct list_head link;
 } tdm_buffer_info;
 
+typedef struct _tdm_pp_private_buffer {
+       tbm_surface_h src;
+       tbm_surface_h dst;
+       struct list_head link;
+       struct list_head commit_link;
+} tdm_pp_private_buffer;
+
+typedef struct _tdm_capture_private_buffer {
+       tbm_surface_h buffer;
+       struct list_head link;
+       struct list_head commit_link;
+} tdm_capture_private_buffer;
+
 int
 tdm_display_check_module_abi(tdm_private_display *private_display, int abimaj, int abimin);
 
 tdm_private_output *
-tdm_display_find_output_stamp(tdm_private_display *private_display,
-                                                         unsigned long stamp);
+tdm_display_find_output_stamp(tdm_private_display *private_display, double stamp);
 tdm_private_pp *
-tdm_pp_find_stamp(tdm_private_display *private_display, unsigned long stamp);
+tdm_pp_find_stamp(tdm_private_display *private_display, double stamp);
 tdm_private_capture *
-tdm_capture_find_stamp(tdm_private_display *private_display, unsigned long stamp);
+tdm_capture_find_stamp(tdm_private_display *private_display, double stamp);
 
 void
 tdm_output_cb_vblank(tdm_output *output_backend, unsigned int sequence,
@@ -321,23 +467,72 @@ void
 tdm_output_cb_status(tdm_output *output_backend, tdm_output_conn_status status,
                                         void *user_data);
 void
+tdm_output_cb_dpms(tdm_output *output_backend, tdm_output_dpms dpms,
+                                  void *user_data);
+INTERN tdm_error
+tdm_output_cb_need_validate(tdm_private_output *private_output);
+
+tdm_error
+tdm_output_wait_vblank_add_front(tdm_output *output, int interval, int sync,
+                                                                tdm_output_vblank_handler func, void *user_data);
+tdm_error
+tdm_output_commit_internal(tdm_output *output, int sync, tdm_output_commit_handler func, void *user_data);
+tdm_error
+tdm_output_get_dpms_internal(tdm_output *output, tdm_output_dpms *dpms_value);
+
+tdm_error
+tdm_output_need_validate_event_init(tdm_output *output);
+tdm_error
+tdm_output_choose_commit_per_vblank_mode(tdm_private_output *private_output, int mode);
+
+void
+tdm_output_remove_vblank_handler_internal(tdm_output *output, tdm_output_vblank_handler func, void *user_data);
+void
+tdm_output_remove_commit_handler_internal(tdm_output *output, tdm_output_commit_handler func, void *user_data);
+void
+tdm_layer_remove_commit_handler_internal(tdm_layer *layer, tdm_layer_commit_handler func, void *user_data);
+
+tdm_error
+tdm_layer_commit_pending_data(tdm_private_layer *private_layer);
+void
+tdm_layer_committed(tdm_private_layer *private_layer, tdm_private_layer_buffer **committed_buffer);
+
+void
 tdm_pp_cb_done(tdm_pp *pp_backend, tbm_surface_h src, tbm_surface_h dst,
                           void *user_data);
 void
 tdm_capture_cb_done(tdm_capture *capture_backend, tbm_surface_h buffer,
                                        void *user_data);
+tdm_error
+tdm_vblank_cb_vblank_SW(tdm_vblank *vblank, double vblank_stamp);
+tdm_error
+tdm_vblank_set_add_front(tdm_vblank *vblank, unsigned int add_front);
+tdm_error
+tdm_vblank_set_resource(tdm_vblank *vblank, struct wl_resource *resource);
+double
+tdm_vblank_get_stamp(tdm_vblank *vblank);
+tdm_error
+tdm_vblank_set_client_vblank_fps(unsigned int pid, const char *name, unsigned int fps);
+void
+tdm_vblank_get_vblank_list_information(tdm_display *dpy, char *reply, int *len);
 
 void
 tdm_output_call_change_handler_internal(tdm_private_output *private_output,
                                                                                struct list_head *change_handler_list,
                                                                                tdm_output_change_type type,
-                                                                               tdm_value value);
+                                                                               tdm_value value,
+                                                                               int no_check_thread_id);
 
 tdm_private_pp *
 tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error);
 void
 tdm_pp_destroy_internal(tdm_private_pp *private_pp);
 
+tdm_hwc_window *
+tdm_hwc_window_create_internal(tdm_private_output *private_output, int is_video, tdm_error *error);
+tdm_error
+tdm_hwc_window_destroy_internal(tdm_private_hwc_window * private_hwc_window);
+
 tdm_private_capture *
 tdm_capture_create_output_internal(tdm_private_output *private_output,
                                                                   tdm_error *error);
@@ -355,12 +550,17 @@ tdm_buffer_list_get_first_entry(struct list_head *list);
 void
 tdm_buffer_list_dump(struct list_head *list);
 
+void
+tdm_buffer_remove_release_handler_internal(tbm_surface_h buffer);
+
 /* event functions for private */
 tdm_error
 tdm_event_loop_init(tdm_private_display *private_display);
 void
 tdm_event_loop_deinit(tdm_private_display *private_display);
 void
+tdm_event_loop_stop(tdm_private_display *private_display);
+void
 tdm_event_loop_create_backend_source(tdm_private_display *private_display);
 int
 tdm_event_loop_get_fd(tdm_private_display *private_display);
@@ -368,22 +568,30 @@ tdm_error
 tdm_event_loop_dispatch(tdm_private_display *private_display);
 void
 tdm_event_loop_flush(tdm_private_display *private_display);
+tdm_error
+tdm_event_loop_trace_enable(tdm_private_display *private_display, unsigned int enable);
 
 typedef enum {
        TDM_THREAD_CB_NONE,
        TDM_THREAD_CB_OUTPUT_COMMIT,
        TDM_THREAD_CB_OUTPUT_VBLANK,
        TDM_THREAD_CB_OUTPUT_STATUS,
+       TDM_THREAD_CB_OUTPUT_DPMS,
        TDM_THREAD_CB_PP_DONE,
        TDM_THREAD_CB_CAPTURE_DONE,
+       TDM_THREAD_CB_VBLANK_SW,
+       TDM_THREAD_CB_NEED_VALIDATE,
 } tdm_thread_cb_type;
 
 typedef struct _tdm_thread_cb_base tdm_thread_cb_base;
 typedef struct _tdm_thread_cb_output_vblank tdm_thread_cb_output_commit;
 typedef struct _tdm_thread_cb_output_vblank tdm_thread_cb_output_vblank;
 typedef struct _tdm_thread_cb_output_status tdm_thread_cb_output_status;
+typedef struct _tdm_thread_cb_output_dpms tdm_thread_cb_output_dpms;
 typedef struct _tdm_thread_cb_pp_done tdm_thread_cb_pp_done;
 typedef struct _tdm_thread_cb_capture_done tdm_thread_cb_capture_done;
+typedef struct _tdm_thread_cb_vblank_sw tdm_thread_cb_vblank_sw;
+typedef struct _tdm_thread_cb_need_validate tdm_thread_cb_need_validate;
 
 struct _tdm_thread_cb_base {
        tdm_thread_cb_type type;
@@ -392,7 +600,7 @@ struct _tdm_thread_cb_base {
 
 struct _tdm_thread_cb_output_vblank {
        tdm_thread_cb_base base;
-       unsigned long output_stamp;
+       double output_stamp;
        unsigned int sequence;
        unsigned int tv_sec;
        unsigned int tv_usec;
@@ -401,14 +609,21 @@ struct _tdm_thread_cb_output_vblank {
 
 struct _tdm_thread_cb_output_status {
        tdm_thread_cb_base base;
-       unsigned long output_stamp;
+       double output_stamp;
        tdm_output_conn_status status;
        void *user_data;
 };
 
+struct _tdm_thread_cb_output_dpms {
+       tdm_thread_cb_base base;
+       double output_stamp;
+       tdm_output_dpms dpms;
+       void *user_data;
+};
+
 struct _tdm_thread_cb_pp_done {
        tdm_thread_cb_base base;
-       unsigned long pp_stamp;
+       double pp_stamp;
        tbm_surface_h src;
        tbm_surface_h dst;
        void *user_data;
@@ -416,11 +631,21 @@ struct _tdm_thread_cb_pp_done {
 
 struct _tdm_thread_cb_capture_done {
        tdm_thread_cb_base base;
-       unsigned long capture_stamp;
+       double capture_stamp;
        tbm_surface_h buffer;
        void *user_data;
 };
 
+struct _tdm_thread_cb_vblank_sw {
+       tdm_thread_cb_base base;
+       double vblank_stamp;
+};
+
+struct _tdm_thread_cb_need_validate {
+       tdm_thread_cb_base base;
+       tdm_private_output *o;
+};
+
 tdm_error
 tdm_thread_init(tdm_private_loop *private_loop);
 void
@@ -440,22 +665,37 @@ tdm_error
 tdm_server_init(tdm_private_loop *private_loop);
 void
 tdm_server_deinit(tdm_private_loop *private_loop);
+const char*
+tdm_server_get_client_name(pid_t pid);
+tdm_error
+tdm_server_enable_ttrace_client_vblank(tdm_display *dpy, tdm_output *output, int enable);
 
-unsigned long
-tdm_helper_get_time_in_millis(void);
-unsigned long
-tdm_helper_get_time_in_micros(void);
+char *
+tdm_helper_dump_make_directory(const char *path, char *reply, int *len);
+void
+tdm_helper_dump_buffer_str(tbm_surface_h buffer, char *dir, char *str);
+double
+tdm_helper_get_time(void);
 
 extern pthread_mutex_t tdm_mutex_check_lock;
 extern int tdm_mutex_locked;
+extern const char *tdm_mutex_lock_func;
+extern int tdm_mutex_lock_line;
+extern const char *tdm_mutex_unlock_func;
+extern int tdm_mutex_unlock_line;
 extern int tdm_dump_enable;
+extern char *tdm_debug_dump_dir;
 
 #define _pthread_mutex_unlock(l) \
        do { \
-               if (tdm_debug_mutex) \
+               if (tdm_debug_module & TDM_DEBUG_MUTEX) \
                        TDM_INFO("mutex unlock"); \
                pthread_mutex_lock(&tdm_mutex_check_lock); \
                tdm_mutex_locked = 0; \
+               tdm_mutex_lock_func = NULL; \
+               tdm_mutex_lock_line = 0; \
+               tdm_mutex_unlock_func = __FUNCTION__; \
+               tdm_mutex_unlock_line = __LINE__; \
                pthread_mutex_unlock(&tdm_mutex_check_lock); \
                pthread_mutex_unlock(l); \
        } while (0)
@@ -463,7 +703,7 @@ extern int tdm_dump_enable;
 #define MUTEX_TIMEOUT_SEC 5
 #define _pthread_mutex_lock(l) \
        do { \
-               if (tdm_debug_mutex) \
+               if (tdm_debug_module & TDM_DEBUG_MUTEX) \
                        TDM_INFO("mutex lock"); \
                struct timespec rtime; \
                clock_gettime(CLOCK_REALTIME, &rtime); \
@@ -475,17 +715,25 @@ extern int tdm_dump_enable;
                else { \
                        pthread_mutex_lock(&tdm_mutex_check_lock); \
                        tdm_mutex_locked = 1; \
+                       tdm_mutex_lock_func = __FUNCTION__; \
+                       tdm_mutex_lock_line = __LINE__; \
+                       tdm_mutex_unlock_func = NULL; \
+                       tdm_mutex_unlock_line = 0; \
                        pthread_mutex_unlock(&tdm_mutex_check_lock); \
                } \
        } while (0)
 #else //TDM_CONFIG_MUTEX_TIMEOUT
 #define _pthread_mutex_lock(l) \
        do { \
-               if (tdm_debug_mutex) \
+               if (tdm_debug_module & TDM_DEBUG_MUTEX) \
                        TDM_INFO("mutex lock"); \
                pthread_mutex_lock(l); \
                pthread_mutex_lock(&tdm_mutex_check_lock); \
                tdm_mutex_locked = 1; \
+               tdm_mutex_lock_func = __FUNCTION__; \
+               tdm_mutex_lock_line = __LINE__; \
+               tdm_mutex_unlock_func = NULL; \
+               tdm_mutex_unlock_line = 0; \
                pthread_mutex_unlock(&tdm_mutex_check_lock); \
        } while (0)
 #endif //TDM_CONFIG_MUTEX_TIMEOUT
@@ -493,23 +741,40 @@ extern int tdm_dump_enable;
 static inline int TDM_MUTEX_IS_LOCKED(void)
 {
        int ret;
+       /* if thread is not running, we don't need to consider mutex things. */
+       if (!tdm_thread_is_running())
+               return 1;
        pthread_mutex_lock(&tdm_mutex_check_lock);
        ret = (tdm_mutex_locked == 1);
        pthread_mutex_unlock(&tdm_mutex_check_lock);
        return ret;
 }
 
-tdm_error
-_tdm_display_lock(tdm_display *dpy, const char *func);
-void
-_tdm_display_unlock(tdm_display *dpy, const char *func);
-
-#define tdm_display_lock(dpy)   _tdm_display_lock(dpy, __FUNCTION__)
-#define tdm_display_unlock(dpy)   _tdm_display_unlock(dpy, __FUNCTION__)
+#define tdm_display_lock(dpy)   _pthread_mutex_lock(&((tdm_private_display *)dpy)->lock)
+#define tdm_display_unlock(dpy)   _pthread_mutex_unlock(&((tdm_private_display *)dpy)->lock)
 
 tdm_error
 tdm_display_update_output(tdm_private_display *private_display,
                                                  tdm_output *output_backend, int pipe);
+tdm_error
+tdm_display_enable_debug_module(const char*modules);
+tdm_error
+tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_str, char *reply, int *len);
+tdm_error
+tdm_display_enable_path(const char *path);
+tdm_error
+tdm_display_enable_ttrace(tdm_private_display *private_display, const char *ttrace, int output_id, char *reply, int *len);
+tdm_error
+tdm_display_enable_fps(tdm_private_display *private_display, int enable);
+
+void
+tdm_monitor_server_command(tdm_display *dpy, const char *options, char *reply, int *len);
+
+struct argument_details {
+       char type;
+       int nullable;
+};
+
 
 #ifdef __cplusplus
 }