summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-06 12:15:56 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-07 14:39:46 -0400
commit94adf30b93e7a1bc2f7d77ea98beddc81bffdd06 (patch)
tree7f244b46e07669db85b4a2edf4f065c7849cb700 /src/lib/ecore_drm
parentc79922f392d01102cd6a9eb9db58565d149b3134 (diff)
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>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c8
-rw-r--r--src/lib/ecore_drm/ecore_drm_private.h1
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
507 507
508 dev->outputs = eina_list_append(dev->outputs, output); 508 dev->outputs = eina_list_append(dev->outputs, output);
509 509
510 /* NB: 'primary' output property is not supported in HW, so we need to
511 * implement it via software. As such, the First output which gets
512 * listed via libdrm will be assigned 'primary' until user changes
513 * it via config */
514 if (eina_list_count(dev->outputs) == 1)
515 output->primary = EINA_TRUE;
516
510 DBG("Created New Output At %d,%d", output->x, output->y); 517 DBG("Created New Output At %d,%d", output->x, output->y);
511 DBG("\tCrtc Pos: %d %d", output->crtc->x, output->crtc->y); 518 DBG("\tCrtc Pos: %d %d", output->crtc->x, output->crtc->y);
512 DBG("\tCrtc: %d", output->crtc_id); 519 DBG("\tCrtc: %d", output->crtc_id);
@@ -515,6 +522,7 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto
515 DBG("\tModel: %s", output->model); 522 DBG("\tModel: %s", output->model);
516 DBG("\tName: %s", output->name); 523 DBG("\tName: %s", output->name);
517 DBG("\tCloned: %d", output->cloned); 524 DBG("\tCloned: %d", output->cloned);
525 DBG("\tPrimary: %d", output->primary);
518 526
519 EINA_LIST_FOREACH(output->modes, l, mode) 527 EINA_LIST_FOREACH(output->modes, l, mode)
520 { 528 {
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
135 135
136 Ecore_Drm_Backlight *backlight; 136 Ecore_Drm_Backlight *backlight;
137 137
138 Eina_Bool primary : 1;
138 Eina_Bool connected : 1; 139 Eina_Bool connected : 1;
139 Eina_Bool enabled : 1; 140 Eina_Bool enabled : 1;
140 Eina_Bool cloned : 1; 141 Eina_Bool cloned : 1;