Ejemplo n.º 1
0
/*-------------------------------------------------------------------------
 * NscSetup.
 *
 * Description	:This function sets up the driver in X list and load the
 *               module symbols through xf86loader routines..
 *
 * Parameters.
 *    Module	:Pointer to the geode  module
 *    options	:Driver module options.
 *    ErrorMajor:Major no
 *    ErrorMinor:Minor no.
 *
 * Returns		:NULL on success
 *
 * Comments     :Module setup is done by this function
 *
 *-------------------------------------------------------------------------
*/
static pointer
NscSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
{
   static Bool Initialised = FALSE;

   if (!Initialised) {
      Initialised = TRUE;
      xf86AddDriver(&NSC, Module, 0);
      /* Tell the loader about symbols from other modules that this
       * module might refer to.
       */
      LoaderRefSymLists(nscVgahwSymbols, nscVbeSymbols,
#if CFB
			nscCfbSymbols,
#else
			nscFbSymbols,
#endif
			nscXaaSymbols,
			nscInt10Symbols, nscRamdacSymbols, nscShadowSymbols,
			NULL);
      return (pointer) TRUE;
   }
   /*The return value must be non-NULL on success */
   if (ErrorMajor)
      *ErrorMajor = LDR_ONCEONLY;
   return NULL;
}
Ejemplo n.º 2
0
static pointer voodooSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
  static int setupDone = FALSE;
  if(errmaj)
      *errmaj = LDR_ONCEONLY;
  if(setupDone == FALSE)
  {
    setupDone = TRUE;
    xf86AddDriver(&VOODOO, module, 0);
    return (pointer)1;    
  }
  return NULL;
}
Ejemplo n.º 3
0
static pointer
cirSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
	static Bool setupDone = FALSE;

	/* This module should be loaded only once, but check to be sure. */

	if (!setupDone) {
		setupDone = TRUE;
		xf86AddDriver(&CIRRUS, module, 0);

		LoaderRefSymLists(alpSymbols, lgSymbols, vbeSymbols, NULL);
		return (pointer)1;
	}
	if (errmaj) *errmaj = LDR_ONCEONLY;
	return NULL;
}
Ejemplo n.º 4
0
static pointer
NestedSetup(pointer module, pointer opts, int *errmaj, int *errmin) {
    static Bool setupDone = FALSE;

    if (!setupDone) {
        setupDone = TRUE;
        
        xf86AddDriver(&NESTED, module, HaveDriverFuncs);
        xf86AddInputDriver(&NESTEDINPUT, module, 0);
        
        return (pointer)1;
    } else {
        if (errmaj)
            *errmaj = LDR_ONCEONLY;
        
        return NULL;
    }
}
Ejemplo n.º 5
0
static pointer
vmwareSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
    static Bool setupDone = FALSE;

    if (!setupDone) {
        setupDone = TRUE;

        xf86AddDriver(&vmware, module, VMWARE_DRIVER_FUNC);

        VMWARERefSymLists();

        return (pointer)1;
    }
    if (errmaj) {
        *errmaj = LDR_ONCEONLY;
    }
    return NULL;
}
/*
 * ATISetup --
 *
 * This function is called every time the module is loaded.
 */
static pointer
ATISetup
(
    pointer Module,
    pointer Options,
    int     *ErrorMajor,
    int     *ErrorMinor
)
{
    static Bool Inited = FALSE;

    if (!Inited)
    {
        Inited = TRUE;
        xf86AddDriver(&MACH64, Module, HaveDriverFuncs);
    }

    return (pointer)TRUE;
}
static pointer
GeodeSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
{
    static Bool init = FALSE;
    int flag = 0;

#ifdef XSERVER_LIBPCIACCESS
    flag = HaveDriverFuncs;
#endif
    if (init) {
        *ErrorMajor = LDR_ONCEONLY;
        return (pointer) NULL;
    }

    init = TRUE;
    xf86AddDriver(&GEODE, Module, flag);

    return (pointer) TRUE;
}
Ejemplo n.º 8
0
static pointer
dummySetup(ModuleDescPtr module, pointer opts, int *errmaj, int *errmin)
{
    static Bool setupDone = FALSE;

    if (!setupDone) {
	setupDone = TRUE;
        xf86AddDriver(&DUMMY, module, 0);

	xf86LoaderModRefSymLists(module, fbSymbols, NULL);
	/*
	 * The return value must be non-NULL on success even though there
	 * is no TearDownProc.
	 */
	return (pointer)1;
    } else {
	if (errmaj) *errmaj = LDR_ONCEONLY;
	return NULL;
    }
}
Ejemplo n.º 9
0
static pointer
Setup(pointer module, pointer opts, int *errmaj, int *errmin)
{
    static Bool setupDone = 0;

    /* This module should be loaded only once, but check to be sure.
     */
    if (!setupDone) {
	setupDone = 1;
	xf86AddDriver(&modesetting, module, HaveDriverFuncs);

	/*
	 * The return value must be non-NULL on success even though there
	 * is no TearDownProc.
	 */
	return (pointer) 1;
    } else {
	if (errmaj)
	    *errmaj = LDR_ONCEONLY;
	return NULL;
    }
}
static pointer
AmdSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
{
    static Bool Initialised = FALSE;

    if (!Initialised) {
        Initialised = TRUE;
        xf86AddDriver(&AMD, Module,
#ifdef XSERVER_LIBPCIACCESS
                      HaveDriverFuncs
#else
                      0
#endif
            );

        return (pointer) TRUE;
    }

    /*The return value must be non-NULL on success */
    if (ErrorMajor)
        *ErrorMajor = LDR_ONCEONLY;
    return NULL;
}
Ejemplo n.º 11
0
static pointer
bw2Setup(ModuleDescPtr module, pointer opts, int *errmaj, int *errmin)
{
    static Bool setupDone = FALSE;

    if (!setupDone) {
	setupDone = TRUE;
	xf86AddDriver(&SUNBW2, module, 0);

	/*
	 * Modules that this driver always requires can be loaded here
	 * by calling LoadSubModule().
	 */

	/*
	 * The return value must be non-NULL on success even though there
	 * is no TearDownProc.
	 */
	return (pointer)TRUE;
    } else {
	if (errmaj) *errmaj = LDR_ONCEONLY;
	return NULL;
    }
}