[MPlayer-matrox] anyone still using a G200

Tamas, Gergely dice at mfa.kfki.hu
Sun Sep 3 17:20:05 CEST 2006


Hi,

 > My fault...
 > 
 > Can you try the following patch (I only have agp ones, and so cannot put
 > multiple cards into my computer) ...

Better try this one :

--- <<< --- <<< --- <<< ---
Index: mga_vid.c
===================================================================
--- mga_vid.c	(revision 244)
+++ mga_vid.c	(working copy)
@@ -1143,7 +1143,10 @@
 				mga_vid_major = major;
 
 				mga_vid_class = class_create(THIS_MODULE, "mga_vid");
-				class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, 0), NULL, "mga_vid");
+				for(i = 0; i < mga_cards_num; i++)
+				{
+					class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, i), NULL, "mga_vid%d", i);
+				}
 
  				printk(KERN_INFO "mga_vid: using major: %d (assigned or default!)\n", major);
 			}
@@ -1195,7 +1198,10 @@
 		}
 	}
 
-	class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, 0));
+	for(i = 0; i < mga_cards_num; i++)
+	{
+		class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, i));
+	}
 	class_destroy(mga_vid_class);
 
 	//FIXME turn off BES
--- <<< --- <<< --- <<< ---

And use something like this in /etc/udev/rules.d/mga_vid.rules :

--- >>> --- >>> --- >>> ---
KERNEL=="mga_vid[0-9]*", NAME="mga_vid/%n", SYMLINK+="%k", MODE="0660", GROUP="video"
--- <<< --- <<< --- <<< ---

This will create :

/dev/mga_vid/0
/dev/mga_vid0 -> /dev/mga_vid/0

And set proper permissions on /dev/mga_vid/0 .

Gergely



More information about the MPlayer-matrox mailing list