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__
40 #include <tbm_surface.h>
47 * @file hal-tdm-types.h
48 * @brief The header file which defines Enumerations and Structures for frontend and backend.
50 * Both frontend(@ref hal-tdm.h) and backend(@ref hal-tdm-interface.h) header files
51 * include @ref hal-tdm-types.h
54 * #include <hal-tdm.h> //for a frontend user
57 * #include <hal-tdm_interface.h> //for a vendor to implement a backend module
61 #define HAL_TDM_NAME_LEN 64
62 #define HAL_TDM_PATH_LEN 1024
63 #define HAL_TDM_VBLANK_DEFAULT_NAME "Unknown"
64 #define HAL_TDM_EVENT_SOURCE_MAX 3
67 * @brief The error enumeration
70 HAL_TDM_ERROR_NONE = 0, /**< none */
71 HAL_TDM_ERROR_BAD_REQUEST = -1, /**< bad request */
72 HAL_TDM_ERROR_OPERATION_FAILED = -2, /**< operaion failed */
73 HAL_TDM_ERROR_INVALID_PARAMETER = -3, /**< wrong input parameter */
74 HAL_TDM_ERROR_PERMISSION_DENIED = -4, /**< access denied */
75 HAL_TDM_ERROR_BUSY = -5, /**< hardware resource busy */
76 HAL_TDM_ERROR_OUT_OF_MEMORY = -6, /**< no free memory */
77 HAL_TDM_ERROR_BAD_MODULE = -7, /**< bad backend module */
78 HAL_TDM_ERROR_NOT_IMPLEMENTED = -8, /**< not implemented */
79 HAL_TDM_ERROR_NO_CAPABILITY = -9, /**< no capability */
80 HAL_TDM_ERROR_DPMS_OFF = -10, /**< dpms off */
81 HAL_TDM_ERROR_OUTPUT_DISCONNECTED = -11, /**< output disconnected */
82 HAL_TDM_ERROR_PROTOCOL_ERROR = -12, /**< protocol error */
83 HAL_TDM_ERROR_TIMEOUT = -13, /**< timeout */
84 HAL_TDM_ERROR_NO_MODULE = -14, /**< no backend module */
88 * @brief The transform enumeration(rotate, flip)
91 HAL_TDM_TRANSFORM_NORMAL = 0, /**< no transform */
92 HAL_TDM_TRANSFORM_90 = 1, /**< rotate 90 degrees clockwise */
93 HAL_TDM_TRANSFORM_180 = 2, /**< rotate 180 degrees clockwise */
94 HAL_TDM_TRANSFORM_270 = 3, /**< rotate 270 degrees clockwise */
95 HAL_TDM_TRANSFORM_FLIPPED = 4, /**< no rotate and horizontal flip */
96 HAL_TDM_TRANSFORM_FLIPPED_90 = 5, /**< rotate 90 degrees clockwise and horizontal flip */
97 HAL_TDM_TRANSFORM_FLIPPED_180 = 6, /**< rotate 180 degrees clockwise and horizontal flip */
98 HAL_TDM_TRANSFORM_FLIPPED_270 = 7, /**< rotate 270 degrees clockwise and horizontal flip */
102 * @brief The output capability enumeration
104 * If a backend module provides #HAL_TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS, we can set
105 * an extended DPMS mode to an output which a backend module supports.
106 * Don't use the low-4bit for an extended DPMS mode value. It's used for default
110 HAL_TDM_OUTPUT_CAPABILITY_ASYNC_DPMS = (1 << 0), /**< if a outupt supports asynchronous DPMS operation */
111 HAL_TDM_OUTPUT_CAPABILITY_HWC = (1 << 1), /**< if a outupt supports hwc operation @since 2.0.0*/
112 HAL_TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS = (1 << 2), /**< if a outupt supports extended DPMS operation @since 2.0.0 */
113 HAL_TDM_OUTPUT_CAPABILITY_MIRROR = (1 << 3), /**< if a outupt supports the displying mirror image of the src_output @since 2.9.0 */
114 } hal_tdm_output_capability;
117 * @brief The pp capability enumeration
118 * @details The scale, transform and CSC functionalities seem the default functions of PP.
119 * If hardware device doesn't support one of them, we'd better let a developer know
120 * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
123 HAL_TDM_PP_CAPABILITY_SYNC = (1 << 0), /**< The pp device supports synchronous operation */
124 HAL_TDM_PP_CAPABILITY_ASYNC = (1 << 1), /**< The pp device supports asynchronous operation */
125 HAL_TDM_PP_CAPABILITY_SCANOUT = (1 << 4), /**< The pp device supports only scanout buffer */
126 HAL_TDM_PP_CAPABILITY_NO_CSC = (1 << 5), /**< The pp device doesn't support Color Space Conversion */
127 HAL_TDM_PP_CAPABILITY_NO_TRANSFORM_ROTATION = (1 << 6), /**< The pp device doesn't support rotation transform */
128 } hal_tdm_pp_capability;
131 * @brief The capture capability enumeration
132 * @details The scale, transform and CSC functionalities seem the default functions of capture.
133 * If hardware device doesn't support one of them, we'd better let a developer know
134 * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
137 HAL_TDM_CAPTURE_CAPABILITY_OUTPUT = (1 << 0), /**< The capture device supports to dump a output */
138 HAL_TDM_CAPTURE_CAPABILITY_LAYER = (1 << 1), /**< The capture device supports to dump a layer */
139 HAL_TDM_CAPTURE_CAPABILITY_ONESHOT = (1 << 4), /**< The capture device supports oneshot dump */
140 HAL_TDM_CAPTURE_CAPABILITY_STREAM = (1 << 5), /**< The capture device supports streamp sump */
141 } hal_tdm_capture_capability;
144 * @brief The capture type enumeration
147 HAL_TDM_CAPTURE_TYPE_ONESHOT = (1 << 0), /**< The oneshot capture */
148 HAL_TDM_CAPTURE_TYPE_STREAM = (1 << 1), /**< The stream capture */
149 } hal_tdm_capture_type;
152 * @brief The output change enumeration of #tdm_output_change_handler
155 HAL_TDM_OUTPUT_CHANGE_CONNECTION = (1 << 0), /**< connection chagne */
156 HAL_TDM_OUTPUT_CHANGE_DPMS = (1 << 1), /**< dpms change */
157 } hal_tdm_output_change_type;
160 * @brief The output connection status enumeration
163 HAL_TDM_OUTPUT_CONN_STATUS_DISCONNECTED, /**< output disconnected */
164 HAL_TDM_OUTPUT_CONN_STATUS_CONNECTED, /**< output connected */
165 HAL_TDM_OUTPUT_CONN_STATUS_MODE_SETTED, /**< output connected and setted a mode */
166 } hal_tdm_output_conn_status;
169 * @brief The output connection status enumeration
170 * @details bit compatible with the libdrm definitions.
173 HAL_TDM_OUTPUT_TYPE_Unknown, /**< unknown */
174 HAL_TDM_OUTPUT_TYPE_VGA, /**< VGA connection */
175 HAL_TDM_OUTPUT_TYPE_DVII, /**< DVII connection */
176 HAL_TDM_OUTPUT_TYPE_DVID, /**< DVID connection */
177 HAL_TDM_OUTPUT_TYPE_DVIA, /**< DVIA connection */
178 HAL_TDM_OUTPUT_TYPE_Composite, /**< Composite connection */
179 HAL_TDM_OUTPUT_TYPE_SVIDEO, /**< SVIDEO connection */
180 HAL_TDM_OUTPUT_TYPE_LVDS, /**< LVDS connection */
181 HAL_TDM_OUTPUT_TYPE_Component, /**< Component connection */
182 HAL_TDM_OUTPUT_TYPE_9PinDIN, /**< 9PinDIN connection */
183 HAL_TDM_OUTPUT_TYPE_DisplayPort, /**< DisplayPort connection */
184 HAL_TDM_OUTPUT_TYPE_HDMIA, /**< HDMIA connection */
185 HAL_TDM_OUTPUT_TYPE_HDMIB, /**< HDMIB connection */
186 HAL_TDM_OUTPUT_TYPE_TV, /**< TV connection */
187 HAL_TDM_OUTPUT_TYPE_eDP, /**< eDP connection */
188 HAL_TDM_OUTPUT_TYPE_VIRTUAL, /**< Virtual connection for WiFi Display */
189 HAL_TDM_OUTPUT_TYPE_DSI, /**< DSI connection */
190 } hal_tdm_output_type;
193 * @brief The DPMS enumeration
194 * @details bit compatible with the libdrm definitions.
197 HAL_TDM_OUTPUT_DPMS_ON, /**< On, Vsync On */
198 HAL_TDM_OUTPUT_DPMS_STANDBY, /**< StandBy, Vsync On */
199 HAL_TDM_OUTPUT_DPMS_SUSPEND, /**< Suspend, Vsync Off */
200 HAL_TDM_OUTPUT_DPMS_OFF, /**< Off, Vsync Off */
201 HAL_TDM_OUTPUT_DPMS_AOD = 0x10, /**< AOD, Vsync On, extended DPMS mode */
202 } hal_tdm_output_dpms;
205 * @brief The output mode type enumeration
206 * @details bit compatible with the libdrm definitions.
209 HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN = (1 << 0),
210 HAL_TDM_OUTPUT_MODE_TYPE_CLOCK_C = ((1 << 1) | HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN),
211 HAL_TDM_OUTPUT_MODE_TYPE_CRTC_C = ((1 << 2) | HAL_TDM_OUTPUT_MODE_TYPE_BUILTIN),
212 HAL_TDM_OUTPUT_MODE_TYPE_PREFERRED = (1 << 3),
213 HAL_TDM_OUTPUT_MODE_TYPE_DEFAULT = (1 << 4),
214 HAL_TDM_OUTPUT_MODE_TYPE_USERDEF = (1 << 5),
215 HAL_TDM_OUTPUT_MODE_TYPE_DRIVER = (1 << 6),
216 } hal_tdm_output_mode_type;
219 * @brief The output mode flag enumeration
220 * @details bit compatible with the libdrm definitions.
223 HAL_TDM_OUTPUT_MODE_FLAG_PHSYNC = (1 << 0),
224 HAL_TDM_OUTPUT_MODE_FLAG_NHSYNC = (1 << 1),
225 HAL_TDM_OUTPUT_MODE_FLAG_PVSYNC = (1 << 2),
226 HAL_TDM_OUTPUT_MODE_FLAG_NVSYNC = (1 << 3),
227 HAL_TDM_OUTPUT_MODE_FLAG_INTERLACE = (1 << 4),
228 HAL_TDM_OUTPUT_MODE_FLAG_DBLSCAN = (1 << 5),
229 HAL_TDM_OUTPUT_MODE_FLAG_CSYNC = (1 << 6),
230 HAL_TDM_OUTPUT_MODE_FLAG_PCSYNC = (1 << 7),
231 HAL_TDM_OUTPUT_MODE_FLAG_NCSYNC = (1 << 8),
232 HAL_TDM_OUTPUT_MODE_FLAG_HSKEW = (1 << 9), /* hskew provided */
233 HAL_TDM_OUTPUT_MODE_FLAG_BCAST = (1 << 10),
234 HAL_TDM_OUTPUT_MODE_FLAG_PIXMUX = (1 << 11),
235 HAL_TDM_OUTPUT_MODE_FLAG_DBLCLK = (1 << 12),
236 HAL_TDM_OUTPUT_MODE_FLAG_CLKDIV2 = (1 << 13),
237 } hal_tdm_output_mode_flag;
240 * @brief The hwc video capability enumeration
244 HAL_TDM_HWC_CAPABILITY_VIDEO_STREAM = (1 << 1), /**< if a hwc has video stream capability */
245 HAL_TDM_HWC_CAPABILITY_VIDEO_SCALE = (1 << 2), /**< if a hwc allows to scale the video buffer */
246 HAL_TDM_HWC_CAPABILITY_VIDEO_TRANSFORM = (1 << 3), /**< if a hwc allows video to transform the video buffer */
247 HAL_TDM_HWC_CAPABILITY_VIDEO_SCANOUT = (1 << 4), /**< if a hwc allows video to accept the scanout buffer only */
248 HAL_TDM_HWC_CAPABILITY_FENCE = (1 << 5), /**< if a hwc allows fence */
249 } hal_tdm_hwc_capability;
252 * @brief The size structure
254 typedef struct _hal_tdm_size {
255 unsigned int h; /**< width */
256 unsigned int v; /**< height */
260 * @brief The pos structure
262 typedef struct _hal_tdm_pos {
270 * @brief The tdm value type enumeration
273 HAL_TDM_VALUE_TYPE_UNKNOWN,
274 HAL_TDM_VALUE_TYPE_PTR,
275 HAL_TDM_VALUE_TYPE_INT32,
276 HAL_TDM_VALUE_TYPE_UINT32,
277 HAL_TDM_VALUE_TYPE_INT64,
278 HAL_TDM_VALUE_TYPE_UINT64,
279 } hal_tdm_value_type;
282 * @brief The value union
293 HAL_TDM_EVENT_LOOP_READABLE = (1 << 0),
294 HAL_TDM_EVENT_LOOP_WRITABLE = (1 << 1),
295 HAL_TDM_EVENT_LOOP_HANGUP = (1 << 2),
296 HAL_TDM_EVENT_LOOP_ERROR = (1 << 3),
297 } hal_tdm_event_loop_mask;
300 * @brief The display capability enumeration
303 HAL_TDM_DISPLAY_CAPABILITY_PP = (1 << 0), /**< if hardware supports pp operation */
304 HAL_TDM_DISPLAY_CAPABILITY_CAPTURE = (1 << 1), /**< if hardware supports capture operation */
305 } hal_tdm_display_capability;
308 * @brief The display capability enumeration
310 typedef struct _hal_tdm_caps_display {
311 int max_layer_count; /**< The maximum layer count */
312 } hal_tdm_caps_display;
315 * @brief The output mode structure
317 typedef struct _hal_tdm_output_mode {
319 unsigned int hdisplay, hsync_start, hsync_end, htotal, hskew;
320 unsigned int vdisplay, vsync_start, vsync_end, vtotal, vscan;
321 unsigned int vrefresh;
324 char name[HAL_TDM_NAME_LEN];
325 } hal_tdm_output_mode;
328 * @brief The property structure
330 typedef struct _hal_tdm_prop {
332 char name[HAL_TDM_NAME_LEN];
333 hal_tdm_value_type type;
337 * @brief The info config structure
339 typedef struct _hal_tdm_info_config {
343 } hal_tdm_info_config;
346 * @brief The region structure
348 typedef struct _hal_tdm_region {
349 unsigned int num_rects;
350 hal_tdm_pos const *rects;
354 * @brief The hwc window info structure
356 typedef struct _hal_tdm_hwc_window_info {
357 hal_tdm_info_config src_config;
359 hal_tdm_transform transform;
360 } hal_tdm_hwc_window_info;
363 * @brief The pp info structre
365 typedef struct _hal_tdm_info_pp {
366 hal_tdm_info_config src_config;
367 hal_tdm_info_config dst_config;
368 hal_tdm_transform transform;
374 * @brief The capture info structre
376 typedef struct _hal_tdm_info_capture {
377 hal_tdm_info_config dst_config;
378 hal_tdm_transform transform;
379 hal_tdm_capture_type type;
382 } hal_tdm_info_capture;
385 * @brief Possible composition types for a given window
389 /** The composition type for an invisible window. The value by default.
391 * The backend ignores windows of this type.
393 HAL_TDM_HWC_WIN_COMPOSITION_NONE = 0,
395 /** The compostion type for an window to be compsoited by the client.
397 * When the client sets this composition type,
398 * the backend MUST NOT modify this composition type into other types.
400 * When the backend changes TDM_HWC_WIN_COMPOSITION_DEVICE or TDM_HWC_WIN_COMPOSITION_CURSOR
401 * to this composition type at the time of tdm_hwc_validate and
402 * tdm_hwc_get_changed_composition_types,
403 * the client has to composite this window with gl or other drawing operations.
405 HAL_TDM_HWC_WIN_COMPOSITION_CLIENT = 1,
407 /** The compostion type for an window to be set to the hw overlay.
409 * The client sets this composition type to the visible windows before requesting
410 * the tdm_hwc_validate.
411 * Nomally, the backend leave it if the backend sets the window to the hw overlay.
412 * If the backend does not set the window to the hw overlay at the time of
413 * tdm_hwc_validate, the backend changes the composition type of the window into
414 * TDM_HWC_WIN_COMPOSITION_CLIENT.
416 HAL_TDM_HWC_WIN_COMPOSITION_DEVICE = 3,
418 /** The compostion type for an window to be set to the cursor hw overlay.
420 * The client sets this composition type to the cursor window before requesting
421 * the tdm_hwc_validate.
422 * If the backend does not support the cursor hw overlay, the backend can change
423 * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
425 HAL_TDM_HWC_WIN_COMPOSITION_CURSOR = 4,
427 /** The compostion type for an window to be set to the video hw overlay.
429 * The client sets this composition type to the video window before requesting
430 * the tdm_hwc_validate.
431 * If the backend does not support the video hw overlay, the backend can change
432 * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
433 * Normally, this VIDEO window displays under the primary hw overlayer of the output.
435 HAL_TDM_HWC_WIN_COMPOSITION_VIDEO = 5,
436 } hal_tdm_hwc_window_composition;
439 HAL_TDM_HWC_WIN_CONSTRAINT_NONE = 0,
440 /** If the client needs to render to a specific buffer for compositing
441 * with TDM_HWC_WIN_COMPOSITION_DEVICE, the backend needs to set
442 * TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE to hwc_window until the hwc_window is not
443 * TDM_HWC_WIN_COMPOSITION_DEVICE. The client gets the tbm_surface_queue_h through
444 * the tdm_hwc_window_aquire_buffer_queue. It will render the frames on
445 * the buffers which gets from the tbm_surface_queue_h.
447 HAL_TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
448 } hal_tdm_hwc_window_constraint;
451 HAL_TDM_HWC_COMMIT_INTERVAL_NONE = 0,
452 /** If this interval is set by tdm backend, the compositor call commit per vblank
453 * even if the handler of commit isn't called.
455 HAL_TDM_HWC_COMMIT_INTERVAL_VBLANK = 1,
456 } hal_tdm_hwc_commit_interval;
461 typedef int hal_tdm_fd;
464 * @brief The tdm display object
466 typedef void hal_tdm_display;
469 * @brief The tdm backend object
471 typedef void hal_tdm_module;
474 * @brief The tdm output object
476 typedef void hal_tdm_output;
479 * @brief The tdm voutput object
481 typedef void hal_tdm_voutput;
484 * @brief The tdm hwc object
486 typedef void hal_tdm_hwc;
489 * @brief The tdm hwc window object
491 typedef void hal_tdm_hwc_window;
494 * @brief The tdm capture object
496 typedef void hal_tdm_capture;
499 * @brief The tdm pp object
501 typedef void hal_tdm_pp;
504 * @brief The tdm vblank object
506 typedef void hal_tdm_vblank;
509 * @brief The tdm backend object
511 typedef void hal_tdm_backend;
514 * @brief The event_loop_fd handler
515 * @details This handler will be called when the output object is
516 * createed in runtime.
518 typedef hal_tdm_error (*hal_tdm_event_loop_fd_handler)(int event_fd, hal_tdm_event_loop_mask mask, void *user_data);
521 * @brief The output create handler
522 * @details This handler will be called when the output object is
523 * createed in runtime.
525 typedef void (*hal_tdm_output_create_handler)(hal_tdm_display *dpy, hal_tdm_output *output, void *user_data);
528 * @brief The output destroy handler
529 * @details This handler will be called when the output object is
530 * destroied in runtime.
532 typedef void (*hal_tdm_output_destroy_handler)(hal_tdm_output *output, void *user_data);
535 * @brief The output change handler
536 * @details This handler will be called when the status of a output object is
537 * changed in runtime.
539 typedef void (*hal_tdm_output_change_handler)(hal_tdm_output *output,
540 hal_tdm_output_change_type type,
545 * @brief The vblank handler
546 * @see output_set_vblank_handler() function of #hal_tdm_display_funcs
548 typedef void (*hal_tdm_output_vblank_handler)(hal_tdm_output *output, unsigned int sequence,
549 unsigned int tv_sec, unsigned int tv_usec,
553 * @brief The output commit handler
554 * @see output_set_commit_handler() function of #hal_tdm_display_funcs
556 typedef void (*hal_tdm_output_commit_handler)(hal_tdm_output *output, unsigned int sequence,
557 unsigned int tv_sec, unsigned int tv_usec,
561 * @brief The output mode change request handler
563 typedef void (*hal_tdm_output_mode_change_request_handler)(hal_tdm_output *output,
564 unsigned int index, void *user_data);
567 * @brief The output status handler
569 typedef void (*hal_tdm_output_status_handler)(hal_tdm_output *output,
570 hal_tdm_output_conn_status status, void *user_data);
573 * @brief The output dpms handler
575 typedef void (*hal_tdm_output_dpms_handler)(hal_tdm_output *output,
576 hal_tdm_output_dpms dpms, void *user_data);
579 * @brief The done handler of a pp object
581 typedef void (*hal_tdm_pp_done_handler)(hal_tdm_pp *pp, tbm_surface_h src,
582 tbm_surface_h dst, void *user_data);
585 * @brief The done handler of a capture object
587 typedef void (*hal_tdm_capture_done_handler)(hal_tdm_capture *capture,
588 tbm_surface_h buffer, void *user_data);
591 * @brief The create handler of a vblank object
593 typedef void (*hal_tdm_vblank_create_handler)(hal_tdm_vblank *vblank, void *user_data);
596 * @brief The hwc commit handler
597 * @see hwc_set_commit_handler() function of #hal_tdm_hwc_funcs
599 typedef void (*hal_tdm_hwc_commit_handler)(hal_tdm_hwc *hwc, unsigned int sequence,
600 unsigned int tv_sec, unsigned int tv_usec,
604 * @brief The voutput commit handler
606 typedef void (*hal_tdm_voutput_commit_handler)(hal_tdm_voutput *voutput, unsigned int sequence,
607 unsigned int tv_sec, unsigned int tv_usec,
611 * @brief The voutput commit function
613 typedef void (*hal_tdm_voutput_commit_func)(hal_tdm_voutput *voutput, tbm_surface_h buffer);
616 * @brief The event source information
618 typedef struct _hal_tdm_event_source {
620 hal_tdm_event_loop_fd_handler func;
622 } hal_tdm_event_source;
624 typedef struct _hal_tdm_caps_output {
625 char maker[HAL_TDM_NAME_LEN]; /**< The output maker */
626 char model[HAL_TDM_NAME_LEN]; /**< The output model */
627 char name[HAL_TDM_NAME_LEN]; /**< The output name */
629 hal_tdm_output_conn_status status; /**< The connection status */
630 hal_tdm_output_type type; /**< The connection type */
631 unsigned int type_id; /**< The connection type id */
633 unsigned int mode_count; /**< The count of available modes */
634 hal_tdm_output_mode *modes; /**< The @b newly-allocated array of modes. will be freed in frontend. */
636 unsigned int prop_count; /**< The count of available properties */
637 hal_tdm_prop *props; /**< The @b newly-allocated array of properties. will be freed in frontend. */
639 unsigned int mmWidth; /**< The physical width (milimeter) */
640 unsigned int mmHeight; /**< The physical height (milimeter) */
641 unsigned int subpixel; /**< The subpixel */
643 int min_w; /**< The minimun width */
644 int min_h; /**< The minimun height */
645 int max_w; /**< The maximum width */
646 int max_h; /**< The maximum height */
647 int preferred_align; /**< The prefered align */
649 hal_tdm_output_capability capabilities; /**< The capabilities of output. @since 1.4.1 */
651 int cursor_min_w; /**< The minimun width. @since 1.5.0 */
652 int cursor_min_h; /**< The minimun height. @since 1.5.0 */
653 int cursor_max_w; /**< The maximum width. @since 1.5.0 */
654 int cursor_max_h; /**< The maximum height. @since 1.5.0 */
655 int cursor_preferred_align; /**< The prefered align. @since 1.5.0 */
656 } hal_tdm_caps_output;
658 typedef struct _hal_tdm_caps_pp {
659 hal_tdm_pp_capability capabilities; /**< The capabilities of pp */
660 unsigned int format_count; /**< The count of available formats */
661 tbm_format *formats; /**< The @b newly-allocated array. will be freed in frontend. */
662 int min_w; /**< The minimun width */
663 int min_h; /**< The minimun height */
664 int max_w; /**< The maximum width */
665 int max_h; /**< The maximum height */
666 int preferred_align; /**< The prefered align */
667 int preferred_align_vertical; /**< The prefered align vertical */
668 int max_attach_count; /**< The attach count which a PP object can handle. */
671 typedef struct _hal_tdm_caps_capture {
672 hal_tdm_capture_capability capabilities; /**< The capabilities of capture */
673 unsigned int format_count; /**< The count of available formats */
674 tbm_format *formats; /**< The @b newly-allocated array of formats. will be freed in frontend. */
675 int min_w; /**< The minimun width */
676 int min_h; /**< The minimun height */
677 int max_w; /**< The maximum width */
678 int max_h; /**< The maximum height */
679 int preferred_align; /**< The prefered align */
680 int max_attach_count; /**< The attach count which a capture object can handle. */
681 } hal_tdm_caps_capture;
687 #endif /* _HAL_TDM_TYPES_H_ */