aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-11-06 08:59:10 -0500
committerChris Michael <cp.michael@samsung.com>2018-01-31 11:18:02 -0500
commitcb4d626db9b942076aae164dbc0dfbba8e2dbda2 (patch)
tree032f78b0a06588895912439c26f0e47257f44f85
parentefl_ui_focus_parent_provider_gen: code refactoring (diff)
downloadefl-cb4d626db9b942076aae164dbc0dfbba8e2dbda2.tar.gz
ecore-drm2: Add API function to retrieve output user data
With the rework of Ecore_Evas drm engine, we need to get the ecore_evas itself in the pageflip callback so we have to reassign output->user_data to the ecore_evas which we can then retrieve via this function. This is needed as the pageflip callback now passes us the output from which the pageflip is complete. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h10
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c18
2 files changed, 19 insertions, 9 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index bede4e5406..04c224f6ec 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -782,6 +782,16 @@ EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rot
EAPI void ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data);
/**
+ * Get the user data for the output's page flip handler
+ *
+ * @param output The output to get the user data for
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.19
+ */
+EAPI void *ecore_drm2_output_user_data_get(Ecore_Drm2_Output *o);
+
+/**
* Get the subpixel state of the output
* @param output the output
* @return The state value
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 1d1861bd89..3089206ebc 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -764,12 +764,6 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne
if (!eina_list_count(dev->outputs))
output->primary = EINA_TRUE;
- else
- {
- /* temporarily disable other outputs which are not primary */
- output->connected = EINA_FALSE;
- output->enabled = EINA_FALSE;
- }
dev->outputs = eina_list_append(dev->outputs, output);
@@ -1292,7 +1286,7 @@ _output_mode_atomic_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode)
}
ret = sym_drmModeAtomicCommit(output->fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET,
- output->user_data);
+ output);
if (ret < 0)
{
ERR("Failed to commit atomic Mode: %m");
@@ -1456,6 +1450,13 @@ ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data)
o->user_data = data;
}
+EAPI void *
+ecore_drm2_output_user_data_get(Ecore_Drm2_Output *o)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(o, NULL);
+ return o->user_data;
+}
+
EAPI void
ecore_drm2_output_gamma_set(Ecore_Drm2_Output *output, uint16_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
{
@@ -1530,8 +1531,7 @@ ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation)
pstate->rotation.id, rotation);
if (res < 0) goto err;
- res = sym_drmModeAtomicCommit(output->fd, req, flags,
- output->user_data);
+ res = sym_drmModeAtomicCommit(output->fd, req, flags, output);
if (res < 0)
goto err;
else