#include <string.h>
#include <strings.h>
#include <stdlib.h>
+#include <assert.h>
#include <pthread.h>
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/eventfd.h>
#include <math.h>
-#include <grp.h>
#include <wayland-server-protocol.h>
#include <tbm_bufmgr.h>
#include "tdm_macro.h"
#include "tdm_helper.h"
#include "tdm_thread.h"
+#include "tdm_config.h"
#ifdef __cplusplus
extern "C" {
* - function prototypes
*****************************************************************************/
-extern int tdm_debug_module;
extern int tdm_debug_dump;
extern int tdm_ttrace_module;
extern int tdm_ttrace_output;
int
tdm_display_is_valid(tdm_display *display);
+tdm_private_display *
+tdm_display_get(void);
int
-tdm_display_check_module_abi(tdm_private_display *private_display, int abimaj, int abimin);
+tdm_backend_check_module_abi(tdm_private_backend *private_backend, int abimaj, int abimin);
-tdm_private_output *
+void *
tdm_display_find_output_stamp(tdm_private_display *private_display, double stamp);
-tdm_private_pp *
-tdm_pp_find_stamp(tdm_private_display *private_display, double stamp);
-tdm_private_capture *
-tdm_capture_find_stamp(tdm_private_display *private_display, double stamp);
+tdm_private_output *
+tdm_display_find_private_output(tdm_private_display *private_display, tdm_output *output_backend);
+tdm_error
+tdm_output_init(tdm_private_display *private_display);
int
tdm_output_is_valid(tdm_output *output);
void
-tdm_output_cb_vblank(tdm_output *output_backend, unsigned int sequence,
- unsigned int tv_sec, unsigned int tv_usec, void *user_data);
-void
-tdm_output_cb_commit(tdm_output *output_backend, unsigned int sequence,
- unsigned int tv_sec, unsigned int tv_usec, void *user_data);
+tdm_output_thread_cb_change(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data);
void
tdm_output_cb_status(tdm_output *output_backend, tdm_output_conn_status status,
void *user_data);
tdm_error
tdm_output_cb_need_validate(tdm_private_output *private_output);
+void
+tdm_output_vblank_print_wait_information(tdm_private_output *private_output, void *user_data);
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_need_validate_event_init(tdm_output *output);
+void
+tdm_output_need_validate_handler_thread(tdm_private_display *private_display, void *object, tdm_thread_cb_base *cb_base, void *user_data);
tdm_error
tdm_output_choose_commit_per_vblank_mode(tdm_private_output *private_output, int mode);
tdm_layer_remove_commit_handler_internal(tdm_layer *layer, tdm_layer_commit_handler func, void *user_data);
tdm_error
+tdm_layer_commit_internal(tdm_private_layer *private_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);
+tdm_error
+tdm_layer_set_info_internal(tdm_private_layer *private_layer, tdm_info_layer *info);
+tdm_error
+tdm_layer_set_buffer_internal(tdm_private_layer *private_layer, tbm_surface_h buffer);
+tdm_error
+tdm_layer_unset_buffer_internal(tdm_private_layer *private_layer);
-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_init(tdm_display *dpy);
void
tdm_vblank_deinit(tdm_display *dpy);
tdm_error
-tdm_vblank_cb_vblank_SW(tdm_vblank *vblank, double vblank_stamp);
-tdm_error
-tdm_vblank_cb_vblank_create(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);
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,
- int no_check_thread_id);
-
+tdm_error
+tdm_pp_init(tdm_private_display *private_display);
tdm_private_pp *
-tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error);
+tdm_pp_create_internal(tdm_private_backend *private_backend, tdm_error *error);
void
tdm_pp_destroy_internal(tdm_private_pp *private_pp);
tdm_error
tdm_hwc_window_destroy_internal(tdm_private_hwc_window * private_hwc_window);
+tdm_error
+tdm_capture_init(tdm_private_display *private_display);
tdm_private_capture *
tdm_capture_create_output_internal(tdm_private_output *private_output,
tdm_error *error);
/* utility buffer functions for private */
tdm_buffer_info*
tdm_buffer_get_info(tbm_surface_h buffer);
-tbm_surface_h
-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);
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 char *tdm_debug_dump_dir;
tdm_error
-tdm_display_update_output(tdm_private_display *private_display,
+tdm_display_update_output(tdm_private_backend *private_backend,
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);