1 /**************************************************************************
5 * Copyright 2021 Samsung Electronics co., Ltd. All Rights Reserved.
7 * Contact: SooChan Lim <sc1.lim@samsung.com>,
8 * Junkyeong Kim <jk0430.kim@samsung.com>,
9 * Shawn Lee <shiin.lee@samsung.com>,
10 * Changyeon Lee <cyeon.lee@samsung.com>,
11 * Joonbum Ko <joonbum.ko@samsung.com>
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the
15 * "Software"), to deal in the Software without restriction, including
16 * without limitation the rights to use, copy, modify, merge, publish,
17 * distribute, sub license, and/or sell copies of the Software, and to
18 * permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
21 * The above copyright notice and this permission notice (including the
22 * next paragraph) shall be included in all copies or substantial portions
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
28 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
29 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 **************************************************************************/
35 #ifndef __HAL_TDM_TYPES_H__
36 #define __HAL_TDM_TYPES_H__
39 #include <tbm_surface.h>
46 * @file hal-tdm-types.h
47 * @brief The header file which defines Enumerations and Structures for frontend and backend.
49 * Both frontend(@ref hal-tdm.h) and backend(@ref hal-tdm-interface.h) header files
50 * include @ref hal-tdm-types.h
53 * #include <hal-tdm.h> //for a frontend user
56 * #include <hal-tdm_interface.h> //for a vendor to implement a backend module
60 #define HAL_TDM_NAME_LEN 64
61 #define HAL_TDM_PATH_LEN 1024
62 #define HAL_TDM_VBLANK_DEFAULT_NAME "Unknown"
63 #define HAL_TDM_EVENT_SOURCE_MAX 3
66 * @brief The error enumeration
69 HAL_TDM_ERROR_NONE = 0, /**< none */
70 HAL_TDM_ERROR_BAD_REQUEST = -1, /**< bad request */
71 HAL_TDM_ERROR_OPERATION_FAILED = -2, /**< operaion failed */
72 HAL_TDM_ERROR_INVALID_PARAMETER = -3, /**< wrong input parameter */
73 HAL_TDM_ERROR_PERMISSION_DENIED = -4, /**< access denied */
74 HAL_TDM_ERROR_BUSY = -5, /**< hardware resource busy */
75 HAL_TDM_ERROR_OUT_OF_MEMORY = -6, /**< no free memory */
76 HAL_TDM_ERROR_BAD_MODULE = -7, /**< bad backend module */
77 HAL_TDM_ERROR_NOT_IMPLEMENTED = -8, /**< not implemented */
78 HAL_TDM_ERROR_NO_CAPABILITY = -9, /**< no capability */
79 HAL_TDM_ERROR_DPMS_OFF = -10, /**< dpms off */
80 HAL_TDM_ERROR_OUTPUT_DISCONNECTED = -11, /**< output disconnected */
81 HAL_TDM_ERROR_PROTOCOL_ERROR = -12, /**< protocol error */
82 HAL_TDM_ERROR_TIMEOUT = -13, /**< timeout */
83 HAL_TDM_ERROR_NO_MODULE = -14, /**< no backend module */
87 * @brief The transform enumeration(rotate, flip)
90 HAL_TDM_TRANSFORM_NORMAL = 0, /**< no transform */
91 HAL_TDM_TRANSFORM_90 = 1, /**< rotate 90 degrees clockwise */
92 HAL_TDM_TRANSFORM_180 = 2, /**< rotate 180 degrees clockwise */
93 HAL_TDM_TRANSFORM_270 = 3, /**< rotate 270 degrees clockwise */
94 HAL_TDM_TRANSFORM_FLIPPED = 4, /**< no rotate and horizontal flip */
95 HAL_TDM_TRANSFORM_FLIPPED_90 = 5, /**< rotate 90 degrees clockwise and horizontal flip */
96 HAL_TDM_TRANSFORM_FLIPPED_180 = 6, /**< rotate 180 degrees clockwise and horizontal flip */
97 HAL_TDM_TRANSFORM_FLIPPED_270 = 7, /**< rotate 270 degrees clockwise and horizontal flip */
101 * @brief The output capability enumeration
103 * If a backend module provides #HAL_TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS, we can set
104 * an extended DPMS mode to an output which a backend module supports.
105 * Don't use the low-4bit for an extended DPMS mode value. It's used for default
109 HAL_TDM_OUTPUT_CAPABILITY_ASYNC_DPMS = (1 << 0), /**< if a outupt supports asynchronous DPMS operation */
110 HAL_TDM_OUTPUT_CAPABILITY_HWC = (1 << 1), /**< if a outupt supports hwc operation @since 2.0.0*/
111 HAL_TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS = (1 << 2), /**< if a outupt supports extended DPMS operation @since 2.0.0 */
112 HAL_TDM_OUTPUT_CAPABILITY_MIRROR = (1 << 3), /**< if a outupt supports the displying mirror image of the src_output @since 2.9.0 */
113 } hal_tdm_output_capability;
116 * @brief The pp capability enumeration
117 * @details The scale, transform and CSC functionalities seem the default functions of PP.
118 * If hardware device doesn't support one of them, we'd better let a developer know
119 * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
122 HAL_TDM_PP_CAPABILITY_SYNC = (1 << 0), /**< The pp device supports synchronous operation */
123 HAL_TDM_PP_CAPABILITY_ASYNC = (1 << 1), /**< The pp device supports asynchronous operation */
124 HAL_TDM_PP_CAPABILITY_SCANOUT = (1 << 4), /**< The pp device supports only scanout buffer */
125 HAL_TDM_PP_CAPABILITY_NO_CSC = (1 << 5), /**< The pp device doesn't support Color Space Conversion */
126 HAL_TDM_PP_CAPABILITY_NO_TRANSFORM_ROTATION = (1 << 6), /**< The pp device doesn't support rotation transform */
127 } hal_tdm_pp_capability;
130 * @brief The capture capability enumeration
131 * @details The scale, transform and CSC functionalities seem the default functions of capture.
132 * If hardware device doesn't support one of them, we'd better let a developer know
133 * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
136 HAL_TDM_CAPTURE_CAPABILITY_OUTPUT = (1 << 0), /**< The capture device supports to dump a output */
137 HAL_TDM_CAPTURE_CAPABILITY_LAYER = (1 << 1), /**< The capture device supports to dump a layer */
138 HAL_TDM_CAPTURE_CAPABILITY_ONESHOT = (1 << 4), /**< The capture device supports oneshot dump */
139 HAL_TDM_CAPTURE_CAPABILITY_STREAM = (1 << 5), /**< The capture device supports streamp sump */
140 } hal_tdm_capture_capability;
143 * @brief The capture type enumeration
146 HAL_TDM_CAPTURE_TYPE_ONESHOT = (1 << 0), /**< The oneshot capture */
147 HAL_TDM_CAPTURE_TYPE_STREAM = (1 << 1), /**< The stream capture */
148 } hal_tdm_capture_type;
151 * @brief The output change enumeration of #tdm_output_change_handler
154 HAL_TDM_OUTPUT_CHANGE_CONNECTION = (1 << 0), /**< connection chagne */
155 HAL_TDM_OUTPUT_CHANGE_DPMS = (1 << 1), /**< dpms change */
156 } hal_tdm_output_change_type;
159 * @brief The output connection status enumeration
162 HAL_TDM_OUTPUT_CONN_STATUS_DISCONNECTED, /**< output disconnected */
163 HAL_TDM_OUTPUT_CONN_STATUS_CONNECTED, /**< output connected */
164 HAL_TDM_OUTPUT_CONN_STATUS_MODE_SETTED, /**< output connected and setted a mode */
165 } hal_tdm_output_conn_status;
168 * @brief The output connection status enumeration
169 * @details bit compatible with the libdrm definitions.
172 HAL_TDM_OUTPUT_TYPE_Unknown, /**< unknown */
173 HAL_TDM_OUTPUT_TYPE_VGA, /**< VGA connection */
174 HAL_TDM_OUTPUT_TYPE_DVII, /**< DVII connection */
175 HAL_TDM_OUTPUT_TYPE_DVID, /**< DVID connection */
176 HAL_TDM_OUTPUT_TYPE_DVIA, /**< DVIA connection */
177 HAL_TDM_OUTPUT_TYPE_Composite, /**< Composite connection */
178 HAL_TDM_OUTPUT_TYPE_SVIDEO, /**< SVIDEO connection */
179 HAL_TDM_OUTPUT_TYPE_LVDS, /**< LVDS connection */
180 HAL_TDM_OUTPUT_TYPE_Component, /**< Component connection */
181 HAL_TDM_OUTPUT_TYPE_9PinDIN, /**< 9PinDIN connection */
182 HAL_TDM_OUTPUT_TYPE_DisplayPort, /**< DisplayPort connection */
183 HAL_TDM_OUTPUT_TYPE_HDMIA, /**< HDMIA connection */
184 HAL_TDM_OUTPUT_TYPE_HDMIB, /**< HDMIB connection */
185 HAL_TDM_OUTPUT_TYPE_TV, /**< TV connection */
186 HAL_TDM_OUTPUT_TYPE_eDP, /**< eDP connection */
187 HAL_TDM_OUTPUT_TYPE_VIRTUAL, /**< Virtual connection for WiFi Display */
188 HAL_TDM_OUTPUT_TYPE_DSI, /**< DSI connection */
189 } hal_tdm_output_type;
192 * @brief The DPMS enumeration
193 * @details bit compatible with the libdrm definitions.
196 HAL_TDM_OUTPUT_DPMS_ON, /**< On, Vsync On */
197 HAL_TDM_OUTPUT_DPMS_STANDBY, /**< StandBy, Vsync On */
198 HAL_TDM_OUTPUT_DPMS_SUSPEND, /**< Suspend, Vsync Off */
199 HAL_TDM_OUTPUT_DPMS_OFF, /**< Off, Vsync Off */
200 HAL_TDM_OUTPUT_DPMS_AOD = 0x10, /**< AOD, Vsync On, extended DPMS mode */
201 } hal_tdm_output_dpms;
204 * @brief The output mode type enumeration
205 * @details bit compatible with the libdrm definitions.
208 HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN = (1 << 0),
209 HAL_TDM_OUTPUT_MODE_TYPE_CLOCK_C = ((1 << 1) | HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN),
210 HAL_TDM_OUTPUT_MODE_TYPE_CRTC_C = ((1 << 2) | HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN),
211 HAL_TDM_OUTPUT_MODE_TYPE_PREFERRED = (1 << 3),
212 HAL_TDM_OUTPUT_MODE_TYPE_DEFAULT = (1 << 4),
213 HAL_TDM_OUTPUT_MODE_TYPE_USERDEF = (1 << 5),
214 HAL_TDM_OUTPUT_MODE_TYPE_DRIVER = (1 << 6),
215 } hal_tdm_output_mode_type;
218 * @brief The output mode flag enumeration
219 * @details bit compatible with the libdrm definitions.
222 HAL_TDM_OUTPUT_MODE_FLAG_PHSYNC = (1 << 0),
223 HAL_TDM_OUTPUT_MODE_FLAG_NHSYNC = (1 << 1),
224 HAL_TDM_OUTPUT_MODE_FLAG_PVSYNC = (1 << 2),
225 HAL_TDM_OUTPUT_MODE_FLAG_NVSYNC = (1 << 3),
226 HAL_TDM_OUTPUT_MODE_FLAG_INTERLACE = (1 << 4),
227 HAL_TDM_OUTPUT_MODE_FLAG_DBLSCAN = (1 << 5),
228 HAL_TDM_OUTPUT_MODE_FLAG_CSYNC = (1 << 6),
229 HAL_TDM_OUTPUT_MODE_FLAG_PCSYNC = (1 << 7),
230 HAL_TDM_OUTPUT_MODE_FLAG_NCSYNC = (1 << 8),
231 HAL_TDM_OUTPUT_MODE_FLAG_HSKEW = (1 << 9), /* hskew provided */
232 HAL_TDM_OUTPUT_MODE_FLAG_BCAST = (1 << 10),
233 HAL_TDM_OUTPUT_MODE_FLAG_PIXMUX = (1 << 11),
234 HAL_TDM_OUTPUT_MODE_FLAG_DBLCLK = (1 << 12),
235 HAL_TDM_OUTPUT_MODE_FLAG_CLKDIV2 = (1 << 13),
236 } hal_tdm_output_mode_flag;
239 * @brief The hwc video capability enumeration
243 HAL_TDM_HWC_CAPABILITY_VIDEO_STREAM = (1 << 1), /**< if a hwc has video stream capability */
244 HAL_TDM_HWC_CAPABILITY_VIDEO_SCALE = (1 << 2), /**< if a hwc allows to scale the video buffer */
245 HAL_TDM_HWC_CAPABILITY_VIDEO_TRANSFORM = (1 << 3), /**< if a hwc allows video to transform the video buffer */
246 HAL_TDM_HWC_CAPABILITY_VIDEO_SCANOUT = (1 << 4), /**< if a hwc allows video to accept the scanout buffer only */
247 HAL_TDM_HWC_CAPABILITY_FENCE = (1 << 5), /**< if a hwc allows fence */
248 } hal_tdm_hwc_capability;
251 * @brief The size structure
253 typedef struct _hal_tdm_size {
254 unsigned int h; /**< width */
255 unsigned int v; /**< height */
259 * @brief The pos structure
261 typedef struct _hal_tdm_pos {
269 * @brief The tdm value type enumeration
272 HAL_TDM_VALUE_TYPE_UNKNOWN,
273 HAL_TDM_VALUE_TYPE_PTR,
274 HAL_TDM_VALUE_TYPE_INT32,
275 HAL_TDM_VALUE_TYPE_UINT32,
276 HAL_TDM_VALUE_TYPE_INT64,
277 HAL_TDM_VALUE_TYPE_UINT64,
278 } hal_tdm_value_type;
281 * @brief The value union
292 HAL_TDM_EVENT_LOOP_READABLE = (1 << 0),
293 HAL_TDM_EVENT_LOOP_WRITABLE = (1 << 1),
294 HAL_TDM_EVENT_LOOP_HANGUP = (1 << 2),
295 HAL_TDM_EVENT_LOOP_ERROR = (1 << 3),
296 } hal_tdm_event_loop_mask;
299 * @brief The display capability enumeration
302 HAL_TDM_DISPLAY_CAPABILITY_PP = (1 << 0), /**< if hardware supports pp operation */
303 HAL_TDM_DISPLAY_CAPABILITY_CAPTURE = (1 << 1), /**< if hardware supports capture operation */
304 } hal_tdm_display_capability;
307 * @brief The display capability enumeration
309 typedef struct _hal_tdm_caps_display {
310 int max_layer_count; /**< The maximum layer count */
311 } hal_tdm_caps_display;
314 * @brief The output mode structure
316 typedef struct _hal_tdm_output_mode {
318 unsigned int hdisplay, hsync_start, hsync_end, htotal, hskew;
319 unsigned int vdisplay, vsync_start, vsync_end, vtotal, vscan;
320 unsigned int vrefresh;
323 char name[HAL_TDM_NAME_LEN];
324 } hal_tdm_output_mode;
327 * @brief The property structure
329 typedef struct _hal_tdm_prop {
331 char name[HAL_TDM_NAME_LEN];
332 hal_tdm_value_type type;
336 * @brief The info config structure
338 typedef struct _hal_tdm_info_config {
342 } hal_tdm_info_config;
345 * @brief The region structure
347 typedef struct _hal_tdm_region {
348 unsigned int num_rects;
349 hal_tdm_pos const *rects;
353 * @brief The hwc window info structure
355 typedef struct _hal_tdm_hwc_window_info {
356 hal_tdm_info_config src_config;
358 hal_tdm_transform transform;
359 } hal_tdm_hwc_window_info;
362 * @brief The pp info structre
364 typedef struct _hal_tdm_info_pp {
365 hal_tdm_info_config src_config;
366 hal_tdm_info_config dst_config;
367 hal_tdm_transform transform;
373 * @brief The capture info structre
375 typedef struct _hal_tdm_info_capture {
376 hal_tdm_info_config dst_config;
377 hal_tdm_transform transform;
378 hal_tdm_capture_type type;
381 } hal_tdm_info_capture;
384 * @brief Possible composition types for a given window
388 /** The composition type for an invisible window. The value by default.
390 * The backend ignores windows of this type.
392 HAL_TDM_HWC_WIN_COMPOSITION_NONE = 0,
394 /** The compostion type for an window to be compsoited by the client.
396 * When the client sets this composition type,
397 * the backend MUST NOT modify this composition type into other types.
399 * When the backend changes TDM_HWC_WIN_COMPOSITION_DEVICE or TDM_HWC_WIN_COMPOSITION_CURSOR
400 * to this composition type at the time of tdm_hwc_validate and
401 * tdm_hwc_get_changed_composition_types,
402 * the client has to composite this window with gl or other drawing operations.
404 HAL_TDM_HWC_WIN_COMPOSITION_CLIENT = 1,
406 /** The compostion type for an window to be set to the hw overlay.
408 * The client sets this composition type to the visible windows before requesting
409 * the tdm_hwc_validate.
410 * Nomally, the backend leave it if the backend sets the window to the hw overlay.
411 * If the backend does not set the window to the hw overlay at the time of
412 * tdm_hwc_validate, the backend changes the composition type of the window into
413 * TDM_HWC_WIN_COMPOSITION_CLIENT.
415 HAL_TDM_HWC_WIN_COMPOSITION_DEVICE = 3,
417 /** The compostion type for an window to be set to the cursor hw overlay.
419 * The client sets this composition type to the cursor window before requesting
420 * the tdm_hwc_validate.
421 * If the backend does not support the cursor hw overlay, the backend can change
422 * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
424 HAL_TDM_HWC_WIN_COMPOSITION_CURSOR = 4,
426 /** The compostion type for an window to be set to the video hw overlay.
428 * The client sets this composition type to the video window before requesting
429 * the tdm_hwc_validate.
430 * If the backend does not support the video hw overlay, the backend can change
431 * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
432 * Normally, this VIDEO window displays under the primary hw overlayer of the output.
434 HAL_TDM_HWC_WIN_COMPOSITION_VIDEO = 5,
435 } hal_tdm_hwc_window_composition;
438 HAL_TDM_HWC_WIN_CONSTRAINT_NONE = 0,
439 /** If the client needs to render to a specific buffer for compositing
440 * with TDM_HWC_WIN_COMPOSITION_DEVICE, the backend needs to set
441 * TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE to hwc_window until the hwc_window is not
442 * TDM_HWC_WIN_COMPOSITION_DEVICE. The client gets the tbm_surface_queue_h through
443 * the tdm_hwc_window_aquire_buffer_queue. It will render the frames on
444 * the buffers which gets from the tbm_surface_queue_h.
446 HAL_TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
447 } hal_tdm_hwc_window_constraint;
450 HAL_TDM_HWC_COMMIT_INTERVAL_NONE = 0,
451 /** If this interval is set by tdm backend, the compositor call commit per vblank
452 * even if the handler of commit isn't called.
454 HAL_TDM_HWC_COMMIT_INTERVAL_VBLANK = 1,
455 } hal_tdm_hwc_commit_interval;
460 typedef int hal_tdm_fd;
463 * @brief The tdm display object
465 typedef void hal_tdm_display;
468 * @brief The tdm backend object
470 typedef void hal_tdm_module;
473 * @brief The tdm output object
475 typedef void hal_tdm_output;
478 * @brief The tdm voutput object
480 typedef void hal_tdm_voutput;
483 * @brief The tdm hwc object
485 typedef void hal_tdm_hwc;
488 * @brief The tdm hwc window object
490 typedef void hal_tdm_hwc_window;
493 * @brief The tdm capture object
495 typedef void hal_tdm_capture;
498 * @brief The tdm pp object
500 typedef void hal_tdm_pp;
503 * @brief The tdm vblank object
505 typedef void hal_tdm_vblank;
508 * @brief The tdm backend object
510 typedef void hal_tdm_backend;
513 * @brief The event_loop_fd handler
514 * @details This handler will be called when the output object is
515 * createed in runtime.
517 typedef hal_tdm_error (*hal_tdm_event_loop_fd_handler)(int event_fd, hal_tdm_event_loop_mask mask, void *user_data);
520 * @brief The output create handler
521 * @details This handler will be called when the output object is
522 * createed in runtime.
524 typedef void (*hal_tdm_output_create_handler)(hal_tdm_display *dpy, hal_tdm_output *output, void *user_data);
527 * @brief The output destroy handler
528 * @details This handler will be called when the output object is
529 * destroied in runtime.
531 typedef void (*hal_tdm_output_destroy_handler)(hal_tdm_output *output, void *user_data);
534 * @brief The output change handler
535 * @details This handler will be called when the status of a output object is
536 * changed in runtime.
538 typedef void (*hal_tdm_output_change_handler)(hal_tdm_output *output,
539 hal_tdm_output_change_type type,
544 * @brief The vblank handler
545 * @see output_set_vblank_handler() function of #hal_tdm_display_funcs
547 typedef void (*hal_tdm_output_vblank_handler)(hal_tdm_output *output, unsigned int sequence,
548 unsigned int tv_sec, unsigned int tv_usec,
552 * @brief The output commit handler
553 * @see output_set_commit_handler() function of #hal_tdm_display_funcs
555 typedef void (*hal_tdm_output_commit_handler)(hal_tdm_output *output, unsigned int sequence,
556 unsigned int tv_sec, unsigned int tv_usec,
560 * @brief The output mode change request handler
562 typedef void (*hal_tdm_output_mode_change_request_handler)(hal_tdm_output *output,
563 unsigned int index, void *user_data);
566 * @brief The output status handler
568 typedef void (*hal_tdm_output_status_handler)(hal_tdm_output *output,
569 hal_tdm_output_conn_status status, void *user_data);
572 * @brief The output dpms handler
574 typedef void (*hal_tdm_output_dpms_handler)(hal_tdm_output *output,
575 hal_tdm_output_dpms dpms, void *user_data);
578 * @brief The done handler of a pp object
580 typedef void (*hal_tdm_pp_done_handler)(hal_tdm_pp *pp, tbm_surface_h src,
581 tbm_surface_h dst, void *user_data);
584 * @brief The done handler of a capture object
586 typedef void (*hal_tdm_capture_done_handler)(hal_tdm_capture *capture,
587 tbm_surface_h buffer, void *user_data);
590 * @brief The create handler of a vblank object
592 typedef void (*hal_tdm_vblank_create_handler)(hal_tdm_vblank *vblank, void *user_data);
595 * @brief The hwc commit handler
596 * @see hwc_set_commit_handler() function of #hal_tdm_hwc_funcs
598 typedef void (*hal_tdm_hwc_commit_handler)(hal_tdm_hwc *hwc, unsigned int sequence,
599 unsigned int tv_sec, unsigned int tv_usec,
603 * @brief The voutput commit handler
605 typedef void (*hal_tdm_voutput_commit_handler)(hal_tdm_voutput *voutput, unsigned int sequence,
606 unsigned int tv_sec, unsigned int tv_usec,
610 * @brief The voutput commit function
612 typedef void (*hal_tdm_voutput_commit_func)(hal_tdm_voutput *voutput, tbm_surface_h buffer);
615 * @brief The event source information
617 typedef struct _hal_tdm_event_source {
619 hal_tdm_event_loop_fd_handler func;
621 } hal_tdm_event_source;
623 typedef struct _hal_tdm_caps_output {
624 char maker[HAL_TDM_NAME_LEN]; /**< The output maker */
625 char model[HAL_TDM_NAME_LEN]; /**< The output model */
626 char name[HAL_TDM_NAME_LEN]; /**< The output name */
628 hal_tdm_output_conn_status status; /**< The connection status */
629 hal_tdm_output_type type; /**< The connection type */
630 unsigned int type_id; /**< The connection type id */
632 unsigned int mode_count; /**< The count of available modes */
633 hal_tdm_output_mode *modes; /**< The @b newly-allocated array of modes. will be freed in frontend. */
635 unsigned int prop_count; /**< The count of available properties */
636 hal_tdm_prop *props; /**< The @b newly-allocated array of properties. will be freed in frontend. */
638 unsigned int mmWidth; /**< The physical width (milimeter) */
639 unsigned int mmHeight; /**< The physical height (milimeter) */
640 unsigned int subpixel; /**< The subpixel */
642 int min_w; /**< The minimun width */
643 int min_h; /**< The minimun height */
644 int max_w; /**< The maximum width */
645 int max_h; /**< The maximum height */
646 int preferred_align; /**< The prefered align */
648 hal_tdm_output_capability capabilities; /**< The capabilities of output. @since 1.4.1 */
650 int cursor_min_w; /**< The minimun width. @since 1.5.0 */
651 int cursor_min_h; /**< The minimun height. @since 1.5.0 */
652 int cursor_max_w; /**< The maximum width. @since 1.5.0 */
653 int cursor_max_h; /**< The maximum height. @since 1.5.0 */
654 int cursor_preferred_align; /**< The prefered align. @since 1.5.0 */
655 } hal_tdm_caps_output;
657 typedef struct _hal_tdm_caps_pp {
658 hal_tdm_pp_capability capabilities; /**< The capabilities of pp */
659 unsigned int format_count; /**< The count of available formats */
660 tbm_format *formats; /**< The @b newly-allocated array. will be freed in frontend. */
661 int min_w; /**< The minimun width */
662 int min_h; /**< The minimun height */
663 int max_w; /**< The maximum width */
664 int max_h; /**< The maximum height */
665 int preferred_align; /**< The prefered align */
666 int preferred_align_vertical; /**< The prefered align vertical */
667 int max_attach_count; /**< The attach count which a PP object can handle. */
670 typedef struct _hal_tdm_caps_capture {
671 hal_tdm_capture_capability capabilities; /**< The capabilities of capture */
672 unsigned int format_count; /**< The count of available formats */
673 tbm_format *formats; /**< The @b newly-allocated array of formats. will be freed in frontend. */
674 int min_w; /**< The minimun width */
675 int min_h; /**< The minimun height */
676 int max_w; /**< The maximum width */
677 int max_h; /**< The maximum height */
678 int preferred_align; /**< The prefered align */
679 int max_attach_count; /**< The attach count which a capture object can handle. */
680 } hal_tdm_caps_capture;
686 #endif /* _HAL_TDM_TYPES_H_ */