diff options
author | Chris Michael <cp.michael@samsung.com> | 2015-05-06 12:15:56 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-05-07 14:39:46 -0400 |
commit | 94adf30b93e7a1bc2f7d77ea98beddc81bffdd06 (patch) | |
tree | 7f244b46e07669db85b4a2edf4f065c7849cb700 | |
parent | c79922f392d01102cd6a9eb9db58565d149b3134 (diff) | |
download | efl-94adf30b93e7a1bc2f7d77ea98beddc81bffdd06.tar.gz |
ecore-drm: Add support for a Primary Output
Summary: As 'primary' output support is not implemented in hardware,
we need to support this feature via software. For now, the first
output returned via libdrm will be marked as 'primary' until user
changes it via config
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_output.c | 8 | ||||
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_private.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 32249cbb14..9ce8641363 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -507,6 +507,13 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto dev->outputs = eina_list_append(dev->outputs, output); + /* NB: 'primary' output property is not supported in HW, so we need to + * implement it via software. As such, the First output which gets + * listed via libdrm will be assigned 'primary' until user changes + * it via config */ + if (eina_list_count(dev->outputs) == 1) + output->primary = EINA_TRUE; + DBG("Created New Output At %d,%d", output->x, output->y); DBG("\tCrtc Pos: %d %d", output->crtc->x, output->crtc->y); DBG("\tCrtc: %d", output->crtc_id); @@ -515,6 +522,7 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto DBG("\tModel: %s", output->model); DBG("\tName: %s", output->name); DBG("\tCloned: %d", output->cloned); + DBG("\tPrimary: %d", output->primary); EINA_LIST_FOREACH(output->modes, l, mode) { diff --git a/src/lib/ecore_drm/ecore_drm_private.h b/src/lib/ecore_drm/ecore_drm_private.h index 8a2ca3c91b..063ac06632 100644 --- a/src/lib/ecore_drm/ecore_drm_private.h +++ b/src/lib/ecore_drm/ecore_drm_private.h @@ -135,6 +135,7 @@ struct _Ecore_Drm_Output Ecore_Drm_Backlight *backlight; + Eina_Bool primary : 1; Eina_Bool connected : 1; Eina_Bool enabled : 1; Eina_Bool cloned : 1; |