Discussion:
anyone still using a G200
Attila Kinali
2006-09-03 09:30:13 UTC
Permalink
Moin,

Is anyone still using a G200 and could tell me whether
it is still working with current mga_vid for 2.6 and
MPlayer svn?

I hit a bug, but i cannot tell whether it's due
to my strange setup (ie the accessed card is not
fully initialized) or something in MPlayer that's
going wrong.

Thanks in advance

Attila Kinali
--
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
-- reeler in +kaosu
Tamas, Gergely
2006-09-03 11:13:35 UTC
Permalink
Hi,
Post by Attila Kinali
Is anyone still using a G200 and could tell me whether
it is still working with current mga_vid for 2.6 and
MPlayer svn?
I have following matrox cards :
- g200
- g400 single head
- g450
- g550

Will test soon if current code works with g200.

Gergo
Tamas, Gergely
2006-09-03 13:28:05 UTC
Permalink
Hi,
Post by Tamas, Gergely
Will test soon if current code works with g200.
Driver loads ...

--- >>> --- >>> --- >>> ---
mga_vid: Found MGA G200 AGP at 0000:01:00.0
mga_vid: MMIO at 0xd0af8000 framebuffer: 0xCD000000
mga_vid: OPTION word: 0x40079521 mem: 0x05 SDRAM
mga_vid: detected RAMSIZE is 8 MB
mga_vid: 1 supported cards found
mga_vid: using major: 83 (assigned or default!)
--- <<< --- <<< --- <<< ---

... but does not work.

Tested with kernel 2.6.16 & MPlayer 1.0pre8 and mga_vid_test .

In both cases it only displays a green square with different colored
patterns in it (green, light green, magenta).

Any ideas?

Gergely
Attila Kinali
2006-09-03 13:32:06 UTC
Permalink
On Sun, 3 Sep 2006 15:28:05 +0200
Post by Tamas, Gergely
... but does not work.
I assume you have a framebuffer or X running on
that card. Otherwise you hit the same problem
as i do (not fully initialized card).
Post by Tamas, Gergely
Tested with kernel 2.6.16 & MPlayer 1.0pre8 and mga_vid_test .
In both cases it only displays a green square with different colored
patterns in it (green, light green, magenta).
That sounds like that the colour planes are not correctly
converted. G200 does not use planar colour planes like
most other cards, but has Y-U-V interleaved.

Attila Kinali
--
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
-- reeler in +kaosu
Tamas, Gergely
2006-09-03 13:58:41 UTC
Permalink
Hi,
Post by Attila Kinali
Post by Tamas, Gergely
... but does not work.
I assume you have a framebuffer or X running on
that card. Otherwise you hit the same problem
as i do (not fully initialized card).
How true... :( I installed xorg onto the machine, now everything works
fine. Sorry for the false alarm.

Gergely

ps: I thought about adding a README.udev to the svn; describing the
setup of udev.rules. what is your opinion about this?
Attila Kinali
2006-09-03 14:07:49 UTC
Permalink
On Sun, 3 Sep 2006 15:58:41 +0200
Post by Tamas, Gergely
How true... :( I installed xorg onto the machine, now everything works
fine. Sorry for the false alarm.
No problem. Thanks for testing.
Post by Tamas, Gergely
ps: I thought about adding a README.udev to the svn; describing the
setup of udev.rules. what is your opinion about this?
Go ahead.

BTW: While we are at udev. I'm currently trying to figure
out how i can tell udev that
1) it should create me a mga_vidXX file for every
card i have in the system
and
2) make mga_vid a symlink to mga_vid1

Unfortunately, i'm looking the wrong way and cannot figure
it out. Any hints?

Attila Kinali
--
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
-- reeler in +kaosu
Tamas, Gergely
2006-09-03 14:43:42 UTC
Permalink
Hi,
Post by Attila Kinali
BTW: While we are at udev. I'm currently trying to figure
out how i can tell udev that
1) it should create me a mga_vidXX file for every
card i have in the system
Something like the following should (but it does currently not) work :

KERNEL=="mga_vid[0-9]*", NAME="mga_vid/%n", SYMLINK="mga_vid%n", MODE="0660", GROUP="video"
Post by Attila Kinali
and
2) make mga_vid a symlink to mga_vid1
Unfortunately, i'm looking the wrong way and cannot figure
it out. Any hints?
How do you want to use multiple cards? Current driver has the minor
number hard-coded :

1141: mga_cdev_handle = MKDEV(major,0);
1146: class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, 0), NULL, "mga_vid");
1198: class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, 0));

Gergely
Tamas, Gergely
2006-09-03 14:55:16 UTC
Permalink
Hi,
Post by Tamas, Gergely
How do you want to use multiple cards? Current driver has the minor
1141: mga_cdev_handle = MKDEV(major,0);
1146: class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, 0), NULL, "mga_vid");
1198: class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, 0));
My fault...

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

--- <<< --- <<< --- <<< ---
diff -ur mga_vid~/mga_vid.c mga_vid/mga_vid.c
--- mga_vid~/mga_vid.c 2006-07-29 23:25:08.000000000 +0200
+++ mga_vid/mga_vid.c 2006-09-03 18:06:35.000000000 +0200
@@ -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");
+ }

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
--- <<< --- <<< --- <<< ---

Gergely
Tamas, Gergely
2006-09-03 15:20:05 UTC
Permalink
Hi,
Post by Tamas, Gergely
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
Tamas, Gergely
2006-09-03 16:15:21 UTC
Permalink
Hi,
And if you want to be compatible with apps ... :)

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

Gergely
Attila Kinali
2006-09-04 13:30:57 UTC
Permalink
On Sun, 3 Sep 2006 18:15:21 +0200
Post by Tamas, Gergely
Hi,
And if you want to be compatible with apps ... :)
--- >>> --- >>> --- >>> ---
KERNEL=="mga_vid[0-9]*", NAME="%k", MODE="0660", GROUP="video"
KERNEL=="mga_vid0", SYMLINK+="mga_vid"
--- <<< --- <<< --- <<< ---
Works like a charm, thanks!

mga_vid is now officialy amd64 certified :)

Attila Kinali
--
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
-- reeler in +kaosu
Continue reading on narkive:
Loading...