2003-11-14 17:48:57 +01:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
typedef struct sbus_prom_node {
|
2012-03-21 20:55:09 +01:00
|
|
|
int node;
|
2003-11-14 17:48:57 +01:00
|
|
|
/* Because of misdesigned openpromio */
|
2012-03-21 20:55:09 +01:00
|
|
|
int cookie[2];
|
2003-11-14 17:48:57 +01:00
|
|
|
} sbusPromNode, *sbusPromNodePtr;
|
|
|
|
|
|
|
|
typedef struct sbus_device {
|
2012-03-21 20:55:09 +01:00
|
|
|
int devId;
|
|
|
|
int fbNum;
|
|
|
|
int fd;
|
|
|
|
int width, height;
|
|
|
|
sbusPromNode node;
|
|
|
|
char *descr;
|
|
|
|
char *device;
|
2003-11-14 17:48:57 +01:00
|
|
|
} sbusDevice, *sbusDevicePtr;
|
|
|
|
|
2008-12-09 01:11:50 +01:00
|
|
|
struct sbus_devtable {
|
2003-11-14 17:48:57 +01:00
|
|
|
int devId;
|
|
|
|
int fbType;
|
|
|
|
char *promName;
|
2008-10-26 00:19:34 +02:00
|
|
|
char *driverName;
|
2003-11-14 17:48:57 +01:00
|
|
|
char *descr;
|
2008-12-09 01:11:50 +01:00
|
|
|
};
|
2003-11-14 17:48:57 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void xf86SbusProbe(void);
|
|
|
|
extern _X_EXPORT sbusDevicePtr *xf86SbusInfo;
|
2008-12-09 01:11:50 +01:00
|
|
|
extern _X_EXPORT struct sbus_devtable sbusDeviceTable[];
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName,
|
|
|
|
int sbusDevId, GDevPtr * devList,
|
|
|
|
int numDevs, DriverPtr drvp,
|
|
|
|
int **foundEntities);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex);
|
|
|
|
extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp);
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn,
|
|
|
|
sbusDevicePtr psdp);
|
|
|
|
extern _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp,
|
|
|
|
unsigned long offset,
|
|
|
|
unsigned long size);
|
|
|
|
extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr,
|
|
|
|
unsigned long size);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp);
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg,
|
|
|
|
int fg);
|
|
|
|
extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen,
|
|
|
|
sbusDevicePtr psdp);
|
2003-11-14 17:48:57 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int promRootNode;
|
2003-11-14 17:48:57 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int promGetSibling(int node);
|
|
|
|
extern _X_EXPORT int promGetChild(int node);
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT char *promGetProperty(const char *prop, int *lenp);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int promGetBool(const char *prop);
|
2003-11-14 17:48:57 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int sparcPromInit(void);
|
|
|
|
extern _X_EXPORT void sparcPromClose(void);
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT char *sparcPromGetProperty(sbusPromNodePtr pnode,
|
|
|
|
const char *prop, int *lenp);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop);
|
|
|
|
extern _X_EXPORT void sparcPromAssignNodes(void);
|
2012-03-21 20:55:09 +01:00
|
|
|
extern _X_EXPORT char *sparcPromNode2Pathname(sbusPromNodePtr pnode);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT int sparcPromPathname2Node(const char *pathName);
|
|
|
|
extern _X_EXPORT char *sparcDriverName(void);
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2010-09-10 18:16:30 +02:00
|
|
|
extern Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus);
|
|
|
|
extern void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus,
|
2012-03-21 20:55:09 +01:00
|
|
|
GDevRec * GDev);
|
2010-09-10 18:16:30 +02:00
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
#endif /* _XF86_SBUSBUS_H */
|