DuplicateModule [Was: PATCH Check module version each time it is loaded]

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 17 02:20:05 PDT 2011


On Mon, Oct 17, 2011 at 08:35:44AM +0200, Michal Suchanek wrote:
> On 14 October 2011 01:35, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> > On Mon, Oct 10, 2011 at 10:10:23AM +0200, Michal Suchanek wrote:
> 
> > so what's the behaviour now if you remove all devices? does it reload from
> > the disk or reload the original module?
> 
> It is never reloaded according to the log.
> 
> As I understand it whenever a pointing device is plugged the X server
> determines the name of the driver it needs. If driver of that name is
> not loaded it loads one and saves it in a list of drivers, then takes
> the driver from the list and duplicates it.

hmm. ideally the behaviour is that the module is loaded once and then
duplicate for each device until all devices of that module are unloaded.
Then it should re-load the driver from disk.
this would pretty much only work with wacom anyway since a few evdev devices
are persistent and most synaptics devices are built-in but still.

> >> From 15e191dd91e09549ea2f96495f9f89ea0fd959ec Mon Sep 17 00:00:00 2001
> >> From: Michal Suchanek <hramrach at centrum.cz>
> >> Date: Sat, 8 Oct 2011 14:12:59 +0200
> >> Subject: [PATCH 2/5] Document DuplicateModule function.
> >>
> >> ---
> >>  hw/xfree86/doc/ddxDesign.xml |   12 ++++++++++++
> >>  1 files changed, 12 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
> >> index a4baad5..6afdc56 100644
> >> --- a/hw/xfree86/doc/ddxDesign.xml
> >> +++ b/hw/xfree86/doc/ddxDesign.xml
> >> @@ -5495,6 +5495,18 @@ typedef struct {
> >>
> >>        <blockquote><para>
> >>         <programlisting>
> >> +    pointer DuplicateModule(pointer mod);
> >
> > this prototype doesn't match the one in the code.
> 
> Indeed, it should be pointer DuplicateModule(pointer mod, pointer parent);
> 
> >
> 
> > I'd like to see the documentation in the code as well, that's the place
> > where people are more likely to encounter it.
> 
> I am not quite sure about this doc. The function is in the
> loaderProcs.h which is described as the header for functions exported
> to modules for their use. However, unlike the other outward facing
> functions it uses ModuleDescPtr, not just pointer. Is that really
> meant to be used outside the X server?

our API is a bit random, presumably by us having everything in one tree
until not too long ago. so real API separation wasn't really a concern.
I don't think that this API is used anywhere outside the DDX.

Cheers,
  Peter


More information about the xorg-devel mailing list