* dri and udev
@ 2003-12-27 7:24 Jon Smirl
2003-12-27 16:36 ` Kay Sievers
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Jon Smirl @ 2003-12-27 7:24 UTC (permalink / raw)
To: linux-hotplug
I've been working on the dri drivers to make them appear in sysfs and udev. I
have it all working now using the simple_add_class_device() routine. The dri
device is normally found in /dev/dri/card0, /dev/dri/card1, etc. How do I make
the device appear in a subdir under udev?
==Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
@ 2003-12-27 16:36 ` Kay Sievers
2003-12-27 17:08 ` Jon Smirl
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Kay Sievers @ 2003-12-27 16:36 UTC (permalink / raw)
To: linux-hotplug
On Fri, Dec 26, 2003 at 11:24:25PM -0800, Jon Smirl wrote:
> I've been working on the dri drivers to make them appear in sysfs and udev. I
> have it all working now using the simple_add_class_device() routine. The dri
> device is normally found in /dev/dri/card0, /dev/dri/card1, etc. How do I make
> the device appear in a subdir under udev?
You may try NAME="dev/dri/card0", it will create the subdirs for you.
Examples are in the file udev.rules.devfs.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
2003-12-27 16:36 ` Kay Sievers
@ 2003-12-27 17:08 ` Jon Smirl
2003-12-27 19:13 ` Greg KH
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Jon Smirl @ 2003-12-27 17:08 UTC (permalink / raw)
To: linux-hotplug
Adding:
REPLACE, KERNEL="card*", NAME="dri/card%n"
to udev rules makes it work.
DRI sure made an unfortunate legacy choice of calling the driver cardX.
How is this going to work when there are multiple devices with the same name?
For example
/dev/hda and /dev/i2o/hda?
--- Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Fri, Dec 26, 2003 at 11:24:25PM -0800, Jon Smirl wrote:
> > I've been working on the dri drivers to make them appear in sysfs and udev.
> I
> > have it all working now using the simple_add_class_device() routine. The dri
> > device is normally found in /dev/dri/card0, /dev/dri/card1, etc. How do I
> make
> > the device appear in a subdir under udev?
>
> You may try NAME="dev/dri/card0", it will create the subdirs for you.
> Examples are in the file udev.rules.devfs.
>
> Kay
==Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
2003-12-27 16:36 ` Kay Sievers
2003-12-27 17:08 ` Jon Smirl
@ 2003-12-27 19:13 ` Greg KH
2003-12-27 19:13 ` Greg KH
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-12-27 19:13 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 27, 2003 at 09:08:57AM -0800, Jon Smirl wrote:
> Adding:
> REPLACE, KERNEL="card*", NAME="dri/card%n"
> to udev rules makes it work.
>
> DRI sure made an unfortunate legacy choice of calling the driver cardX.
>
> How is this going to work when there are multiple devices with the same name?
> For example
> /dev/hda and /dev/i2o/hda?
Those are two different devices, with different major/minor numbers.
i2o can't create a hda block device if there is already a block device
called hda in the system. So it will be called something else. As i2o
isn't working yet in 2.6, I'm not to worried about it :)
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (3 preceding siblings ...)
2003-12-27 19:13 ` Greg KH
@ 2003-12-27 19:13 ` Greg KH
2003-12-27 19:14 ` Greg KH
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-12-27 19:13 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 27, 2003 at 09:08:57AM -0800, Jon Smirl wrote:
> Adding:
> REPLACE, KERNEL="card*", NAME="dri/card%n"
> to udev rules makes it work.
>
> DRI sure made an unfortunate legacy choice of calling the driver cardX.
>
> How is this going to work when there are multiple devices with the same name?
> For example
> /dev/hda and /dev/i2o/hda?
Those are two different devices, with different major/minor numbers.
i2o can't create a hda block device if there is already a block device
called hda in the system. So it will be called something else. As i2o
isn't working yet in 2.6, I'm not to worried about it :)
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (2 preceding siblings ...)
2003-12-27 19:13 ` Greg KH
@ 2003-12-27 19:13 ` Greg KH
2003-12-27 19:13 ` Greg KH
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-12-27 19:13 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 27, 2003 at 09:08:57AM -0800, Jon Smirl wrote:
> Adding:
> REPLACE, KERNEL="card*", NAME="dri/card%n"
> to udev rules makes it work.
>
> DRI sure made an unfortunate legacy choice of calling the driver cardX.
>
> How is this going to work when there are multiple devices with the same name?
> For example
> /dev/hda and /dev/i2o/hda?
Those are two different devices, with different major/minor numbers.
i2o can't create a hda block device if there is already a block device
called hda in the system. So it will be called something else. As i2o
isn't working yet in 2.6, I'm not to worried about it :)
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (4 preceding siblings ...)
2003-12-27 19:13 ` Greg KH
@ 2003-12-27 19:14 ` Greg KH
2003-12-27 20:57 ` Jon Smirl
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-12-27 19:14 UTC (permalink / raw)
To: linux-hotplug
On Fri, Dec 26, 2003 at 11:24:25PM -0800, Jon Smirl wrote:
> I've been working on the dri drivers to make them appear in sysfs and udev. I
> have it all working now using the simple_add_class_device() routine.
Great, care to send me the kernel patch for this?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (6 preceding siblings ...)
2003-12-27 20:57 ` Jon Smirl
@ 2003-12-27 20:57 ` Jon Smirl
2003-12-28 1:23 ` Marco d'Itri
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Jon Smirl @ 2003-12-27 20:57 UTC (permalink / raw)
To: linux-hotplug
The new DRM module has other changes in it so it has to be sync'd with a
DRI/Xfree86 release. I also have to get the changes coordinated with the BSD
DRI people. DRM development happens out of the DRI tree not the kernel tree. So
after there is a DRI/Xfree86 Linus moves the changes over to the copy in the
kernel.
Another issue is the current conflict between fbdev and dri. Both device drivers
are trying to take overship of the graphics hardware. Right now fbdev owns the
hardware and DRI operates as a stealth module. For sysfs/udev to work DRI has to
have a PCI ID table and own the hardware. Doing this prevents fbdev and DRI from
simultaneously being loaded.
This conflict has not been resolved. We did a previous version of DRM which
registered with the kernel as owning the hardware and got a lot of vocal
complaints from fbdev developers. DRM was backed off into steath mode again.
Stealth mode looks like this. It never calls pci_register_driver so the kernel
never knows that DRM has attached to the device.
static int __init drm_init( void )
{
struct pci_dev *pdev = NULL;
DRM(parse_options)( drm_opts );
DRM(mem_init)();
while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
DRM(probe)(pdev);
}
return 0;
}
My personal opinion on this is that it is insane for two device drivers to be
trying to share the same same piece of hardware - it's multitasking for device
drivers. I also don't think udev/sysfs are set up to deal with two device
drivers claiming the same piece of hardware.
==Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (5 preceding siblings ...)
2003-12-27 19:14 ` Greg KH
@ 2003-12-27 20:57 ` Jon Smirl
2003-12-27 20:57 ` Jon Smirl
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Jon Smirl @ 2003-12-27 20:57 UTC (permalink / raw)
To: linux-hotplug
The new DRM module has other changes in it so it has to be sync'd with a
DRI/Xfree86 release. I also have to get the changes coordinated with the BSD
DRI people. DRM development happens out of the DRI tree not the kernel tree. So
after there is a DRI/Xfree86 Linus moves the changes over to the copy in the
kernel.
Another issue is the current conflict between fbdev and dri. Both device drivers
are trying to take overship of the graphics hardware. Right now fbdev owns the
hardware and DRI operates as a stealth module. For sysfs/udev to work DRI has to
have a PCI ID table and own the hardware. Doing this prevents fbdev and DRI from
simultaneously being loaded.
This conflict has not been resolved. We did a previous version of DRM which
registered with the kernel as owning the hardware and got a lot of vocal
complaints from fbdev developers. DRM was backed off into steath mode again.
Stealth mode looks like this. It never calls pci_register_driver so the kernel
never knows that DRM has attached to the device.
static int __init drm_init( void )
{
struct pci_dev *pdev = NULL;
DRM(parse_options)( drm_opts );
DRM(mem_init)();
while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
DRM(probe)(pdev);
}
return 0;
}
My personal opinion on this is that it is insane for two device drivers to be
trying to share the same same piece of hardware - it's multitasking for device
drivers. I also don't think udev/sysfs are set up to deal with two device
drivers claiming the same piece of hardware.
==Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (7 preceding siblings ...)
2003-12-27 20:57 ` Jon Smirl
@ 2003-12-28 1:23 ` Marco d'Itri
2003-12-28 1:23 ` Marco d'Itri
2003-12-30 0:36 ` Greg KH
10 siblings, 0 replies; 12+ messages in thread
From: Marco d'Itri @ 2003-12-28 1:23 UTC (permalink / raw)
To: linux-hotplug
On Dec 27, Jon Smirl <jonsmirl@yahoo.com> wrote:
>My personal opinion on this is that it is insane for two device drivers to be
>trying to share the same same piece of hardware - it's multitasking for device
>drivers. I also don't think udev/sysfs are set up to deal with two device
>drivers claiming the same piece of hardware.
I fully agree. This also has the downside that hotplug cannot
automatically load the DRM modules.
(And probably many more people need DRM than they need fbdev...)
--
ciao, |
Marco | [3810 esbuHOWw6GXX6]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (8 preceding siblings ...)
2003-12-28 1:23 ` Marco d'Itri
@ 2003-12-28 1:23 ` Marco d'Itri
2003-12-30 0:36 ` Greg KH
10 siblings, 0 replies; 12+ messages in thread
From: Marco d'Itri @ 2003-12-28 1:23 UTC (permalink / raw)
To: linux-hotplug
On Dec 27, Jon Smirl <jonsmirl@yahoo.com> wrote:
>My personal opinion on this is that it is insane for two device drivers to be
>trying to share the same same piece of hardware - it's multitasking for device
>drivers. I also don't think udev/sysfs are set up to deal with two device
>drivers claiming the same piece of hardware.
I fully agree. This also has the downside that hotplug cannot
automatically load the DRM modules.
(And probably many more people need DRM than they need fbdev...)
--
ciao, |
Marco | [3810 esbuHOWw6GXX6]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
* Re: dri and udev
2003-12-27 7:24 dri and udev Jon Smirl
` (9 preceding siblings ...)
2003-12-28 1:23 ` Marco d'Itri
@ 2003-12-30 0:36 ` Greg KH
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-12-30 0:36 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 27, 2003 at 12:57:38PM -0800, Jon Smirl wrote:
>
> while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
If you _have_ to do this, please use pci_get_device() instead. It's
much safer to use.
> My personal opinion on this is that it is insane for two device drivers to be
> trying to share the same same piece of hardware - it's multitasking for device
> drivers. I also don't think udev/sysfs are set up to deal with two device
> drivers claiming the same piece of hardware.
The driver model is not set up to do that. And it is correct, you
should claim the device, like the fbdev people do. If users want one or
the other, that's fine. Bad things might happen if two drivers talk to
the same hardware at the same time.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 12+ messages in thread
end of thread, other threads:[~2003-12-30 0:36 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-27 7:24 dri and udev Jon Smirl
2003-12-27 16:36 ` Kay Sievers
2003-12-27 17:08 ` Jon Smirl
2003-12-27 19:13 ` Greg KH
2003-12-27 19:13 ` Greg KH
2003-12-27 19:13 ` Greg KH
2003-12-27 19:14 ` Greg KH
2003-12-27 20:57 ` Jon Smirl
2003-12-27 20:57 ` Jon Smirl
2003-12-28 1:23 ` Marco d'Itri
2003-12-28 1:23 ` Marco d'Itri
2003-12-30 0:36 ` 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).