From 62a6b32ed3d5a986f18602224f6db73c6726bf39 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 12 Feb 2014 14:28:00 +0000 Subject: [PATCH] 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 --- src/modules/evas/engines/drm/evas_engine.h | 46 +++++++++++++++++++----------- 1 file 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 52e3ead..8eec6fd 100644 --- a/src/modules/evas/engines/drm/evas_engine.h +++ b/src/modules/evas/engines/drm/evas_engine.h @@ -11,12 +11,6 @@ #include #include -/* #ifdef HAVE_DRM_HW_ACCEL */ -/* # include */ -/* # include */ -/* # include */ -/* #endif */ - #include #include #include @@ -54,6 +48,7 @@ extern int _evas_engine_drm_log_dom; # define NUM_BUFFERS 3 typedef struct _Buffer Buffer; +typedef struct _Plane Plane; typedef struct _Outbuf Outbuf; enum @@ -78,19 +73,30 @@ struct _Buffer int stride, size; int handle; unsigned int fb; - void *data; + void *data; // used for software framebuffers -/* # ifdef HAVE_DRM_HW_ACCEL */ -/* struct gbm_surface *surface; */ -/* struct */ -/* { */ -/* EGLSurface surface; */ -/* } egl; */ -/* # endif */ +# ifdef HAVE_DRM_HW_ACCEL + void *bo; // used for hardware framebuffers +# endif Eina_Bool valid : 1; }; +struct _Plane +{ + unsigned int id; + unsigned int crtcs; + + struct + { + unsigned int x, y; + unsigned int w, h; + } src, dst; + + unsigned int num_formats; + unsigned int formats[]; +}; + struct _Outbuf { int w, h; @@ -102,19 +108,25 @@ struct _Outbuf RGBA_Image *onebuf; Eina_Array onebuf_regions; + int fd; + unsigned int conn, crtc; + Buffer buffer[NUM_BUFFERS], *sent; int curr, num; - int fd; - unsigned int conn, crtc; drmModeModeInfo mode; drmEventContext ctx; Eina_Bool pending_flip : 1; + Eina_Bool use_async_page_flip : 1; Eina_List *pending_writes; Eina_List *prev_pending_writes; - Eina_Bool use_async_page_flip : 1; + Eina_List *planes; + +# ifdef HAVE_DRM_HW_ACCEL + void *surface; +# endif } priv; }; -- 2.7.4