summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2024-06-20 13:40:56 +0900
committerchangyeon lee <cyeon.lee@samsung.com>2024-07-23 05:51:08 +0000
commit34db19cec9741eb52c5d16274799e53a5e8f2437 (patch)
treef904123330f7eb740b3b78a87774969969445817
parent3df03feefc92a0a60d2fed403acb40b01fca4294 (diff)
downloadtdm-34db19cec9741eb52c5d16274799e53a5e8f2437.tar.gz
tdm-34db19cec9741eb52c5d16274799e53a5e8f2437.tar.bz2
tdm-34db19cec9741eb52c5d16274799e53a5e8f2437.zip
Add support for HAL_MODULE_TDM v1.0 interface
HAL_MODULE_TDM will support the multiple version of HAL interface. So that v1.0 is first supported version of HAL_MODULE_TDM. hal-tdm-interface-1.h contains the v1.0 HAL interface. Change-Id: I55951bfbe6941cfd9271b0a6b0785502ec16c36d Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r--CMakeLists.txt4
-rw-r--r--include/hal-tdm-interface-1.h182
-rw-r--r--include/hal-tdm-interface.h144
3 files changed, 184 insertions, 146 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed3d7f5..1c976e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,7 +59,5 @@ SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
CONFIGURE_FILE( ${PROJECT_NAME}.pc ${PROJECT_NAME}.pc @ONLY)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR}/hal)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/hal-tdm-types.h DESTINATION ${INCLUDEDIR}/hal)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/hal-tdm.h DESTINATION ${INCLUDEDIR}/hal)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/hal-tdm-interface.h DESTINATION ${INCLUDEDIR}/hal)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${INCLUDEDIR}/hal FILES_MATCHING PATTERN "hal-tdm*.h")
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig)
diff --git a/include/hal-tdm-interface-1.h b/include/hal-tdm-interface-1.h
new file mode 100644
index 0000000..9550645
--- /dev/null
+++ b/include/hal-tdm-interface-1.h
@@ -0,0 +1,182 @@
+/**************************************************************************
+ *
+ * hal-api-tdm
+ *
+ * Copyright 2021 Samsung Electronics co., Ltd. All Rights Reserved.
+ *
+ * Contact: SooChan Lim <sc1.lim@samsung.com>,
+ * Junkyeong Kim <jk0430.kim@samsung.com>,
+ * Shawn Lee <shiin.lee@samsung.com>,
+ * Changyeon Lee <cyeon.lee@samsung.com>,
+ * Joonbum Ko <joonbum.ko@samsung.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+**************************************************************************/
+
+#ifndef __HAL_TDM_INTERFACE_1__
+#define __HAL_TDM_INTERFACE_1__
+
+#include <hal-common-interface.h>
+#include <tbm_surface.h>
+#include <tbm_surface_queue.h>
+
+#include "hal-tdm-types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _hal_tdm_backend_data hal_tdm_backend_data;
+
+typedef struct _hal_tdm_display_funcs hal_tdm_display_funcs;
+typedef struct _hal_tdm_output_funcs hal_tdm_output_funcs;
+typedef struct _hal_tdm_hwc_funcs hal_tdm_hwc_funcs;
+typedef struct _hal_tdm_hwc_window_funcs hal_tdm_hwc_window_funcs;
+typedef struct _hal_tdm_pp_funcs hal_tdm_pp_funcs;
+typedef struct _hal_tdm_capture_funcs hal_tdm_capture_funcs;
+typedef struct _hal_tdm_voutput_funcs hal_tdm_voutput_funcs;
+
+typedef hal_tdm_error (*hal_tdm_master_drm_fd_handler)(hal_tdm_fd master_drm_fd, void *user_data);
+
+struct _hal_tdm_backend_data {
+ hal_tdm_display *display; // handle
+
+ int has_drm_device;
+ struct {
+ hal_tdm_fd drm_fd;
+ int is_master;
+ hal_tdm_master_drm_fd_handler master_drm_fd_func;
+ void *user_data;
+ } drm_info;
+
+ int num_event_sources;
+ hal_tdm_event_source *event_sources[HAL_TDM_EVENT_SOURCE_MAX];
+
+ hal_tdm_display_funcs *display_funcs;
+ hal_tdm_output_funcs *output_funcs;
+ hal_tdm_hwc_funcs *hwc_funcs;
+ hal_tdm_hwc_window_funcs *hwc_window_funcs;
+ hal_tdm_pp_funcs *pp_funcs;
+ hal_tdm_capture_funcs *capture_funcs;
+ hal_tdm_voutput_funcs *voutput_funcs;
+};
+
+struct _hal_tdm_display_funcs {
+ hal_tdm_error (*display_get_capability)(hal_tdm_display *display, hal_tdm_caps_display *caps);
+ hal_tdm_error (*display_get_pp_capability)(hal_tdm_display *display, hal_tdm_caps_pp *caps);
+ hal_tdm_error (*display_get_capture_capability)(hal_tdm_display *display, hal_tdm_caps_capture *caps);
+ hal_tdm_output **(*display_get_outputs)(hal_tdm_display *display, int *count, hal_tdm_error *error);
+ hal_tdm_error (*display_get_fd)(hal_tdm_display *display, int *fd);
+ hal_tdm_error (*display_handle_events)(hal_tdm_display *display);
+ hal_tdm_pp *(*display_create_pp)(hal_tdm_display *display, hal_tdm_error *error);
+ hal_tdm_voutput *(*display_voutput_create)(hal_tdm_display *display, const char *name, hal_tdm_error *error);
+};
+
+struct _hal_tdm_output_funcs {
+ hal_tdm_error (*output_get_capability)(hal_tdm_output *output, hal_tdm_caps_output *caps);
+ hal_tdm_error (*output_set_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value value);
+ hal_tdm_error (*output_get_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value *value);
+ hal_tdm_error (*output_wait_vblank)(hal_tdm_output *output, int interval, int sync, void *user_data);
+ hal_tdm_error (*output_set_vblank_handler)(hal_tdm_output *output, hal_tdm_output_vblank_handler func);
+ hal_tdm_error (*output_set_dpms)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value);
+ hal_tdm_error (*output_get_dpms)(hal_tdm_output *output, hal_tdm_output_dpms *dpms_value);
+ hal_tdm_error (*output_set_mode)(hal_tdm_output *output, const hal_tdm_output_mode *mode);
+ hal_tdm_error (*output_get_mode)(hal_tdm_output *output, const hal_tdm_output_mode **mode);
+ hal_tdm_capture *(*output_create_capture)(hal_tdm_output *output, hal_tdm_error *error);
+ hal_tdm_error (*output_set_status_handler)(hal_tdm_output *output, hal_tdm_output_status_handler func, void *user_data);
+ hal_tdm_error (*output_set_dpms_handler)(hal_tdm_output *output, hal_tdm_output_dpms_handler func, void *user_data);
+ hal_tdm_error (*output_set_dpms_async)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value, int *sync);
+ hal_tdm_hwc *(*output_get_hwc)(hal_tdm_output *output, hal_tdm_error *error);
+ hal_tdm_error (*output_set_mirror)(hal_tdm_output *output, hal_tdm_output *src_output, hal_tdm_transform transform);
+ hal_tdm_error (*output_unset_mirror)(hal_tdm_output *output);
+};
+
+struct _hal_tdm_voutput_funcs {
+ hal_tdm_error (*voutput_destroy)(hal_tdm_voutput *voutput);
+ hal_tdm_error (*voutput_set_available_mode)(hal_tdm_voutput *voutput, const hal_tdm_output_mode *modes, int count);
+ hal_tdm_error (*voutput_set_physical_size)(hal_tdm_voutput *voutput, unsigned int mmwidth, unsigned int mmheight);
+ hal_tdm_error (*voutput_connect)(hal_tdm_voutput *voutput);
+ hal_tdm_error (*voutput_disconnect)(hal_tdm_voutput *voutput);
+ hal_tdm_output *(*voutput_get_output)(hal_tdm_voutput *voutput, hal_tdm_error *error);
+ hal_tdm_error (*voutput_set_commit_func)(hal_tdm_voutput *voutput, hal_tdm_voutput_commit_handler commit_func);
+ hal_tdm_error (*voutput_commit_done)(hal_tdm_voutput *voutput);
+ hal_tdm_error (*voutput_set_target_buffer_queue_flag)(hal_tdm_voutput *voutput, int flags);
+};
+
+struct _hal_tdm_hwc_funcs {
+ hal_tdm_hwc_window *(*hwc_create_window)(hal_tdm_hwc *hwc, hal_tdm_error *error);
+ hal_tdm_error (*hwc_get_video_supported_formats)(hal_tdm_hwc *hwc, const tbm_format **formats, int *count);
+ hal_tdm_error (*hwc_get_video_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
+ hal_tdm_error (*hwc_get_capabilities)(hal_tdm_hwc *hwc, hal_tdm_hwc_capability *capabilities);
+ hal_tdm_error (*hwc_get_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
+ tbm_surface_queue_h (*hwc_get_client_target_buffer_queue)(hal_tdm_hwc *hwc, hal_tdm_error *error);
+ hal_tdm_error (*hwc_set_client_target_buffer)(hal_tdm_hwc *hwc, tbm_surface_h target_buffer, hal_tdm_region damage);
+ hal_tdm_error (*hwc_set_client_target_acquire_fence)(hal_tdm_hwc *hwc, int acquire_fence);
+ hal_tdm_error (*hwc_validate)(hal_tdm_hwc *hwc, hal_tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types);
+ hal_tdm_error (*hwc_get_changed_composition_types)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_window, hal_tdm_hwc_window_composition *composition_types);
+ hal_tdm_error (*hwc_accept_validation)(hal_tdm_hwc *hwc);
+ hal_tdm_error (*hwc_commit)(hal_tdm_hwc *hwc, int sync, void *user_data);
+ hal_tdm_error (*hwc_set_commit_handler)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_handler func);
+ hal_tdm_error (*hwc_get_commit_fence)(hal_tdm_hwc *hwc, int *commit_fence);
+ hal_tdm_error (*hwc_get_release_fences)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_windows, int *release_fences);
+ hal_tdm_error (*hwc_set_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value value);
+ hal_tdm_error (*hwc_get_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value *value);
+ hal_tdm_error (*hwc_get_commit_interval)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_interval *interval);
+ hal_tdm_error (*hwc_set_client_target_buffer_info)(hal_tdm_hwc *hwc, hal_tdm_hwc_window_info *info);
+};
+
+struct _hal_tdm_hwc_window_funcs {
+ void (*hwc_window_destroy)(hal_tdm_hwc_window *hwc_window);
+ tbm_surface_queue_h (*hwc_window_acquire_buffer_queue)(hal_tdm_hwc_window *hwc_window, hal_tdm_error *error);
+ void (*hwc_window_release_buffer_queue)(hal_tdm_hwc_window *hwc_window, tbm_surface_queue_h queue);
+ hal_tdm_error (*hwc_window_set_composition_type)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_composition composition_type);
+ hal_tdm_error (*hwc_window_set_buffer_damage)(hal_tdm_hwc_window *hwc_window, hal_tdm_region damage);
+ hal_tdm_error (*hwc_window_set_info)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_info *info);
+ hal_tdm_error (*hwc_window_set_buffer)(hal_tdm_hwc_window *hwc_window, tbm_surface_h buffer);
+ hal_tdm_error (*hwc_window_set_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value value);
+ hal_tdm_error (*hwc_window_get_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value *value);
+ hal_tdm_error (*hwc_window_get_constraints)(hal_tdm_hwc_window *hwc_window, int *constraints);
+ hal_tdm_error (*hwc_window_set_name)(hal_tdm_hwc_window *hwc_window, const char *name);
+ hal_tdm_error (*hwc_window_set_cursor_image)(hal_tdm_hwc_window *hwc_window, int width, int height, int stride, void *ptr);
+ hal_tdm_error (*hwc_window_set_acquire_fence)(hal_tdm_hwc_window *hwc_window, int acquire_fence);
+};
+
+struct _hal_tdm_pp_funcs {
+ void (*pp_destroy)(hal_tdm_pp *pp);
+ hal_tdm_error (*pp_set_info)(hal_tdm_pp *pp, hal_tdm_info_pp *info);
+ hal_tdm_error (*pp_attach)(hal_tdm_pp *pp, tbm_surface_h src, tbm_surface_h dst);
+ hal_tdm_error (*pp_commit)(hal_tdm_pp *pp);
+ hal_tdm_error (*pp_set_done_handler)(hal_tdm_pp *pp, hal_tdm_pp_done_handler func, void *user_data);
+};
+
+typedef struct _hal_tdm_capture_funcs {
+ void (*capture_destroy)(hal_tdm_capture *capture);
+ hal_tdm_error (*capture_set_info)(hal_tdm_capture *capture, hal_tdm_info_capture *info);
+ hal_tdm_error (*capture_attach)(hal_tdm_capture *capture, tbm_surface_h buffer);
+ hal_tdm_error (*capture_commit)(hal_tdm_capture *capture);
+ hal_tdm_error (*capture_set_done_handler)(hal_tdm_capture *capture, hal_tdm_capture_done_handler func, void *user_data);
+} hal_tdm_capture_funcs;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __HAL_TDM_INTERFACE_1__ */
diff --git a/include/hal-tdm-interface.h b/include/hal-tdm-interface.h
index 8fdcf1b..0c38014 100644
--- a/include/hal-tdm-interface.h
+++ b/include/hal-tdm-interface.h
@@ -35,148 +35,6 @@
#ifndef __HAL_TDM_INTERFACE__
#define __HAL_TDM_INTERFACE__
-#include <hal-common-interface.h>
-#include <tbm_surface.h>
-#include <tbm_surface_queue.h>
+#include <hal-tdm-interface-1.h>
-#include "hal-tdm-types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _hal_tdm_backend_data hal_tdm_backend_data;
-
-typedef struct _hal_tdm_display_funcs hal_tdm_display_funcs;
-typedef struct _hal_tdm_output_funcs hal_tdm_output_funcs;
-typedef struct _hal_tdm_hwc_funcs hal_tdm_hwc_funcs;
-typedef struct _hal_tdm_hwc_window_funcs hal_tdm_hwc_window_funcs;
-typedef struct _hal_tdm_pp_funcs hal_tdm_pp_funcs;
-typedef struct _hal_tdm_capture_funcs hal_tdm_capture_funcs;
-typedef struct _hal_tdm_voutput_funcs hal_tdm_voutput_funcs;
-
-typedef hal_tdm_error (*hal_tdm_master_drm_fd_handler)(hal_tdm_fd master_drm_fd, void *user_data);
-
-struct _hal_tdm_backend_data {
- hal_tdm_display *display; // handle
-
- int has_drm_device;
- struct {
- hal_tdm_fd drm_fd;
- int is_master;
- hal_tdm_master_drm_fd_handler master_drm_fd_func;
- void *user_data;
- } drm_info;
-
- int num_event_sources;
- hal_tdm_event_source *event_sources[HAL_TDM_EVENT_SOURCE_MAX];
-
- hal_tdm_display_funcs *display_funcs;
- hal_tdm_output_funcs *output_funcs;
- hal_tdm_hwc_funcs *hwc_funcs;
- hal_tdm_hwc_window_funcs *hwc_window_funcs;
- hal_tdm_pp_funcs *pp_funcs;
- hal_tdm_capture_funcs *capture_funcs;
- hal_tdm_voutput_funcs *voutput_funcs;
-};
-
-struct _hal_tdm_display_funcs {
- hal_tdm_error (*display_get_capability)(hal_tdm_display *display, hal_tdm_caps_display *caps);
- hal_tdm_error (*display_get_pp_capability)(hal_tdm_display *display, hal_tdm_caps_pp *caps);
- hal_tdm_error (*display_get_capture_capability)(hal_tdm_display *display, hal_tdm_caps_capture *caps);
- hal_tdm_output **(*display_get_outputs)(hal_tdm_display *display, int *count, hal_tdm_error *error);
- hal_tdm_error (*display_get_fd)(hal_tdm_display *display, int *fd);
- hal_tdm_error (*display_handle_events)(hal_tdm_display *display);
- hal_tdm_pp *(*display_create_pp)(hal_tdm_display *display, hal_tdm_error *error);
- hal_tdm_voutput *(*display_voutput_create)(hal_tdm_display *display, const char *name, hal_tdm_error *error);
-};
-
-struct _hal_tdm_output_funcs {
- hal_tdm_error (*output_get_capability)(hal_tdm_output *output, hal_tdm_caps_output *caps);
- hal_tdm_error (*output_set_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value value);
- hal_tdm_error (*output_get_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value *value);
- hal_tdm_error (*output_wait_vblank)(hal_tdm_output *output, int interval, int sync, void *user_data);
- hal_tdm_error (*output_set_vblank_handler)(hal_tdm_output *output, hal_tdm_output_vblank_handler func);
- hal_tdm_error (*output_set_dpms)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value);
- hal_tdm_error (*output_get_dpms)(hal_tdm_output *output, hal_tdm_output_dpms *dpms_value);
- hal_tdm_error (*output_set_mode)(hal_tdm_output *output, const hal_tdm_output_mode *mode);
- hal_tdm_error (*output_get_mode)(hal_tdm_output *output, const hal_tdm_output_mode **mode);
- hal_tdm_capture *(*output_create_capture)(hal_tdm_output *output, hal_tdm_error *error);
- hal_tdm_error (*output_set_status_handler)(hal_tdm_output *output, hal_tdm_output_status_handler func, void *user_data);
- hal_tdm_error (*output_set_dpms_handler)(hal_tdm_output *output, hal_tdm_output_dpms_handler func, void *user_data);
- hal_tdm_error (*output_set_dpms_async)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value, int *sync);
- hal_tdm_hwc *(*output_get_hwc)(hal_tdm_output *output, hal_tdm_error *error);
- hal_tdm_error (*output_set_mirror)(hal_tdm_output *output, hal_tdm_output *src_output, hal_tdm_transform transform);
- hal_tdm_error (*output_unset_mirror)(hal_tdm_output *output);
-};
-
-struct _hal_tdm_voutput_funcs {
- hal_tdm_error (*voutput_destroy)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_set_available_mode)(hal_tdm_voutput *voutput, const hal_tdm_output_mode *modes, int count);
- hal_tdm_error (*voutput_set_physical_size)(hal_tdm_voutput *voutput, unsigned int mmwidth, unsigned int mmheight);
- hal_tdm_error (*voutput_connect)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_disconnect)(hal_tdm_voutput *voutput);
- hal_tdm_output *(*voutput_get_output)(hal_tdm_voutput *voutput, hal_tdm_error *error);
- hal_tdm_error (*voutput_set_commit_func)(hal_tdm_voutput *voutput, hal_tdm_voutput_commit_handler commit_func);
- hal_tdm_error (*voutput_commit_done)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_set_target_buffer_queue_flag)(hal_tdm_voutput *voutput, int flags);
-};
-
-struct _hal_tdm_hwc_funcs {
- hal_tdm_hwc_window *(*hwc_create_window)(hal_tdm_hwc *hwc, hal_tdm_error *error);
- hal_tdm_error (*hwc_get_video_supported_formats)(hal_tdm_hwc *hwc, const tbm_format **formats, int *count);
- hal_tdm_error (*hwc_get_video_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
- hal_tdm_error (*hwc_get_capabilities)(hal_tdm_hwc *hwc, hal_tdm_hwc_capability *capabilities);
- hal_tdm_error (*hwc_get_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
- tbm_surface_queue_h (*hwc_get_client_target_buffer_queue)(hal_tdm_hwc *hwc, hal_tdm_error *error);
- hal_tdm_error (*hwc_set_client_target_buffer)(hal_tdm_hwc *hwc, tbm_surface_h target_buffer, hal_tdm_region damage);
- hal_tdm_error (*hwc_set_client_target_acquire_fence)(hal_tdm_hwc *hwc, int acquire_fence);
- hal_tdm_error (*hwc_validate)(hal_tdm_hwc *hwc, hal_tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types);
- hal_tdm_error (*hwc_get_changed_composition_types)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_window, hal_tdm_hwc_window_composition *composition_types);
- hal_tdm_error (*hwc_accept_validation)(hal_tdm_hwc *hwc);
- hal_tdm_error (*hwc_commit)(hal_tdm_hwc *hwc, int sync, void *user_data);
- hal_tdm_error (*hwc_set_commit_handler)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_handler func);
- hal_tdm_error (*hwc_get_commit_fence)(hal_tdm_hwc *hwc, int *commit_fence);
- hal_tdm_error (*hwc_get_release_fences)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_windows, int *release_fences);
- hal_tdm_error (*hwc_set_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value value);
- hal_tdm_error (*hwc_get_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value *value);
- hal_tdm_error (*hwc_get_commit_interval)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_interval *interval);
- hal_tdm_error (*hwc_set_client_target_buffer_info)(hal_tdm_hwc *hwc, hal_tdm_hwc_window_info *info);
-};
-
-struct _hal_tdm_hwc_window_funcs {
- void (*hwc_window_destroy)(hal_tdm_hwc_window *hwc_window);
- tbm_surface_queue_h (*hwc_window_acquire_buffer_queue)(hal_tdm_hwc_window *hwc_window, hal_tdm_error *error);
- void (*hwc_window_release_buffer_queue)(hal_tdm_hwc_window *hwc_window, tbm_surface_queue_h queue);
- hal_tdm_error (*hwc_window_set_composition_type)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_composition composition_type);
- hal_tdm_error (*hwc_window_set_buffer_damage)(hal_tdm_hwc_window *hwc_window, hal_tdm_region damage);
- hal_tdm_error (*hwc_window_set_info)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_info *info);
- hal_tdm_error (*hwc_window_set_buffer)(hal_tdm_hwc_window *hwc_window, tbm_surface_h buffer);
- hal_tdm_error (*hwc_window_set_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value value);
- hal_tdm_error (*hwc_window_get_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value *value);
- hal_tdm_error (*hwc_window_get_constraints)(hal_tdm_hwc_window *hwc_window, int *constraints);
- hal_tdm_error (*hwc_window_set_name)(hal_tdm_hwc_window *hwc_window, const char *name);
- hal_tdm_error (*hwc_window_set_cursor_image)(hal_tdm_hwc_window *hwc_window, int width, int height, int stride, void *ptr);
- hal_tdm_error (*hwc_window_set_acquire_fence)(hal_tdm_hwc_window *hwc_window, int acquire_fence);
-};
-
-struct _hal_tdm_pp_funcs {
- void (*pp_destroy)(hal_tdm_pp *pp);
- hal_tdm_error (*pp_set_info)(hal_tdm_pp *pp, hal_tdm_info_pp *info);
- hal_tdm_error (*pp_attach)(hal_tdm_pp *pp, tbm_surface_h src, tbm_surface_h dst);
- hal_tdm_error (*pp_commit)(hal_tdm_pp *pp);
- hal_tdm_error (*pp_set_done_handler)(hal_tdm_pp *pp, hal_tdm_pp_done_handler func, void *user_data);
-};
-
-typedef struct _hal_tdm_capture_funcs {
- void (*capture_destroy)(hal_tdm_capture *capture);
- hal_tdm_error (*capture_set_info)(hal_tdm_capture *capture, hal_tdm_info_capture *info);
- hal_tdm_error (*capture_attach)(hal_tdm_capture *capture, tbm_surface_h buffer);
- hal_tdm_error (*capture_commit)(hal_tdm_capture *capture);
- hal_tdm_error (*capture_set_done_handler)(hal_tdm_capture *capture, hal_tdm_capture_done_handler func, void *user_data);
-} hal_tdm_capture_funcs;
-
-#ifdef __cplusplus
-}
-#endif
#endif /* __HAL_TDM_INTERFACE__ */