linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CALLOUT for dri device
@ 2003-12-27 17:26 Jon Smirl
  2003-12-27 19:11 ` Greg KH
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jon Smirl @ 2003-12-27 17:26 UTC (permalink / raw)
  To: linux-hotplug

Can I make a CALLOUT for a class of devices, like all DRI devices? When the
driver is loaded I need to run a userspace program to reset the card (if
secondary), query the monitor EDID, etc. This has to be done in userspace since
reseting the card is a VM86 operation.

Will CALLOUT work for compiled in drivers? So as soon as the kernel is able my
userspace add will get executed.

==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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
  2003-12-27 19:11 ` Greg KH
@ 2003-12-27 19:11 ` Greg KH
  2003-12-27 19:11 ` Greg KH
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-27 19:11 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 09:26:50AM -0800, Jon Smirl wrote:
> Can I make a CALLOUT for a class of devices, like all DRI devices? When the
> driver is loaded I need to run a userspace program to reset the card (if
> secondary), query the monitor EDID, etc. This has to be done in userspace since
> reseting the card is a VM86 operation.

Don't use udev for this.  Use hotplug for things like this.  You can add
your dri specific scripts to /etc/hotplug.d/dri/ 

See the documentation in the /sbin/hotplug script on how to do 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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
  2003-12-27 19:11 ` Greg KH
  2003-12-27 19:11 ` Greg KH
@ 2003-12-27 19:11 ` Greg KH
  2003-12-27 19:11 ` Greg KH
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-27 19:11 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 09:26:50AM -0800, Jon Smirl wrote:
> Can I make a CALLOUT for a class of devices, like all DRI devices? When the
> driver is loaded I need to run a userspace program to reset the card (if
> secondary), query the monitor EDID, etc. This has to be done in userspace since
> reseting the card is a VM86 operation.

Don't use udev for this.  Use hotplug for things like this.  You can add
your dri specific scripts to /etc/hotplug.d/dri/ 

See the documentation in the /sbin/hotplug script on how to do 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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
                   ` (2 preceding siblings ...)
  2003-12-27 19:11 ` Greg KH
@ 2003-12-27 19:11 ` Greg KH
  2003-12-27 21:19 ` Jon Smirl
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-27 19:11 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 09:26:50AM -0800, Jon Smirl wrote:
> Can I make a CALLOUT for a class of devices, like all DRI devices? When the
> driver is loaded I need to run a userspace program to reset the card (if
> secondary), query the monitor EDID, etc. This has to be done in userspace since
> reseting the card is a VM86 operation.

Don't use udev for this.  Use hotplug for things like this.  You can add
your dri specific scripts to /etc/hotplug.d/dri/ 

See the documentation in the /sbin/hotplug script on how to do 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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
@ 2003-12-27 19:11 ` Greg KH
  2003-12-27 19:11 ` Greg KH
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-27 19:11 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 09:26:50AM -0800, Jon Smirl wrote:
> Can I make a CALLOUT for a class of devices, like all DRI devices? When the
> driver is loaded I need to run a userspace program to reset the card (if
> secondary), query the monitor EDID, etc. This has to be done in userspace since
> reseting the card is a VM86 operation.

Don't use udev for this.  Use hotplug for things like this.  You can add
your dri specific scripts to /etc/hotplug.d/dri/ 

See the documentation in the /sbin/hotplug script on how to do 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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
                   ` (3 preceding siblings ...)
  2003-12-27 19:11 ` Greg KH
@ 2003-12-27 21:19 ` Jon Smirl
  2003-12-27 21:28 ` Greg KH
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jon Smirl @ 2003-12-27 21:19 UTC (permalink / raw)
  To: linux-hotplug

That was easy, now it's calling my reset program. How do I tell if it is an
insert or remove event? My program gets called on both.

Does this work for built-in drivers? Will I get an insert event as soon as
userspace is running?

--- Greg KH <greg@kroah.com> wrote:
> On Sat, Dec 27, 2003 at 09:26:50AM -0800, Jon Smirl wrote:
> > Can I make a CALLOUT for a class of devices, like all DRI devices? When the
> > driver is loaded I need to run a userspace program to reset the card (if
> > secondary), query the monitor EDID, etc. This has to be done in userspace
> since
> > reseting the card is a VM86 operation.
> 
> Don't use udev for this.  Use hotplug for things like this.  You can add
> your dri specific scripts to /etc/hotplug.d/dri/ 
> 
> See the documentation in the /sbin/hotplug script on how to do this.
> 
> thanks,
> 
> greg k-h


==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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
                   ` (4 preceding siblings ...)
  2003-12-27 21:19 ` Jon Smirl
@ 2003-12-27 21:28 ` Greg KH
  2003-12-27 22:41 ` Jon Smirl
  2003-12-30  0:32 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-27 21:28 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 01:19:55PM -0800, Jon Smirl wrote:
> That was easy, now it's calling my reset program. How do I tell if it is an
> insert or remove event? My program gets called on both.

Look at the ACTION environment variable.

> Does this work for built-in drivers? 

yes.

> Will I get an insert event as soon as userspace is running?

no, the event happens when your device is registered.  There is
userspace running very early, look at the initramfs stuff.  So you will
probably have to put your application into the initramfs image.  People
are working on getting that all working properly.

Hope this helps,

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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
                   ` (5 preceding siblings ...)
  2003-12-27 21:28 ` Greg KH
@ 2003-12-27 22:41 ` Jon Smirl
  2003-12-30  0:32 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Jon Smirl @ 2003-12-27 22:41 UTC (permalink / raw)
  To: linux-hotplug

--- Greg KH <greg@kroah.com> wrote:
> > Will I get an insert event as soon as userspace is running?
> 
> no, the event happens when your device is registered.  There is

When do built-in drivers get registered?

> userspace running very early, look at the initramfs stuff.  So you will
> probably have to put your application into the initramfs image.  People
> are working on getting that all working properly.
> 
> Hope this helps,
> 
> greg k-h


==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] 9+ messages in thread

* Re: CALLOUT for dri device
  2003-12-27 17:26 CALLOUT for dri device Jon Smirl
                   ` (6 preceding siblings ...)
  2003-12-27 22:41 ` Jon Smirl
@ 2003-12-30  0:32 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-12-30  0:32 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Dec 27, 2003 at 02:41:04PM -0800, Jon Smirl wrote:
> --- Greg KH <greg@kroah.com> wrote:
> > > Will I get an insert event as soon as userspace is running?
> > 
> > no, the event happens when your device is registered.  There is
> 
> When do built-in drivers get registered?

Whenever they happen to get initialized in the startup sequence.  This
is usually determined by the link order in the module_init() timeframe.

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] 9+ messages in thread

end of thread, other threads:[~2003-12-30  0:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-27 17:26 CALLOUT for dri device Jon Smirl
2003-12-27 19:11 ` Greg KH
2003-12-27 19:11 ` Greg KH
2003-12-27 19:11 ` Greg KH
2003-12-27 19:11 ` Greg KH
2003-12-27 21:19 ` Jon Smirl
2003-12-27 21:28 ` Greg KH
2003-12-27 22:41 ` Jon Smirl
2003-12-30  0:32 ` 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).