aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-01-29 08:36:46 +0000
committerChris Michael <cp.michael@samsung.com>2014-01-29 15:27:23 +0000
commit7cb302f24fa2bd187e360128c68f63afafe31871 (patch)
tree1bedfc0a088327e201cf4f03d4b13b1957f21817
parentAdd function declaration for returning a fb from a bo (diff)
downloadefl-7cb302f24fa2bd187e360128c68f63afafe31871.tar.gz
Add API function to determine if sprites are supported on an output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm/ecore_drm_sprites.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_sprites.c b/src/lib/ecore_drm/ecore_drm_sprites.c
index 71ab5afff2..b457afe018 100644
--- a/src/lib/ecore_drm/ecore_drm_sprites.c
+++ b/src/lib/ecore_drm/ecore_drm_sprites.c
@@ -79,7 +79,8 @@ ecore_drm_sprites_destroy(Ecore_Drm_Device *dev)
EAPI void
ecore_drm_sprites_fb_set(Ecore_Drm_Sprite *sprite, int fb_id, int flags)
{
- if (!sprite) return;
+ if ((!sprite) || (!sprite->output)) return;
+
if (fb_id)
{
drmModeSetPlane(sprite->drm_fd, sprite->plane_id,
@@ -95,3 +96,20 @@ ecore_drm_sprites_fb_set(Ecore_Drm_Sprite *sprite, int fb_id, int flags)
0, 0, 0, 0, 0, 0, 0, 0);
}
}
+
+EAPI Eina_Bool
+ecore_drm_sprites_crtc_supported(Ecore_Drm_Output *output, unsigned int supported)
+{
+ Ecore_Drm_Device *dev;
+ unsigned int c = 0;
+
+ dev = output->dev;
+
+ for (c = 0; c < dev->crtc_count; c++)
+ {
+ if (dev->crtcs[c] != output->crtc_id) continue;
+ if ((supported) && (1 << c)) return EINA_FALSE;
+ }
+
+ return EINA_TRUE;
+}