aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_x/xlib/ecore_x_vsync.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-08 22:00:33 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-08 22:00:33 +0900
commit66d53e596809ca858db112d20f3801639c19600a (patch)
tree082f28cadc76a799f42f2d3a7d91e8135cabebb6 /src/lib/ecore_x/xlib/ecore_x_vsync.c
parentEdje_cc: check value for text.source attribute. (diff)
downloadefl-66d53e596809ca858db112d20f3801639c19600a.tar.gz
ecore x vsync - add in exynos checks and move kernel v checks inside
this adds asmung exynos driver as a whiteliested drm vsync driver. this means 3.0 needs to work so move kernel ver checks inot each driver. @feature
Diffstat (limited to 'src/lib/ecore_x/xlib/ecore_x_vsync.c')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_vsync.c85
1 files changed, 62 insertions, 23 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_vsync.c b/src/lib/ecore_x/xlib/ecore_x_vsync.c
index 1701168669..1cc807b2bb 100644
--- a/src/lib/ecore_x/xlib/ecore_x_vsync.c
+++ b/src/lib/ecore_x/xlib/ecore_x_vsync.c
@@ -400,6 +400,7 @@ _drm_init(int *flags)
struct stat st;
char buf[512];
Eina_Bool ok = EINA_FALSE;
+ int vmaj = 0, vmin = 0;
// vboxvideo 4.3.14 is crashing when calls drmWaitVBlank()
// https://www.virtualbox.org/ticket/13265
@@ -431,11 +432,9 @@ _drm_init(int *flags)
{
if (fgets(buf, sizeof(buf), fp))
{
- int vmaj = 0, vmin = 0;
-
if (sscanf(buf, "%i.%i.%*s", &vmaj, &vmin) == 2)
{
- if ((vmaj >= 3) && (vmin >= 14)) ok = EINA_TRUE;
+ if (vmaj >= 3) ok = EINA_TRUE;
}
}
fclose(fp);
@@ -500,13 +499,27 @@ _drm_init(int *flags)
(drmver->date_len < 200))
{
// whitelist of known-to-work drivers
+ if ((!strcmp(drmver->name, "exynos")) &&
+ (strstr(drmver->desc, "Samsung")))
+ {
+ if (((vmaj >= 3) && (vmin >= 0)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted exynos OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
+ }
if ((!strcmp(drmver->name, "i915")) &&
(strstr(drmver->desc, "Intel Graphics")))
{
- if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
- fprintf(stderr, "Whitelisted intel OK\n");
- ok = EINA_TRUE;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted intel OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
}
if ((!strcmp(drmver->name, "radeon")) &&
(strstr(drmver->desc, "Radeon")) &&
@@ -514,10 +527,13 @@ _drm_init(int *flags)
(drmver->version_minor >= 39)) ||
(drmver->version_major > 2)))
{
- if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
- fprintf(stderr, "Whitelisted radeon OK\n");
- ok = EINA_TRUE;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted radeon OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
}
}
if ((((drmverbroken->version_major == 1) &&
@@ -527,13 +543,27 @@ _drm_init(int *flags)
(drmverbroken->date_len < 200))
{
// whitelist of known-to-work drivers
+ if ((!strcmp(drmverbroken->name, "exynos")) &&
+ (strstr(drmverbroken->desc, "Samsung")))
+ {
+ if (((vmaj >= 3) && (vmin >= 0)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted exynos OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
+ }
if ((!strcmp(drmverbroken->name, "i915")) &&
(strstr(drmverbroken->desc, "Intel Graphics")))
{
- if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
- fprintf(stderr, "Whitelisted intel OK\n");
- ok = EINA_TRUE;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted intel OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
}
if ((!strcmp(drmverbroken->name, "radeon")) &&
(strstr(drmverbroken->desc, "Radeon")) &&
@@ -541,10 +571,13 @@ _drm_init(int *flags)
(drmver->version_minor >= 39)) ||
(drmver->version_major > 2)))
{
- if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
- fprintf(stderr, "Whitelisted radeon OK\n");
- ok = EINA_TRUE;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ if (getenv("ECORE_VSYNC_DRM_VERSION_DEBUG"))
+ fprintf(stderr, "Whitelisted radeon OK\n");
+ ok = EINA_TRUE;
+ goto checkdone;
+ }
}
}
if ((drmver->version_major >= 0) &&
@@ -555,8 +588,11 @@ _drm_init(int *flags)
if ((!strcmp(drmver->name, "nvidia-drm")) &&
(strstr(drmver->desc, "NVIDIA DRM driver")))
{
- *flags |= DRM_HAVE_NVIDIA;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ *flags |= DRM_HAVE_NVIDIA;
+ goto checkdone;
+ }
}
}
if ((drmverbroken->version_major >= 0) &&
@@ -567,8 +603,11 @@ _drm_init(int *flags)
if ((!strcmp(drmverbroken->name, "nvidia-drm")) &&
(strstr(drmverbroken->desc, "NVIDIA DRM driver")))
{
- *flags |= DRM_HAVE_NVIDIA;
- goto checkdone;
+ if (((vmaj >= 3) && (vmin >= 14)) || (vmaj >= 4))
+ {
+ *flags |= DRM_HAVE_NVIDIA;
+ goto checkdone;
+ }
}
}
checkdone: