45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copy of this software and associated documentation files (the "Software"),
45e9809aff7304721fddb95654901b32195c9c7avboxsync * to deal in the Software without restriction, including without limitation
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * and/or sell copies of the Software, and to permit persons to whom the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Software is furnished to do so, subject to the following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * The above copyright notice and this permission notice shall be included in
45e9809aff7304721fddb95654901b32195c9c7avboxsync * all copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Except as contained in this notice, the name of Conectiva Linux shall
45e9809aff7304721fddb95654901b32195c9c7avboxsync * not be used in advertising or otherwise to promote the sale, use or other
45e9809aff7304721fddb95654901b32195c9c7avboxsync * dealings in this Software without prior written authorization from
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Conectiva Linux.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <stdio.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <stdlib.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <string.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <ctype.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xfuncproto.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xmd.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Intrinsic.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xmu/SysUtil.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _xf86cfg_cards_h
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _xf86cfg_cards_h
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef USE_MODULES
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef CARDS_PRIVATE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "loader.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xf86PciStr.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xf86PciIds.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* CARDS_PRIVATE */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* USE_MODULES */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Flags in CardsEntry */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define F_NOCLOCKPROBE 0x1 /* Never probe clocks of the card. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define F_UNSUPPORTED 0x2 /* Card is not supported (only VGA). */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Types
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *name; /* Name of the card. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *chipset; /* Chipset (decriptive). */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *server; /* Server identifier. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *driver; /* Driver identifier. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *ramdac; /* Ramdac identifier. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *clockchip; /* Clockchip identifier. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *dacspeed; /* DAC speed rating. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int flags;
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *lines; /* Additional Device section lines. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *see; /* Must resolve in a last step.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Allow more than one SEE entry? */
45e9809aff7304721fddb95654901b32195c9c7avboxsync} CardsEntry;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern CardsEntry **CardsDB;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int NumCardsEntry;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Prototypes
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncvoid ReadCardsDatabase(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCardsEntry *LookupCard(char*);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncchar **GetCardNames(int*);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncchar **FilterCardNames(char*, int*);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef USE_MODULES
45e9809aff7304721fddb95654901b32195c9c7avboxsyncvoid InitializePciInfo(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _xf86cfgModuleOptions *xf86cfgModuleOptionsPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncvoid CheckChipsets(xf86cfgModuleOptionsPtr, int*);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _xf86cfg_cards_h */