105b261ecSmrg#ifdef HAVE_XORG_CONFIG_H
205b261ecSmrg#include <xorg-config.h>
305b261ecSmrg#endif
405b261ecSmrg
505b261ecSmrg#include "xf86.h"
605b261ecSmrg#include "xf86cmap.h"
705b261ecSmrg#include "fbdevhw.h"
805b261ecSmrg
905b261ecSmrg/* Stubs for the static server on platforms that don't support fbdev */
1005b261ecSmrg
1105b261ecSmrgBool
1205b261ecSmrgfbdevHWGetRec(ScrnInfoPtr pScrn)
1305b261ecSmrg{
1435c4bbdfSmrg    return FALSE;
1505b261ecSmrg}
1605b261ecSmrg
1705b261ecSmrgvoid
1805b261ecSmrgfbdevHWFreeRec(ScrnInfoPtr pScrn)
1905b261ecSmrg{
2005b261ecSmrg}
2105b261ecSmrg
2205b261ecSmrgBool
234642e01fSmrgfbdevHWProbe(struct pci_device *pPci, char *device, char **namep)
2405b261ecSmrg{
2535c4bbdfSmrg    return FALSE;
2605b261ecSmrg}
2705b261ecSmrg
2805b261ecSmrgBool
294642e01fSmrgfbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device)
3005b261ecSmrg{
3135c4bbdfSmrg    xf86Msg(X_ERROR, "fbdevhw is not available on this platform\n");
3235c4bbdfSmrg    return FALSE;
3305b261ecSmrg}
3405b261ecSmrg
3535c4bbdfSmrgchar *
3605b261ecSmrgfbdevHWGetName(ScrnInfoPtr pScrn)
3705b261ecSmrg{
3835c4bbdfSmrg    return NULL;
3905b261ecSmrg}
4005b261ecSmrg
4105b261ecSmrgint
4205b261ecSmrgfbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp)
4305b261ecSmrg{
4435c4bbdfSmrg    return -1;
4505b261ecSmrg}
4605b261ecSmrg
4705b261ecSmrgint
4805b261ecSmrgfbdevHWGetLineLength(ScrnInfoPtr pScrn)
4905b261ecSmrg{
5035c4bbdfSmrg    return -1;                  /* Should cause something spectacular... */
5105b261ecSmrg}
5205b261ecSmrg
5305b261ecSmrgint
5405b261ecSmrgfbdevHWGetType(ScrnInfoPtr pScrn)
5505b261ecSmrg{
5635c4bbdfSmrg    return -1;
5705b261ecSmrg}
5805b261ecSmrg
5905b261ecSmrgint
6005b261ecSmrgfbdevHWGetVidmem(ScrnInfoPtr pScrn)
6105b261ecSmrg{
6235c4bbdfSmrg    return -1;
6305b261ecSmrg}
6405b261ecSmrg
6505b261ecSmrgvoid
6605b261ecSmrgfbdevHWSetVideoModes(ScrnInfoPtr pScrn)
6705b261ecSmrg{
6805b261ecSmrg}
6905b261ecSmrg
7005b261ecSmrgDisplayModePtr
7105b261ecSmrgfbdevHWGetBuildinMode(ScrnInfoPtr pScrn)
7205b261ecSmrg{
7335c4bbdfSmrg    return NULL;
7405b261ecSmrg}
7505b261ecSmrg
7605b261ecSmrgvoid
7705b261ecSmrgfbdevHWUseBuildinMode(ScrnInfoPtr pScrn)
7805b261ecSmrg{
7905b261ecSmrg}
8005b261ecSmrg
8135c4bbdfSmrgvoid *
8205b261ecSmrgfbdevHWMapVidmem(ScrnInfoPtr pScrn)
8305b261ecSmrg{
8435c4bbdfSmrg    return NULL;
8505b261ecSmrg}
8605b261ecSmrg
8705b261ecSmrgint
8805b261ecSmrgfbdevHWLinearOffset(ScrnInfoPtr pScrn)
8905b261ecSmrg{
9035c4bbdfSmrg    return 0;
9105b261ecSmrg}
9205b261ecSmrg
9305b261ecSmrgBool
9405b261ecSmrgfbdevHWUnmapVidmem(ScrnInfoPtr pScrn)
9505b261ecSmrg{
9635c4bbdfSmrg    return FALSE;
9705b261ecSmrg}
9805b261ecSmrg
9935c4bbdfSmrgvoid *
10005b261ecSmrgfbdevHWMapMMIO(ScrnInfoPtr pScrn)
10105b261ecSmrg{
10235c4bbdfSmrg    return NULL;
10305b261ecSmrg}
10405b261ecSmrg
10505b261ecSmrgBool
10605b261ecSmrgfbdevHWUnmapMMIO(ScrnInfoPtr pScrn)
10705b261ecSmrg{
10835c4bbdfSmrg    return FALSE;
10905b261ecSmrg}
11005b261ecSmrg
11105b261ecSmrgBool
11205b261ecSmrgfbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
11335c4bbdfSmrg{
11435c4bbdfSmrg    return FALSE;
11505b261ecSmrg}
11605b261ecSmrg
11705b261ecSmrgvoid
11805b261ecSmrgfbdevHWSave(ScrnInfoPtr pScrn)
11905b261ecSmrg{
12005b261ecSmrg}
12105b261ecSmrg
12205b261ecSmrgvoid
12305b261ecSmrgfbdevHWRestore(ScrnInfoPtr pScrn)
12405b261ecSmrg{
12505b261ecSmrg}
12605b261ecSmrg
12705b261ecSmrgvoid
12805b261ecSmrgfbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
12935c4bbdfSmrg                   LOCO * colors, VisualPtr pVisual)
13005b261ecSmrg{
13105b261ecSmrg}
13205b261ecSmrg
13305b261ecSmrgModeStatus
13435c4bbdfSmrgfbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
13505b261ecSmrg{
13635c4bbdfSmrg    return MODE_ERROR;
13705b261ecSmrg}
13805b261ecSmrg
13905b261ecSmrgBool
14035c4bbdfSmrgfbdevHWSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
14105b261ecSmrg{
14235c4bbdfSmrg    return FALSE;
14305b261ecSmrg}
14405b261ecSmrg
14505b261ecSmrgvoid
14635c4bbdfSmrgfbdevHWAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
14705b261ecSmrg{
14805b261ecSmrg}
14905b261ecSmrg
15005b261ecSmrgBool
15135c4bbdfSmrgfbdevHWEnterVT(ScrnInfoPtr pScrn)
15205b261ecSmrg{
15335c4bbdfSmrg    return FALSE;
15405b261ecSmrg}
15505b261ecSmrg
15605b261ecSmrgvoid
15735c4bbdfSmrgfbdevHWLeaveVT(ScrnInfoPtr pScrn)
15805b261ecSmrg{
15905b261ecSmrg}
16005b261ecSmrg
16105b261ecSmrgvoid
16205b261ecSmrgfbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
16305b261ecSmrg{
16405b261ecSmrg}
16505b261ecSmrg
16605b261ecSmrgBool
16705b261ecSmrgfbdevHWSaveScreen(ScreenPtr pScreen, int mode)
16805b261ecSmrg{
16935c4bbdfSmrg    return FALSE;
17005b261ecSmrg}
17105b261ecSmrg
17205b261ecSmrgxf86SwitchModeProc *
17335c4bbdfSmrgfbdevHWSwitchModeWeak(void)
17435c4bbdfSmrg{
17535c4bbdfSmrg    return fbdevHWSwitchMode;
17635c4bbdfSmrg}
17705b261ecSmrg
17805b261ecSmrgxf86AdjustFrameProc *
17935c4bbdfSmrgfbdevHWAdjustFrameWeak(void)
18035c4bbdfSmrg{
18135c4bbdfSmrg    return fbdevHWAdjustFrame;
18235c4bbdfSmrg}
18305b261ecSmrg
18405b261ecSmrgxf86EnterVTProc *
18535c4bbdfSmrgfbdevHWEnterVTWeak(void)
18635c4bbdfSmrg{
18735c4bbdfSmrg    return fbdevHWEnterVT;
18835c4bbdfSmrg}
18905b261ecSmrg
19005b261ecSmrgxf86LeaveVTProc *
19135c4bbdfSmrgfbdevHWLeaveVTWeak(void)
19235c4bbdfSmrg{
19335c4bbdfSmrg    return fbdevHWLeaveVT;
19435c4bbdfSmrg}
19505b261ecSmrg
19605b261ecSmrgxf86ValidModeProc *
19735c4bbdfSmrgfbdevHWValidModeWeak(void)
19835c4bbdfSmrg{
19935c4bbdfSmrg    return fbdevHWValidMode;
20035c4bbdfSmrg}
20105b261ecSmrg
20205b261ecSmrgxf86DPMSSetProc *
20335c4bbdfSmrgfbdevHWDPMSSetWeak(void)
20435c4bbdfSmrg{
20535c4bbdfSmrg    return fbdevHWDPMSSet;
20635c4bbdfSmrg}
20705b261ecSmrg
20805b261ecSmrgxf86LoadPaletteProc *
20935c4bbdfSmrgfbdevHWLoadPaletteWeak(void)
21035c4bbdfSmrg{
21135c4bbdfSmrg    return fbdevHWLoadPalette;
21235c4bbdfSmrg}
21305b261ecSmrg
21405b261ecSmrgSaveScreenProcPtr
21535c4bbdfSmrgfbdevHWSaveScreenWeak(void)
21635c4bbdfSmrg{
21735c4bbdfSmrg    return fbdevHWSaveScreen;
21835c4bbdfSmrg}
219