[RFC] X Input Driver specification

Magnus Vigerlöf Magnus.Vigerlof at home.se
Wed Apr 11 14:54:36 PDT 2007


On Wednesday 11 April 2007 01:29, Peter Hutterer wrote:
> On 05/04/2007, at 06:07 , Magnus Vigerlöf wrote:
> > As there doesn't seem to be a specification (or at least an up-to-
> > date one) on
> > what the different initialization stages for an Input Device should
> > do I've
> > continued on the one on the wiki [1]. My changes are around the
> > calls made
> > for set up/removal of the input device, from both the device driver
> > and
> > xserver point-of-view.
> >
> > [1] http://xorg.freedesktop.org/wiki/XOrgInputDriverSpec
>
> Thanks. This email was a very interesting read. We should have more
> of this general overview emails and wikipages.

That's good to hear. Should I update the wiki with this info? I.e. do you 
think the content and layout is good enough, or could it be presented in a 
better way?

> > - Server side
> > if function returns a pointer to an InputInfoRec but haven't set
> > XI86_CONFIGURED, UnInit is called if defined. If not,
> > xf86DeleteInput is
> > called to make some kind of cleanup. For devices that should be
> > hotpluggable
> > the UnInit function is required if there shouldn't be any resource
> > leaks.
>
> this causes some grief with the current evdev driver, which does its
> own hotplugging. yay.

Yeah, I've seen that too.. Eventually I think that should go into a program 
outside the X-server, so the evdev-driver doesn't steal the device if another 
driver should run the input device (does it? I can't say I understand the 
code...)

[...]
> > - Server side
> > If the function is not defined, xf86DeleteInput will be called
> > instead. But
> > that will most likely result in a memory leak as no device-private
> > structures
> > will be deallocated.
>
> If the function is not defined and results in a memory leak, find the
> driver developer and keep shouting at him/her until it is defined.
> Preferably from a close distance and with the aid of a blunt instrument.

Since I suspect UnInit has never been called by the Xserver, ever, that would 
apply to all input driver maintainers... Let's start with saying that there's 
no input driver that supports hot-plugging (ok, all manages plugging but what 
about unplugging?) and then take them as they are requested/...

I know I need to do some major changes for the wacom driver if there shouldn't 
be any resource leaks for the whole cycle of the input device. But that's my 
problem... :) But having a page which describes what Xorg expects the driver 
to do at the specific stages would be a nice help.

Thanks
  Magnus V



More information about the xorg mailing list