forked from enlightenment/efl
ecore-drm: Add API function to return the edid of a given output
Summary: This adds a new API function to return the EDID string of a given output. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
130ad6d60f
commit
34664306a9
|
@ -824,6 +824,18 @@ EAPI unsigned int ecore_drm_output_connector_type_get(Ecore_Drm_Output *output);
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output);
|
EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the edid of a given output
|
||||||
|
*
|
||||||
|
* @param output The Ecore_Drm_Output to get the backlight of
|
||||||
|
*
|
||||||
|
* @return A string representing the edid
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Drm_Output_Group
|
||||||
|
* @since 1.15
|
||||||
|
*/
|
||||||
|
EAPI char *ecore_drm_output_edid_get(Ecore_Drm_Output *output);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -160,10 +160,13 @@ _ecore_drm_output_edid_find(Ecore_Drm_Output *output, drmModeConnector *conn)
|
||||||
conn->prop_values[i]);
|
conn->prop_values[i]);
|
||||||
}
|
}
|
||||||
drmModeFreeProperty(prop);
|
drmModeFreeProperty(prop);
|
||||||
|
if (blob) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!blob) return;
|
if (!blob) return;
|
||||||
|
|
||||||
|
output->edid_blob = (char *)eina_memdup(blob->data, blob->length, 1);
|
||||||
|
|
||||||
ret = _ecore_drm_output_edid_parse(output, blob->data, blob->length);
|
ret = _ecore_drm_output_edid_parse(output, blob->data, blob->length);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
|
@ -1125,3 +1128,12 @@ ecore_drm_output_backlight_get(Ecore_Drm_Output *output)
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
|
||||||
return (output->backlight != NULL);
|
return (output->backlight != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI char *
|
||||||
|
ecore_drm_output_edid_get(Ecore_Drm_Output *output)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid_blob, NULL);
|
||||||
|
|
||||||
|
return strdup(output->edid_blob);
|
||||||
|
}
|
||||||
|
|
|
@ -131,6 +131,8 @@ struct _Ecore_Drm_Output
|
||||||
Ecore_Drm_Output_Mode *current_mode;
|
Ecore_Drm_Output_Mode *current_mode;
|
||||||
Eina_List *modes;
|
Eina_List *modes;
|
||||||
|
|
||||||
|
char *edid_blob;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char eisa[13];
|
char eisa[13];
|
||||||
|
|
Loading…
Reference in New Issue