[pkg-fso-commits] [SCM] xf86-video-glamo, SMedia Glamo video driver for X.Org branch, master, updated. upstream/0.0.0+20090707.git98c012f7-57-g9918e08

Thomas White taw at bitwiz.org.uk
Fri Jan 8 13:25:15 UTC 2010


The following commit has been merged in the master branch:
commit f84cf6e1b0a6692e7e5a41b7133544265cefed49
Author: Thomas White <taw at bitwiz.org.uk>
Date:   Sun Nov 8 19:42:19 2009 +0100

    Support both old and new sysfs layout in GlamoKernelModesettingAvailable()

diff --git a/src/glamo-kms-driver.c b/src/glamo-kms-driver.c
index 34c7baf..f790576 100644
--- a/src/glamo-kms-driver.c
+++ b/src/glamo-kms-driver.c
@@ -78,24 +78,49 @@
 Bool GlamoKernelModesettingAvailable()
 {
 	DIR *dir;
-	struct dirent *ent;
 
+	/* Try old location */
 	dir = opendir("/sys/bus/platform/devices/glamo-fb.0/");
-	if ( !dir ) return FALSE;
+	if ( dir ) {
 
-	do {
+		struct dirent *ent;
 
-		ent = readdir(dir);
-		if ( !ent ) return FALSE;
+		do {
 
-		if ( strncmp(ent->d_name, "drm:controlD", 12) == 0 ) {
-			closedir(dir);
-			return TRUE;
-		}
+			ent = readdir(dir);
+			if ( !ent ) return FALSE;
+
+			if ( strncmp(ent->d_name, "drm:controlD", 12) == 0 ) {
+				closedir(dir);
+				return TRUE;
+			}
+
+		} while ( ent );
+
+		closedir(dir);
+	}
+
+	/* Try new location */
+	dir = opendir("/sys/bus/platform/devices/glamo-fb.0/drm/");
+	if ( dir ) {
 
-	} while ( ent );
+		struct dirent *ent;
+
+		do {
+
+			ent = readdir(dir);
+			if ( !ent ) return FALSE;
+
+			if ( strncmp(ent->d_name, "drm:controlD", 12) == 0 ) {
+				closedir(dir);
+				return TRUE;
+			}
+
+		} while ( ent );
+
+		closedir(dir);
+	}
 
-	closedir(dir);
 	return FALSE;
 }
 

-- 
xf86-video-glamo, SMedia Glamo video driver for X.Org



More information about the pkg-fso-commits mailing list