typedef struct _tdm_private_module tdm_private_module;
typedef struct _tdm_private_display tdm_private_display;
typedef struct _tdm_private_output tdm_private_output;
+typedef struct _tdm_private_voutput tdm_private_voutput;
typedef struct _tdm_private_layer tdm_private_layer;
typedef struct _tdm_private_hwc tdm_private_hwc;
typedef struct _tdm_private_hwc_window tdm_private_hwc_window;
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_output_create_handler tdm_private_output_create_handler;
+typedef struct _tdm_private_output_destroy_handler tdm_private_output_destroy_handler;
typedef struct _tdm_private_output_change_handler tdm_private_output_change_handler;
typedef struct _tdm_private_output_commit_handler tdm_private_output_commit_handler;
typedef struct _tdm_private_output_vblank_handler tdm_private_output_vblank_handler;
+typedef struct _tdm_private_output_mode_change_handler tdm_private_output_mode_change_handler;
typedef struct _tdm_private_layer_commit_handler tdm_private_layer_commit_handler;
typedef struct _tdm_private_hwc_commit_handler tdm_private_hwc_commit_handler;
+typedef struct _tdm_private_voutput_commit_handler tdm_private_voutput_commit_handler;
typedef struct _tdm_private_layer_buffer tdm_private_layer_buffer;
tdm_display_capability capabilities;
tdm_func_display func_display;
tdm_func_output func_output;
+ tdm_func_voutput func_voutput;
tdm_func_layer func_layer;
tdm_func_hwc func_hwc;
tdm_func_hwc_window func_hwc_window;
/* output, pp list */
struct list_head output_list;
+ struct list_head voutput_list;
struct list_head pp_list;
struct list_head capture_list;
int fd;
tdm_event_loop_source *event_source;
+
+ /* backend virtual output target buffer type default set for hwc */
+ int use_default_type_bo;
};
struct _tdm_private_display {
#endif
struct list_head module_list;
+ tdm_private_module *dummy_module;
+ tdm_private_module *virtual_module;
tdm_private_module *current_module; //setted only when loading
tdm_private_module *pp_module; //pp-support backend
tdm_private_module *capture_module; //TODO: remove later
/* for event handling */
tdm_private_loop *private_loop;
+ struct list_head output_create_handler_list;
+
int print_fps;
};
struct list_head link;
tdm_private_module *private_module;
+ tdm_private_voutput *private_voutput;
int index;
double stamp;
tdm_event_loop_source *vblank_timeout_timer;
unsigned int vblank_timeout_timer_expired;
+ struct list_head destroy_handler_list;
struct list_head change_handler_list;
void **layers_ptr;
/* hwc */
int need_set_target_info;
tdm_private_hwc *private_hwc;
+
+ /* virtual */
+ char name[TDM_NAME_LEN];
+ struct list_head mode_change_request_handler_list;
+};
+
+struct _tdm_private_voutput {
+ struct list_head link;
+
+ tdm_private_module *private_module;
+
+ int regist_commit_cb;
+
+ struct list_head voutput_commit_handler_list;
+
+ int index;
+
+ tdm_private_display *private_display;
+ tdm_private_output *private_output;
+
+ tdm_voutput *voutput_backend;
+
+ char name[TDM_NAME_LEN];
+ tdm_output_mode *modes;
+ int mode_count;
+ unsigned int mmwidth;
+ unsigned int mmheight;
+ int connect_status;
+
+ int set_voutput_commit;
};
struct _tdm_private_layer {
double fps_stamp;
unsigned int fps_count;
+
+ /* virtual */
+ tbm_surface_h commiting_buffer;
};
struct _tdm_private_hwc {
int regist_commit_cb;
tdm_hwc *hwc_backend;
+
+ tbm_surface_h display_target_buffer;
+
+ double fps_stamp;
+ unsigned int fps_count;
};
struct _tdm_private_hwc_window {
pid_t owner_tid;
};
+struct _tdm_private_output_create_handler {
+ struct list_head link;
+
+ tdm_private_display *private_display;
+ tdm_output_create_handler func;
+ void *user_data;
+
+ pid_t owner_tid;
+};
+
+struct _tdm_private_output_destroy_handler {
+ struct list_head link;
+
+ tdm_private_output *private_output;
+ tdm_output_destroy_handler func;
+ void *user_data;
+
+ pid_t owner_tid;
+};
+
struct _tdm_private_output_change_handler {
struct list_head link;
pid_t owner_tid;
};
+struct _tdm_private_voutput_commit_handler {
+ struct list_head link;
+
+ tdm_private_voutput *private_voutput;
+ tdm_voutput_commit_func func;
+ void *user_data;
+
+ pid_t owner_tid;
+};
+
+struct _tdm_private_output_mode_change_handler {
+ struct list_head link;
+
+ tdm_private_output *private_output;
+ tdm_output_mode_change_request_handler func;
+ void *user_data;
+};
+
struct _tdm_private_hwc_commit_handler {
struct list_head link;
void *user_data;
pid_t owner_tid;
+ int use_vblank;
};
struct _tdm_private_layer_commit_handler {
typedef enum {
TDM_THREAD_CB_NONE,
TDM_THREAD_CB_EXIT, /* special type to exit the tdm-thread */
+ TDM_THREAD_CB_DISPLAY_OUTPUT_CREATE,
+ TDM_THREAD_CB_OUTPUT_DESTROY,
TDM_THREAD_CB_OUTPUT_COMMIT,
TDM_THREAD_CB_OUTPUT_VBLANK,
TDM_THREAD_CB_OUTPUT_STATUS,
TDM_THREAD_CB_VBLANK_SW,
TDM_THREAD_CB_VBLANK_CREATE,
TDM_THREAD_CB_HWC_COMMIT,
+ TDM_THREAD_CB_VOUTPUT_COMMIT,
TDM_THREAD_CB_MAX,
} tdm_thread_cb_type;
typedef struct _tdm_thread_cb_base tdm_thread_cb_base;
+typedef struct _tdm_thread_cb_display_output_create tdm_thread_cb_display_output_create;
+typedef struct _tdm_thread_cb_output_destroy tdm_thread_cb_output_destroy;
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_dpms tdm_thread_cb_output_dpms;
typedef struct _tdm_thread_cb_vblank_sw tdm_thread_cb_vblank_sw;
typedef struct _tdm_thread_cb_vblank_create tdm_thread_cb_vblank_create;
typedef struct _tdm_thread_cb_output_vblank tdm_thread_cb_hwc_commit;
+typedef struct _tdm_thread_cb_output_vblank tdm_thread_cb_voutput_commit;
struct _tdm_thread_cb_base {
tdm_thread_cb_type type;
unsigned int sync;
};
+struct _tdm_thread_cb_display_output_create {
+ tdm_thread_cb_base base;
+ tdm_output *output;
+};
+
+struct _tdm_thread_cb_output_destroy {
+ tdm_thread_cb_base base;
+};
+
struct _tdm_thread_cb_output_vblank {
tdm_thread_cb_base base;
unsigned int sequence;