linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mga_vid
@ 2004-03-22 22:14 gilles
  2004-03-22 22:30 ` mga_vid Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gilles @ 2004-03-22 22:14 UTC (permalink / raw)
  To: linux-hotplug

Hello.

The video player "MPlayer" is provided with a kernel module that enhances
performance for some Matrox graphics cards.

Without udev, one should manually create a device node with
# mknod /dev/mga_vid c 178 0

I've placed the module name in /etc/modules, and 'something' is going on,
according to the following:

$ find /sys/ -name '*mga*' -print
/sys/cdev/major/mga_vid

$ ls -l /sys/cdev/major/mga_vid
total 0
drwxr-xr-x    2 root     root            0 Mar 22 14:11 .
drwxr-xr-x   13 root     root            0 Mar 22 15:10 ..

$ ls -l /etc/udev/.dev/mga_vid
crw-rw-r--    1 root     video    178,   0 Feb 26  2002 /etc/udev/.dev/mga_vid

but there is no '/dev/mga_vid'.
With udev, what would be required to set it up?

Best regards,
Gilles


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mga_vid
  2004-03-22 22:14 mga_vid gilles
@ 2004-03-22 22:30 ` Greg KH
  2004-03-23  7:05 ` mga_vid Frédéric L. W. Meunier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-03-22 22:30 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Mar 22, 2004 at 11:14:40PM +0100, gilles@harfang.homelinux.org wrote:
> 
> $ ls -l /sys/cdev/major/mga_vid

There is no /sys/cdev in the kernel anymore, thankfully :)

> but there is no '/dev/mga_vid'.
> With udev, what would be required to set it up?

The kernel driver needs to be modified to use sysfs.  Where is the
source for this kernel driver?  Is it in the main kernel tree?

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mga_vid
  2004-03-22 22:14 mga_vid gilles
  2004-03-22 22:30 ` mga_vid Greg KH
@ 2004-03-23  7:05 ` Frédéric L. W. Meunier
  2004-03-23 13:00 ` mga_vid gilles
  2004-03-23 16:01 ` mga_vid Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Frédéric L. W. Meunier @ 2004-03-23  7:05 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 22 Mar 2004, Greg KH wrote:

> On Mon, Mar 22, 2004 at 11:14:40PM +0100, gilles@harfang.homelinux.org wrote:
> >
> > $ ls -l /sys/cdev/major/mga_vid
>
> There is no /sys/cdev in the kernel anymore, thankfully :)
>
> > but there is no '/dev/mga_vid'.
> > With udev, what would be required to set it up?
>
> The kernel driver needs to be modified to use sysfs.  Where is the
> source for this kernel driver?  Is it in the main kernel tree?

MPlayer. SVGAlib needs too to be modified since it has a
svgalib_helper module that creates /dev/svga.

-- 
http://www.pervalidus.net/contact.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mga_vid
  2004-03-22 22:14 mga_vid gilles
  2004-03-22 22:30 ` mga_vid Greg KH
  2004-03-23  7:05 ` mga_vid Frédéric L. W. Meunier
@ 2004-03-23 13:00 ` gilles
  2004-03-23 16:01 ` mga_vid Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: gilles @ 2004-03-23 13:00 UTC (permalink / raw)
  To: linux-hotplug

> > >
> > > $ ls -l /sys/cdev/major/mga_vid
> >
> > There is no /sys/cdev in the kernel anymore, thankfully :)
> >

I'm not versed in kernel programming, so I can't appreciate
this feeling of relief. :-}

> > > but there is no '/dev/mga_vid'.
> > > With udev, what would be required to set it up?
> >
> > The kernel driver needs to be modified to use sysfs.

Is it a lot of work?
Is there a standard way to proceed [Like: you should find <this>
and replace it with <that>] ?  Is it explained somewhere?

> > Where is the
> > source for this kernel driver?  Is it in the main kernel tree?
> 
> MPlayer. SVGAlib needs too to be modified since it has a
> svgalib_helper module that creates /dev/svga.
> 

From the module source 'README':
 [...]
         mga_vid is a kernel module that utilitizes the Matrox g200/g400 video
         scaler/overlay unit to perform YUV->RGB colorspace conversion and
         arbitrary video scaling.
                                                                                          
         mga_vid is also a monster hack.
 [...]                                                                                          

The code provided in the MPlayer source tree doesn't work anymore with
kernel 2.6, and someone named Brian Hall made the necessary modifications
in a separate tarball.
Shall I send it to you?

Gilles


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mga_vid
  2004-03-22 22:14 mga_vid gilles
                   ` (2 preceding siblings ...)
  2004-03-23 13:00 ` mga_vid gilles
@ 2004-03-23 16:01 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-03-23 16:01 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 23, 2004 at 02:00:18PM +0100, gilles@harfang.homelinux.org wrote:
> > > > but there is no '/dev/mga_vid'.
> > > > With udev, what would be required to set it up?
> > >
> > > The kernel driver needs to be modified to use sysfs.
> 
> Is it a lot of work?

Not really, only 3-10 lines of code need to be added to the driver.

> Is there a standard way to proceed [Like: you should find <this>
> and replace it with <that>] ?  Is it explained somewhere?

I've documented it a number of times in the linux-kernel archives.
Basically you need to add a class_simple structure, and add devices to
that structure when needed.  See the drivers/base/class_simple.c code
for information on the API, and any of the drivers that use that
interface for examples of how to use it (like drivers/char/misc.c or
drivers/char/mem.c).

Hope this helps,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-23 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-22 22:14 mga_vid gilles
2004-03-22 22:30 ` mga_vid Greg KH
2004-03-23  7:05 ` mga_vid Frédéric L. W. Meunier
2004-03-23 13:00 ` mga_vid gilles
2004-03-23 16:01 ` mga_vid Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).