diff options
author | Chris Michael <cp.michael@samsung.com> | 2016-09-22 09:35:44 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2016-09-22 14:20:24 -0400 |
commit | 7770bc17bba5f2a1f4ba4a4879223a4d4b8ec6b2 (patch) | |
tree | 2f17a6caa2bc5d11d32748874aedeb827862736b /src/lib/ecore_drm2/ecore_drm2_private.h | |
parent | 76bdf4981c7184867c7352a3f887de83fa8097db (diff) |
ecore-drm2: Add private structures to support Atomic Modesetting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_private.h')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_private.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index bce5edec89..04dcd1b459 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h | |||
@@ -24,6 +24,7 @@ | |||
24 | # include <drm_fourcc.h> | 24 | # include <drm_fourcc.h> |
25 | 25 | ||
26 | extern int _ecore_drm2_log_dom; | 26 | extern int _ecore_drm2_log_dom; |
27 | extern Eina_Bool _ecore_drm2_use_atomic; | ||
27 | 28 | ||
28 | # ifdef ECORE_DRM2_DEFAULT_LOG_COLOR | 29 | # ifdef ECORE_DRM2_DEFAULT_LOG_COLOR |
29 | # undef ECORE_DRM2_DEFAULT_LOG_COLOR | 30 | # undef ECORE_DRM2_DEFAULT_LOG_COLOR |
@@ -55,6 +56,63 @@ extern int _ecore_drm2_log_dom; | |||
55 | # endif | 56 | # endif |
56 | # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_drm2_log_dom, __VA_ARGS__) | 57 | # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_drm2_log_dom, __VA_ARGS__) |
57 | 58 | ||
59 | # ifdef HAVE_ATOMIC_DRM | ||
60 | typedef struct _Ecore_Drm2_Atomic_State Ecore_Drm2_Atomic_State; | ||
61 | |||
62 | typedef struct _Ecore_Drm2_Atomic_Blob | ||
63 | { | ||
64 | uint32_t id, value; | ||
65 | size_t len; | ||
66 | void *data; | ||
67 | } Ecore_Drm2_Atomic_Blob; | ||
68 | |||
69 | typedef struct _Ecore_Drm2_Atomic_Property | ||
70 | { | ||
71 | uint32_t id, value; | ||
72 | } Ecore_Drm2_Atomic_Property; | ||
73 | |||
74 | typedef struct _Ecore_Drm2_Connector_State | ||
75 | { | ||
76 | uint32_t obj_id; | ||
77 | Ecore_Drm2_Atomic_Property crtc; | ||
78 | Ecore_Drm2_Atomic_Property dpms; | ||
79 | Ecore_Drm2_Atomic_Property aspect; | ||
80 | Ecore_Drm2_Atomic_Property scaling; | ||
81 | Ecore_Drm2_Atomic_Blob edid; | ||
82 | } Ecore_Drm2_Connector_State; | ||
83 | |||
84 | typedef struct _Ecore_Drm2_Crtc_State | ||
85 | { | ||
86 | uint32_t obj_id; | ||
87 | int index; | ||
88 | Ecore_Drm2_Atomic_Property active; | ||
89 | Ecore_Drm2_Atomic_Blob mode; | ||
90 | } Ecore_Drm2_Crtc_State; | ||
91 | |||
92 | typedef struct _Ecore_Drm2_Plane_State | ||
93 | { | ||
94 | uint32_t obj_id, mask; | ||
95 | Ecore_Drm2_Atomic_Property type; | ||
96 | Ecore_Drm2_Atomic_Property cid, fid; | ||
97 | Ecore_Drm2_Atomic_Property sx, sy, sw, sh; | ||
98 | Ecore_Drm2_Atomic_Property cx, cy, cw, ch; | ||
99 | Ecore_Drm2_Atomic_Property rotation; | ||
100 | |||
101 | /* these are not part of an atomic state, but we store these here | ||
102 | * so that we do not have to refetch properties when iterating planes */ | ||
103 | uint32_t rotation_map[6]; | ||
104 | uint32_t supported_rotations; | ||
105 | } Ecore_Drm2_Plane_State; | ||
106 | |||
107 | struct _Ecore_Drm2_Atomic_State | ||
108 | { | ||
109 | int crtcs, conns, planes; | ||
110 | Ecore_Drm2_Crtc_State *crtc_states; | ||
111 | Ecore_Drm2_Connector_State *conn_states; | ||
112 | Ecore_Drm2_Plane_State *plane_states; | ||
113 | }; | ||
114 | # endif | ||
115 | |||
58 | typedef enum _Ecore_Drm2_Backlight_Type | 116 | typedef enum _Ecore_Drm2_Backlight_Type |
59 | { | 117 | { |
60 | ECORE_DRM2_BACKLIGHT_RAW, | 118 | ECORE_DRM2_BACKLIGHT_RAW, |
@@ -157,6 +215,12 @@ struct _Ecore_Drm2_Output | |||
157 | Ecore_Drm2_Release_Handler release_cb; | 215 | Ecore_Drm2_Release_Handler release_cb; |
158 | void *release_data; | 216 | void *release_data; |
159 | 217 | ||
218 | # ifdef HAVE_ATOMIC_DRM | ||
219 | Ecore_Drm2_Crtc_State *crtc_state; | ||
220 | Ecore_Drm2_Connector_State *conn_state; | ||
221 | Ecore_Drm2_Plane_State *plane_state; | ||
222 | # endif | ||
223 | |||
160 | Eina_Bool connected : 1; | 224 | Eina_Bool connected : 1; |
161 | Eina_Bool primary : 1; | 225 | Eina_Bool primary : 1; |
162 | Eina_Bool cloned : 1; | 226 | Eina_Bool cloned : 1; |
@@ -187,6 +251,10 @@ struct _Ecore_Drm2_Device | |||
187 | Ecore_Event_Handler *active_hdlr; | 251 | Ecore_Event_Handler *active_hdlr; |
188 | Ecore_Event_Handler *device_change_hdlr; | 252 | Ecore_Event_Handler *device_change_hdlr; |
189 | 253 | ||
254 | # ifdef HAVE_ATOMIC_DRM | ||
255 | Ecore_Drm2_Atomic_State *state; | ||
256 | # endif | ||
257 | |||
190 | Eina_List *outputs; | 258 | Eina_List *outputs; |
191 | }; | 259 | }; |
192 | 260 | ||