summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/drm/evas_engine.h
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-02-12 14:28:00 +0000
committerChris Michael <cp.michael@samsung.com>2014-02-28 13:12:31 +0000
commit62a6b32ed3d5a986f18602224f6db73c6726bf39 (patch)
tree58ab98ea2e27e3a028c741356a5af06a6d83c1eb /src/modules/evas/engines/drm/evas_engine.h
parentfcd492970257bf99e6ed853c4f3eb6bb57ea607b (diff)
evas-drm: Start on hardware Plane support
@feature: Start on hardware Plane support - Add Plane structure - Store list of Planes in the Output buffer Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules/evas/engines/drm/evas_engine.h')
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h46
1 files changed, 29 insertions, 17 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index 52e3eadfcf..8eec6fd98b 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -11,12 +11,6 @@
11#include <xf86drmMode.h> 11#include <xf86drmMode.h>
12#include <drm_fourcc.h> 12#include <drm_fourcc.h>
13 13
14/* #ifdef HAVE_DRM_HW_ACCEL */
15/* # include <gbm.h> */
16/* # include <EGL/egl.h> */
17/* # include <EGL/eglext.h> */
18/* #endif */
19
20#include <signal.h> 14#include <signal.h>
21#include <sys/ioctl.h> 15#include <sys/ioctl.h>
22#include <sys/types.h> 16#include <sys/types.h>
@@ -54,6 +48,7 @@ extern int _evas_engine_drm_log_dom;
54# define NUM_BUFFERS 3 48# define NUM_BUFFERS 3
55 49
56typedef struct _Buffer Buffer; 50typedef struct _Buffer Buffer;
51typedef struct _Plane Plane;
57typedef struct _Outbuf Outbuf; 52typedef struct _Outbuf Outbuf;
58 53
59enum 54enum
@@ -78,19 +73,30 @@ struct _Buffer
78 int stride, size; 73 int stride, size;
79 int handle; 74 int handle;
80 unsigned int fb; 75 unsigned int fb;
81 void *data; 76 void *data; // used for software framebuffers
82 77
83/* # ifdef HAVE_DRM_HW_ACCEL */ 78# ifdef HAVE_DRM_HW_ACCEL
84/* struct gbm_surface *surface; */ 79 void *bo; // used for hardware framebuffers
85/* struct */ 80# endif
86/* { */
87/* EGLSurface surface; */
88/* } egl; */
89/* # endif */
90 81
91 Eina_Bool valid : 1; 82 Eina_Bool valid : 1;
92}; 83};
93 84
85struct _Plane
86{
87 unsigned int id;
88 unsigned int crtcs;
89
90 struct
91 {
92 unsigned int x, y;
93 unsigned int w, h;
94 } src, dst;
95
96 unsigned int num_formats;
97 unsigned int formats[];
98};
99
94struct _Outbuf 100struct _Outbuf
95{ 101{
96 int w, h; 102 int w, h;
@@ -102,19 +108,25 @@ struct _Outbuf
102 RGBA_Image *onebuf; 108 RGBA_Image *onebuf;
103 Eina_Array onebuf_regions; 109 Eina_Array onebuf_regions;
104 110
111 int fd;
112 unsigned int conn, crtc;
113
105 Buffer buffer[NUM_BUFFERS], *sent; 114 Buffer buffer[NUM_BUFFERS], *sent;
106 int curr, num; 115 int curr, num;
107 116
108 int fd;
109 unsigned int conn, crtc;
110 drmModeModeInfo mode; 117 drmModeModeInfo mode;
111 drmEventContext ctx; 118 drmEventContext ctx;
112 Eina_Bool pending_flip : 1; 119 Eina_Bool pending_flip : 1;
120 Eina_Bool use_async_page_flip : 1;
113 121
114 Eina_List *pending_writes; 122 Eina_List *pending_writes;
115 Eina_List *prev_pending_writes; 123 Eina_List *prev_pending_writes;
116 124
117 Eina_Bool use_async_page_flip : 1; 125 Eina_List *planes;
126
127# ifdef HAVE_DRM_HW_ACCEL
128 void *surface;
129# endif
118 } priv; 130 } priv;
119}; 131};
120 132