summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_outputs.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-05-30 11:00:20 -0400
committerChris Michael <cp.michael@samsung.com>2017-05-30 11:00:20 -0400
commitba4042da1e25ee8ff0f95be242b5a865a0141669 (patch)
tree36fe872acfa6c48d8b6c4112d57b6a27561b86a0 /src/lib/ecore_drm2/ecore_drm2_outputs.c
parentac2c82b87116a11aaac2e200cdfb60b716059171 (diff)
ecore-drm2: Don't fill output atomic states if not using atomic
If atomic support is not enabled (kernel or env var), then we should not be filling in output atomic state @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_outputs.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index ae1a0c9654..3173165aa5 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -766,12 +766,15 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne
766 766
767 output->ocrtc = sym_drmModeGetCrtc(dev->fd, output->crtc_id); 767 output->ocrtc = sym_drmModeGetCrtc(dev->fd, output->crtc_id);
768 768
769 output->crtc_state = 769 if (_ecore_drm2_use_atomic)
770 _output_crtc_state_get(dev->state, output->crtc_id); 770 {
771 output->conn_state = 771 output->crtc_state =
772 _output_conn_state_get(dev->state, output->conn_id); 772 _output_crtc_state_get(dev->state, output->crtc_id);
773 output->plane_states = 773 output->conn_state =
774 _output_plane_states_get(dev->state, output->crtc_id, output->pipe); 774 _output_conn_state_get(dev->state, output->conn_id);
775 output->plane_states =
776 _output_plane_states_get(dev->state, output->crtc_id, output->pipe);
777 }
775 778
776 output->dpms = _output_dpms_property_get(dev->fd, conn); 779 output->dpms = _output_dpms_property_get(dev->fd, conn);
777 780
@@ -926,8 +929,11 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output)
926 EINA_LIST_FREE(output->planes, plane) 929 EINA_LIST_FREE(output->planes, plane)
927 free(plane); 930 free(plane);
928 931
929 free(output->conn_state); 932 if (_ecore_drm2_use_atomic)
930 free(output->crtc_state); 933 {
934 free(output->conn_state);
935 free(output->crtc_state);
936 }
931 937
932 EINA_LIST_FREE(output->modes, mode) 938 EINA_LIST_FREE(output->modes, mode)
933 { 939 {