xserver: Branch 'master' - 2 commits

Aaron Plattner aplattner at nvidia.com
Wed Oct 15 21:19:53 PDT 2008


On Wed, Oct 15, 2008 at 04:38:03PM -0300, Tiago Vignatti wrote:
> Hi Aaron,
>
> Please, I don't want to be rude or something here but how can we argument 
> that these functions above are _used_ by the sample server if none of its 
> open drivers use it? This is questionable.

Hi Tiago,

The fact that the NVIDIA driver uses these functions is pretty much
irrelevant here: the functions are a useful part of the input/general
handler API.  Removing useful API entry points just because no driver
happens to use them *today* is a bad idea because it prevents modules that
would like to use them in the future from working with current servers.

As for the NVIDIA driver, you can use nm -D on it to see which symbols it's
linked against.  Also, I have a list of the strings we pass to LoaderSymbol
at http://people.freedesktop.org/~aplattner/loadersymbol
It was a bit out of date, so I updated it.

-- Aaron

> Aaron Plattner escreveu:
>>  hw/xfree86/common/xf86.h       |    4 +
>>  hw/xfree86/common/xf86Events.c |   84 
>> +++++++++++++++++++++++++++--------------
>>  hw/xfree86/loader/xf86sym.c    |    2  3 files changed, 62 insertions(+), 
>> 28 deletions(-)
>> New commits:
>> commit 3fc4f40b6c6cb416c9dc4bdb35c91b4f32c03ccc
>> Author: Aaron Plattner <aplattner at nvidia.com>
>> Date:   Sun Oct 12 16:08:26 2008 -0700
>>     Restore xf86{Enable, Disable}GeneralHandler.
>>         These were useful as part of the generic handler ABI, and are used 
>> by the NVIDIA
>>     driver.
>>         This reverts part of commit 
>> 50081d2dfb79878cb931a15c265f0d60698dfd39.
>> diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
>> index 84ea633..fbbfc73 100644
>> --- a/hw/xfree86/common/xf86.h
>> +++ b/hw/xfree86/common/xf86.h
>> @@ -195,6 +195,8 @@ void xf86DisableInputHandler(pointer handler);
>>  void xf86EnableInputHandler(pointer handler);
>>  pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer 
>> data);
>>  int xf86RemoveGeneralHandler(pointer handler);
>> +void xf86DisableGeneralHandler(pointer handler);
>> +void xf86EnableGeneralHandler(pointer handler);
>>  void xf86InterceptSignals(int *signo);
>>  void xf86InterceptSigIll(void (*sigillhandler)(void));
>>  Bool xf86EnableVTSwitch(Bool new);
>> diff --git a/hw/xfree86/common/xf86Events.c 
>> b/hw/xfree86/common/xf86Events.c
>> index e91b332..babe45b 100644
>> --- a/hw/xfree86/common/xf86Events.c
>> +++ b/hw/xfree86/common/xf86Events.c
>> @@ -743,6 +743,20 @@ xf86DisableInputHandler(pointer handler)
>>  }
>>   _X_EXPORT void
>> +xf86DisableGeneralHandler(pointer handler)
>> +{
>> +    IHPtr ih;
>> +
>> +    if (!handler)
>> +	return;
>> +
>> +    ih = handler;
>> +    ih->enabled = FALSE;
>> +    if (ih->fd >= 0)
>> +	RemoveGeneralSocket(ih->fd);
>> +}
>> +
>> +_X_EXPORT void
>>  xf86EnableInputHandler(pointer handler)
>>  {
>>      IHPtr ih;
>> @@ -756,6 +770,20 @@ xf86EnableInputHandler(pointer handler)
>>  	AddEnabledDevice(ih->fd);
>>  }
>>  +_X_EXPORT void
>> +xf86EnableGeneralHandler(pointer handler)
>> +{
>> +    IHPtr ih;
>> +
>> +    if (!handler)
>> +	return;
>> +
>> +    ih = handler;
>> +    ih->enabled = TRUE;
>> +    if (ih->fd >= 0)
>> +	AddGeneralSocket(ih->fd);
>> +}
>> +
>>  /*
>>   * As used currently by the DRI, the return value is ignored.
>>   */
>> commit 2217d22a76cdb2460f9683a6bf74c7248612889d
>> Author: Aaron Plattner <aplattner at nvidia.com>
>> Date:   Sun Oct 12 16:07:24 2008 -0700
>>     Revert "xfree86: xf86{Enable, Disable}InputHandler can be static."
>>         These were potentially useful as part of the input handler ABI, 
>> even if nobody
>>     currently uses them.
>>         This reverts commit 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca.
>> diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
>> index 0956f9c..84ea633 100644
>> --- a/hw/xfree86/common/xf86.h
>> +++ b/hw/xfree86/common/xf86.h
>> @@ -191,6 +191,8 @@ xf86SetDGAModeProc xf86SetDGAMode;
>>  void SetTimeSinceLastInputEvent(void);
>>  pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data);
>>  int xf86RemoveInputHandler(pointer handler);
>> +void xf86DisableInputHandler(pointer handler);
>> +void xf86EnableInputHandler(pointer handler);
>>  pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer 
>> data);
>>  int xf86RemoveGeneralHandler(pointer handler);
>>  void xf86InterceptSignals(int *signo);
>> diff --git a/hw/xfree86/common/xf86Events.c 
>> b/hw/xfree86/common/xf86Events.c
>> index a2c206e..e91b332 100644
>> --- a/hw/xfree86/common/xf86Events.c
>> +++ b/hw/xfree86/common/xf86Events.c
>> @@ -462,34 +462,6 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
>>      }
>>  }
>>  -static void
>> -xf86EnableInputHandler(pointer handler)
>> -{
>> -    IHPtr ih;
>> -
>> -    if (!handler)
>> -	return;
>> -
>> -    ih = handler;
>> -    ih->enabled = TRUE;
>> -    if (ih->fd >= 0)
>> -	AddEnabledDevice(ih->fd);
>> -}
>> -
>> -static void
>> -xf86DisableInputHandler(pointer handler)
>> -{
>> -    IHPtr ih;
>> -
>> -    if (!handler)
>> -	return;
>> -
>> -    ih = handler;
>> -    ih->enabled = FALSE;
>> -    if (ih->fd >= 0)
>> -	RemoveEnabledDevice(ih->fd);
>> -}
>> -
>>  /*
>>   * xf86VTSwitch --
>>   *      Handle requests for switching the vt.
>> @@ -756,6 +728,34 @@ xf86RemoveGeneralHandler(pointer handler)
>>      return fd;
>>  }
>>  +_X_EXPORT void
>> +xf86DisableInputHandler(pointer handler)
>> +{
>> +    IHPtr ih;
>> +
>> +    if (!handler)
>> +	return;
>> +
>> +    ih = handler;
>> +    ih->enabled = FALSE;
>> +    if (ih->fd >= 0)
>> +	RemoveEnabledDevice(ih->fd);
>> +}
>> +
>> +_X_EXPORT void
>> +xf86EnableInputHandler(pointer handler)
>> +{
>> +    IHPtr ih;
>> +
>> +    if (!handler)
>> +	return;
>> +
>> +    ih = handler;
>> +    ih->enabled = TRUE;
>> +    if (ih->fd >= 0)
>> +	AddEnabledDevice(ih->fd);
>> +}
>> +
>>  /*
>>   * As used currently by the DRI, the return value is ignored.
>>   */
>> diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
>> index d0e8558..4891be2 100644
>> --- a/hw/xfree86/loader/xf86sym.c
>> +++ b/hw/xfree86/loader/xf86sym.c
>> @@ -375,6 +375,8 @@ _X_HIDDEN void *xfree86LookupTab[] = {
>>      SYMFUNC(SetTimeSinceLastInputEvent)
>>      SYMFUNC(xf86AddInputHandler)
>>      SYMFUNC(xf86RemoveInputHandler)
>> +    SYMFUNC(xf86DisableInputHandler)
>> +    SYMFUNC(xf86EnableInputHandler)
>>      SYMFUNC(xf86AddEnabledDevice)
>>      SYMFUNC(xf86RemoveEnabledDevice)
>>      SYMFUNC(xf86InterceptSignals)
>
>
> -- 
> Tiago Vignatti
> C3SL - Centro de Computação Científica e Software Livre
> www.c3sl.ufpr.br



More information about the xorg mailing list