aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/ecore_drm2_device.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-05-30 11:01:22 -0400
committerChris Michael <cp.michael@samsung.com>2017-05-30 11:01:22 -0400
commitbd189f69f2926b479b334c30650606645d7fa245 (patch)
tree0dce6c1b78fd38a1e2cb4875833e7934b5f39932 /src/lib/ecore_drm2/ecore_drm2_device.c
parentecore-drm2: Don't fill output atomic states if not using atomic (diff)
downloadefl-bd189f69f2926b479b334c30650606645d7fa245.tar.gz
ecore-drm2: Don't fill device atomic state if atomic is disabled
If atomic support is disabled (via kernel or env var), then we do not need to fill device atomic state as it will not be used anyway. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index 73805c82b4..41d2128604 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -639,9 +639,12 @@ ecore_drm2_device_open(Ecore_Drm2_Device *device)
}
}
- device->state = calloc(1, sizeof(Ecore_Drm2_Atomic_State));
- if (device->state)
- _drm2_atomic_state_fill(device->state, device->fd);
+ if (_ecore_drm2_use_atomic)
+ {
+ device->state = calloc(1, sizeof(Ecore_Drm2_Atomic_State));
+ if (device->state)
+ _drm2_atomic_state_fill(device->state, device->fd);
+ }
device->active_hdlr =
ecore_event_handler_add(ELPUT_EVENT_SESSION_ACTIVE,
@@ -674,7 +677,8 @@ ecore_drm2_device_free(Ecore_Drm2_Device *device)
{
EINA_SAFETY_ON_NULL_RETURN(device);
- _drm2_atomic_state_free(device->state);
+ if (_ecore_drm2_use_atomic)
+ _drm2_atomic_state_free(device->state);
ecore_event_handler_del(device->active_hdlr);
ecore_event_handler_del(device->device_change_hdlr);