mirror of
https://github.com/X11Libre/xf86-video-dummy.git
synced 2026-03-24 01:24:47 +00:00
drop compat with ancient xserver
We're relying on at least 1.18 now, so no compat with older ones needed anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-dummy/-/merge_requests/12>
This commit is contained in:
@@ -33,7 +33,6 @@ dummy_drv_la_LIBADD = $(XORG_LIBS)
|
|||||||
dummy_drv_ladir = @moduledir@/drivers
|
dummy_drv_ladir = @moduledir@/drivers
|
||||||
|
|
||||||
dummy_drv_la_SOURCES = \
|
dummy_drv_la_SOURCES = \
|
||||||
compat-api.h \
|
|
||||||
dummy_cursor.c \
|
dummy_cursor.c \
|
||||||
dummy_driver.c \
|
dummy_driver.c \
|
||||||
dummy.h
|
dummy.h
|
||||||
|
|||||||
101
src/compat-api.h
101
src/compat-api.h
@@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* 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 (including the next
|
|
||||||
* paragraph) 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
|
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
||||||
*
|
|
||||||
* Author: Dave Airlie <airlied@redhat.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* this file provides API compat between server post 1.13 and pre it,
|
|
||||||
it should be reused inside as many drivers as possible */
|
|
||||||
#ifndef COMPAT_API_H
|
|
||||||
#define COMPAT_API_H
|
|
||||||
|
|
||||||
#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
|
|
||||||
#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
|
|
||||||
#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef XF86_HAS_SCRN_CONV
|
|
||||||
#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
|
|
||||||
#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef XF86_SCRN_INTERFACE
|
|
||||||
|
|
||||||
#define SCRN_ARG_TYPE int
|
|
||||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
|
|
||||||
|
|
||||||
#define SCREEN_ARG_TYPE int
|
|
||||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
|
|
||||||
|
|
||||||
#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
|
|
||||||
|
|
||||||
#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
|
|
||||||
#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
|
|
||||||
|
|
||||||
#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
|
|
||||||
#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
|
|
||||||
|
|
||||||
#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
|
|
||||||
#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
|
|
||||||
|
|
||||||
#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
|
|
||||||
#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
|
|
||||||
|
|
||||||
#define FREE_SCREEN_ARGS_DECL int arg, int flags
|
|
||||||
#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
|
|
||||||
|
|
||||||
#define VT_FUNC_ARGS_DECL int arg, int flags
|
|
||||||
#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
|
|
||||||
|
|
||||||
#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
|
|
||||||
#else
|
|
||||||
#define SCRN_ARG_TYPE ScrnInfoPtr
|
|
||||||
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
|
|
||||||
|
|
||||||
#define SCREEN_ARG_TYPE ScreenPtr
|
|
||||||
#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
|
|
||||||
|
|
||||||
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
|
||||||
|
|
||||||
#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
|
||||||
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
|
||||||
|
|
||||||
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
|
||||||
#define CLOSE_SCREEN_ARGS pScreen
|
|
||||||
|
|
||||||
#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
|
|
||||||
#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
|
|
||||||
|
|
||||||
#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
|
|
||||||
#define SWITCH_MODE_ARGS(arg, m) arg, m
|
|
||||||
|
|
||||||
#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
|
|
||||||
#define FREE_SCREEN_ARGS(x) (x)
|
|
||||||
|
|
||||||
#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
|
|
||||||
#define VT_FUNC_ARGS(flags) pScrn
|
|
||||||
|
|
||||||
#define XF86_ENABLEDISABLEFB_ARG(x) (x)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -11,8 +11,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "compat-api.h"
|
|
||||||
|
|
||||||
#define DUMMY_MAX_SCREENS 16
|
#define DUMMY_MAX_SCREENS 16
|
||||||
|
|
||||||
/* Supported chipsets */
|
/* Supported chipsets */
|
||||||
@@ -22,8 +20,8 @@ typedef enum {
|
|||||||
|
|
||||||
/* function prototypes */
|
/* function prototypes */
|
||||||
|
|
||||||
extern Bool DUMMYSwitchMode(SWITCH_MODE_ARGS_DECL);
|
extern Bool DUMMYSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
|
||||||
extern void DUMMYAdjustFrame(ADJUST_FRAME_ARGS_DECL);
|
extern void DUMMYAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
|
||||||
|
|
||||||
/* in dummy_cursor.c */
|
/* in dummy_cursor.c */
|
||||||
extern Bool DUMMYCursorInit(ScreenPtr pScrn);
|
extern Bool DUMMYCursorInit(ScreenPtr pScrn);
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ static const OptionInfoRec * DUMMYAvailableOptions(int chipid, int busid);
|
|||||||
static void DUMMYIdentify(int flags);
|
static void DUMMYIdentify(int flags);
|
||||||
static Bool DUMMYProbe(DriverPtr drv, int flags);
|
static Bool DUMMYProbe(DriverPtr drv, int flags);
|
||||||
static Bool DUMMYPreInit(ScrnInfoPtr pScrn, int flags);
|
static Bool DUMMYPreInit(ScrnInfoPtr pScrn, int flags);
|
||||||
static Bool DUMMYScreenInit(SCREEN_INIT_ARGS_DECL);
|
static Bool DUMMYScreenInit(ScreenPtr pScreen, int argc, char **argv);
|
||||||
static Bool DUMMYEnterVT(VT_FUNC_ARGS_DECL);
|
static Bool DUMMYEnterVT(ScrnInfoPtr pScrn);
|
||||||
static void DUMMYLeaveVT(VT_FUNC_ARGS_DECL);
|
static void DUMMYLeaveVT(ScrnInfoPtr pScrn);
|
||||||
static Bool DUMMYCloseScreen(CLOSE_SCREEN_ARGS_DECL);
|
static Bool DUMMYCloseScreen(ScreenPtr pScreen);
|
||||||
static Bool DUMMYCreateWindow(WindowPtr pWin);
|
static Bool DUMMYCreateWindow(WindowPtr pWin);
|
||||||
static void DUMMYFreeScreen(FREE_SCREEN_ARGS_DECL);
|
static void DUMMYFreeScreen(ScrnInfoPtr pScrn);
|
||||||
static ModeStatus DUMMYValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
|
static ModeStatus DUMMYValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
|
||||||
Bool verbose, int flags);
|
Bool verbose, int flags);
|
||||||
static Bool DUMMYSaveScreen(ScreenPtr pScreen, int mode);
|
static Bool DUMMYSaveScreen(ScreenPtr pScreen, int mode);
|
||||||
|
|
||||||
@@ -723,14 +723,14 @@ DUMMYPreInit(ScrnInfoPtr pScrn, int flags)
|
|||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
static Bool
|
static Bool
|
||||||
DUMMYEnterVT(VT_FUNC_ARGS_DECL)
|
DUMMYEnterVT(ScrnInfoPtr pScrn)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
static void
|
static void
|
||||||
DUMMYLeaveVT(VT_FUNC_ARGS_DECL)
|
DUMMYLeaveVT(ScrnInfoPtr pScrn)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -771,7 +771,7 @@ static ScrnInfoPtr DUMMYScrn; /* static-globalize it */
|
|||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
static Bool
|
static Bool
|
||||||
DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
|
DUMMYScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn;
|
ScrnInfoPtr pScrn;
|
||||||
DUMMYPtr dPtr;
|
DUMMYPtr dPtr;
|
||||||
@@ -958,20 +958,20 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
|
|||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
Bool
|
Bool
|
||||||
DUMMYSwitchMode(SWITCH_MODE_ARGS_DECL)
|
DUMMYSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
void
|
void
|
||||||
DUMMYAdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
DUMMYAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mandatory */
|
/* Mandatory */
|
||||||
static Bool
|
static Bool
|
||||||
DUMMYCloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
DUMMYCloseScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||||
DUMMYPtr dPtr = DUMMYPTR(pScrn);
|
DUMMYPtr dPtr = DUMMYPTR(pScrn);
|
||||||
@@ -983,14 +983,13 @@ DUMMYCloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
|||||||
|
|
||||||
pScrn->vtSema = FALSE;
|
pScrn->vtSema = FALSE;
|
||||||
pScreen->CloseScreen = dPtr->CloseScreen;
|
pScreen->CloseScreen = dPtr->CloseScreen;
|
||||||
return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
|
return (*pScreen->CloseScreen)(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optional */
|
/* Optional */
|
||||||
static void
|
static void
|
||||||
DUMMYFreeScreen(FREE_SCREEN_ARGS_DECL)
|
DUMMYFreeScreen(ScrnInfoPtr pScrn)
|
||||||
{
|
{
|
||||||
SCRN_INFO_PTR(arg);
|
|
||||||
DUMMYFreeRec(pScrn);
|
DUMMYFreeRec(pScrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1002,7 +1001,7 @@ DUMMYSaveScreen(ScreenPtr pScreen, int mode)
|
|||||||
|
|
||||||
/* Optional */
|
/* Optional */
|
||||||
static ModeStatus
|
static ModeStatus
|
||||||
DUMMYValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
|
DUMMYValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
|
||||||
{
|
{
|
||||||
return(MODE_OK);
|
return(MODE_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user