summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-04-08 13:54:48 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2015-04-10 11:09:51 +0200
commitf6c55509466d3e18f4b128f345258fbdacedb337 (patch)
treecff484bd11bb44f05e405b32222a0be37cfe702a /src/modules/ecore_evas/engines/drm
parent3cb5c2bf0b5958976cf1af67b782b9423e61752b (diff)
ecore-evas-drm: Use new Ecore_Drm functions to get properties of the output
Summary: This makes use of the newly added Ecore_Drm API functions to get information about the output so we can setup the Evas engine properly @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules/ecore_evas/engines/drm')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 72e2d624ab..d602f47194 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -249,14 +249,33 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
249 249
250 if ((einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas))) 250 if ((einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas)))
251 { 251 {
252 Ecore_Drm_Output *output;
253 char *num;
254
252 einfo->info.depth = 32; // FIXME 255 einfo->info.depth = 32; // FIXME
253 einfo->info.destination_alpha = ee->alpha; 256 einfo->info.destination_alpha = ee->alpha;
254 einfo->info.rotation = ee->rotation; 257 einfo->info.rotation = ee->rotation;
255 einfo->info.vsync = EINA_TRUE; 258
259 if ((num = getenv("EVAS_DRM_VSYNC")))
260 {
261 if (!atoi(num))
262 einfo->info.vsync = EINA_FALSE;
263 else
264 einfo->info.vsync = EINA_TRUE;
265 }
266 else
267 einfo->info.vsync = EINA_TRUE;
268
256 einfo->info.use_hw_accel = EINA_FALSE; 269 einfo->info.use_hw_accel = EINA_FALSE;
257 einfo->info.fd = ecore_drm_device_fd_get(dev);
258 einfo->info.dev = dev; 270 einfo->info.dev = dev;
259 271
272 if ((output = ecore_drm_device_output_find(dev, x, y)))
273 {
274 einfo->info.conn_id = ecore_drm_output_connector_id_get(output);
275 einfo->info.crtc_id = ecore_drm_output_crtc_id_get(output);
276 einfo->info.buffer_id = ecore_drm_output_crtc_buffer_get(output);
277 }
278
260 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) 279 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
261 { 280 {
262 ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); 281 ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
@@ -269,7 +288,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
269 goto eng_err; 288 goto eng_err;
270 } 289 }
271 290
272 ee->prop.window = einfo->info.output; 291 ee->prop.window = einfo->info.buffer_id;
273 292
274 _ecore_evas_register(ee); 293 _ecore_evas_register(ee);
275 ecore_evas_input_event_register(ee); 294 ecore_evas_input_event_register(ee);
@@ -869,7 +888,7 @@ _ecore_evas_drm_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
869 edata->w = ee->w; 888 edata->w = ee->w;
870 edata->h = ee->h; 889 edata->h = ee->h;
871 if ((einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas))) 890 if ((einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas)))
872 ecore_drm_output_size_get(dev, einfo->info.output, &ow, &oh); 891 ecore_drm_output_size_get(dev, einfo->info.buffer_id, &ow, &oh);
873 892
874 if ((ow == 0) || (oh == 0)) 893 if ((ow == 0) || (oh == 0))
875 { 894 {