[PATCH 18/37] Move XFree86-VidMode from extmod to built-in

Jamey Sharp jamey at minilop.net
Thu Jun 30 13:31:26 PDT 2011


I think the extmod/modinit.c changes mostly belong in different patches
than this one:

The removal of DGA from extmod belongs in the previous patch, where you
moved DGA to built-in.

As for extmodSetup, would it make sense to delete the option-parsing in
the earlier patch that introduced xf86ExtensionInit? That patch added
appropriate calls to EnableDisableExtension corresponding to this
file's calls to LoadExtension, so even if you unconditionally call
LoadExtension in extmodSetup you should still get the right extensions
initialized. When I tried to review that patch, I was confused because I
expected to see the option parsing moved, not copied.

Finally, I think this patch should only delete the XF86VIDMODE entry
from the extensionModules array. Deleting the array itself and the loop
that calls LoadExtension on the array's elements makes more sense in the
next patch, which deletes extmod entirely.

Jamey

On Tue, Jun 28, 2011 at 08:27:34PM +0100, Daniel Stone wrote:
> diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
> index 673dcd4..2ce5e23 100644
> --- a/hw/xfree86/dixmods/extmod/modinit.c
> +++ b/hw/xfree86/dixmods/extmod/modinit.c
> @@ -34,37 +34,6 @@
>  
>  static MODULESETUPPROTO(extmodSetup);
>  
> -/*
> - * Array describing extensions to be initialized
> - */
> -static ExtensionModule extensionModules[] = {
> -#ifdef XF86VIDMODE
> -    {
> -	XFree86VidModeExtensionInit,
> -	XF86VIDMODENAME,
> -	&noXFree86VidModeExtension,
> -	NULL,
> -	NULL
> -    },
> -#endif
> -#ifdef XFreeXDGA
> -    {
> -	XFree86DGAExtensionInit,
> -	XF86DGANAME,
> -	&noXFree86DGAExtension,
> -	XFree86DGARegister,
> -	NULL
> -    },
> -#endif
> -    {				/* DON'T delete this entry ! */
> -	NULL,
> -	NULL,
> -	NULL,
> -	NULL,
> -	NULL
> -    }
> -};
> -
>  static XF86ModuleVersionInfo VersRec =
>  {
>  	"extmod",
> @@ -87,26 +56,6 @@ _X_EXPORT XF86ModuleData extmodModuleData = { &VersRec, extmodSetup, NULL };
>  static pointer
>  extmodSetup(pointer module, pointer opts, int *errmaj, int *errmin)
>  {
> -    int i;
> -
> -    /* XXX the option stuff here is largely a sample/test case */
> -
> -    for (i = 0; extensionModules[i].name != NULL; i++) {
> -	if (opts) {
> -	    char *s;
> -	    if (asprintf(&s, "omit%s", extensionModules[i].name) != -1) {
> -		pointer o;
> -		o = xf86FindOption(opts, s);
> -		free(s);
> -		if (o) {
> -		    xf86MarkOptionUsed(o);
> -		    continue;
> -		}
> -	    }
> -	}
> -
> -	LoadExtension(&extensionModules[i], FALSE);
> -    }
>      /* Need a non-NULL return */
>      return (pointer)1;
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110630/57e0b067/attachment.pgp>


More information about the xorg-devel mailing list