|
|
|
|
File: [XFree86 CVS] / xc / programs / Xserver / hw / xfree86 / common / xf86sbusBus.h
(download)
Revision: 3.10, Thu Mar 15 01:11:36 2007 UTC (6 years, 2 months ago) by tsi Branch: MAIN CVS Tags: xf-4_8_0-bindist, xf-4_8_0, xf-4_8-branch, xf-4_7_99_9, xf-4_7_99_8, xf-4_7_99_7, xf-4_7_99_6, xf-4_7_99_5, xf-4_7_99_4, xf-4_7_99_31, xf-4_7_99_30, xf-4_7_99_3, xf-4_7_99_29, xf-4_7_99_28, xf-4_7_99_27, xf-4_7_99_26, xf-4_7_99_25, xf-4_7_99_24, xf-4_7_99_23, xf-4_7_99_22, xf-4_7_99_21, xf-4_7_99_20, xf-4_7_99_2, xf-4_7_99_19, xf-4_7_99_18, xf-4_7_99_17, xf-4_7_99_16, xf-4_7_99_15, xf-4_7_99_14, xf-4_7_99_13, xf-4_7_99_12, xf-4_7_99_11, xf-4_7_99_10, xf-4_7_99_1, xf-4_7_0, xf-4_7-branch, xf-4_6_99_29, xf-4_6_99_28, xf-4_6_99_27, xf-4_6_99_26, xf-4_6_99_25, xf-4_6_99_24, xf-4_6_99_23, xf-4_6_99_22, xf-4_6_99_21, xf-4_6_99_20, HEAD Changes since 3.9: +11 -1 lines 120. More changes derived from NetBSD/sparc:
- Enable openprom interface for NetBSD/sparc (Marc La France).
- Add a generic SaveScreen() implementation for SBUS adapters that don't
provide their own (Marc La France).
- Beef up generic cursor handling for SBUS adapters (Marc La France).
- Add a cleaned up version of Michael Lorenz's driver for SBUS Weitek
P9100 adapters.
|
/*
* SBUS bus-specific declarations
*
* Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86sbusBus.h,v 3.9tsi Exp $ */
#ifndef _XF86_SBUSBUS_H
#define _XF86_SBUSBUS_H
#include "xf86str.h"
#define SBUS_DEVICE_BW2 0x0001
#define SBUS_DEVICE_CG2 0x0002
#define SBUS_DEVICE_CG3 0x0003
#define SBUS_DEVICE_CG4 0x0004
#define SBUS_DEVICE_CG6 0x0005
#define SBUS_DEVICE_CG8 0x0006
#define SBUS_DEVICE_CG12 0x0007
#define SBUS_DEVICE_CG14 0x0008
#define SBUS_DEVICE_LEO 0x0009
#define SBUS_DEVICE_TCX 0x000a
#define SBUS_DEVICE_FFB 0x000b
#define SBUS_DEVICE_GT 0x000c
#define SBUS_DEVICE_MGX 0x000d
#define SBUS_DEVICE_P9100 0x000e
typedef struct sbus_prom_node {
int node;
/* Because of misdesigned openpromio */
int cookie[2];
} sbusPromNode, *sbusPromNodePtr;
typedef struct sbus_prom_parent {
sbusPromNode node;
struct sbus_prom_parent *parent;
} sbusPromParent, *sbusPromParentPtr;
typedef struct sbus_device {
int devId;
int fbNum;
int fd;
int width, height;
sbusPromNode node;
char *descr;
char *device;
sbusPromParentPtr parent;
void *OSprivate;
int mmapCount;
} sbusDevice, *sbusDevicePtr;
extern struct sbus_devtable {
int devId;
int fbType;
char *promName;
char *descr;
} sbusDeviceTable[];
void xf86SbusProbe(void);
extern sbusDevicePtr *xf86SbusInfo;
Bool xf86ParseSbusBusString(const char *busID, int *fbNum);
Bool xf86CompareSbusBusString(const char *busID, int fbNum);
Bool xf86CheckSbusSlot(int fbNum);
int xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp, GDevPtr dev,
Bool active);
int xf86MatchSbusInstances(const char *driverName, int sbusDevId,
GDevPtr *devList, int numDevs, DriverPtr drvp,
int **foundEntities);
sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex);
int xf86GetEntityForSbusInfo(sbusDevicePtr psdp);
void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp);
Bool xf86LocateSbusMemoryArea(sbusDevicePtr psdp,
char **devName, unsigned int *devOffset,
unsigned int *fbSize, unsigned int *fbOffset,
unsigned int *flags);
pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset,
unsigned long size);
void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size);
void xf86SbusHideOsHwCursor(sbusDevicePtr psdp);
void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg);
void xf86SbusSetOsHwCursorImage(sbusDevicePtr psdp, pointer image,
pointer mask);
void xf86SbusSetOsHwCursor(sbusDevicePtr psdp, Bool onoff);
void xf86SbusSetOsHwCursorPosition(sbusDevicePtr psdp, int x, int y);
void xf86SbusSetOsHwCursorHotSpot(sbusDevicePtr psdp, int hotx, int hoty);
Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp);
Bool xf86SbusSaveScreen(sbusDevicePtr, int mode);
extern int promRootNode;
int promGetSibling(int node);
int promGetChild(int node);
char * promGetProperty(const char *prop, int *lenp);
int promGetBool(const char *prop);
int sparcPromInit(void);
void sparcPromClose(void);
char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp);
int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop);
void sparcPromAssignNodes(void);
char * sparcPromNode2Pathname(sbusPromNodePtr pnode);
int sparcPromPathname2Node(const char *pathName);
#endif /* _XF86_SBUSBUS_H */
|
Powered by ViewCVS 0.9.2 |