mirror of
https://github.com/X11Libre/xf86-video-i128.git
synced 2026-03-24 01:24:54 +00:00
drop compat with ancient xservers
Relying on >= 1.18 now, so no need for compat with older ones anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-i128/-/merge_requests/9>
This commit is contained in:
@@ -29,7 +29,6 @@ i128_drv_la_LDFLAGS = -module -avoid-version
|
||||
i128_drv_ladir = @moduledir@/drivers
|
||||
|
||||
i128_drv_la_SOURCES = \
|
||||
compat-api.h \
|
||||
i128dga.c \
|
||||
i128exa.c \
|
||||
i128_driver.c \
|
||||
|
||||
@@ -1,99 +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 VT_FUNC_ARGS_DECL int arg, int flags
|
||||
#define VT_FUNC_ARGS pScrn->scrnIndex, 0
|
||||
|
||||
#define XF86_SCRN_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 VT_FUNC_ARGS_DECL ScrnInfoPtr arg
|
||||
#define VT_FUNC_ARGS pScrn
|
||||
|
||||
#define XF86_SCRN_ARG(x) (x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "xf86DDC.h"
|
||||
#include "i128reg.h"
|
||||
|
||||
#include "compat-api.h"
|
||||
struct source_format {
|
||||
int render_format;
|
||||
int i128_format;
|
||||
@@ -137,8 +136,8 @@ typedef struct {
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void I128AdjustFrame(ADJUST_FRAME_ARGS_DECL);
|
||||
Bool I128SwitchMode(SWITCH_MODE_ARGS_DECL);
|
||||
void I128AdjustFrame(ScrnInfoPtr pScrn, int x, int y);
|
||||
Bool I128SwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
|
||||
|
||||
Bool I128HWCursorInit(ScreenPtr pScreen);
|
||||
|
||||
|
||||
@@ -68,18 +68,18 @@ static const OptionInfoRec * I128AvailableOptions(int chipid, int busid);
|
||||
static void I128Identify(int flags);
|
||||
static Bool I128Probe(DriverPtr drv, int flags);
|
||||
static Bool I128PreInit(ScrnInfoPtr pScrn, int flags);
|
||||
static Bool I128ScreenInit(SCREEN_INIT_ARGS_DECL);
|
||||
static Bool I128EnterVT(VT_FUNC_ARGS_DECL);
|
||||
static void I128LeaveVT(VT_FUNC_ARGS_DECL);
|
||||
static Bool I128CloseScreen(CLOSE_SCREEN_ARGS_DECL);
|
||||
static Bool I128ScreenInit(ScreenPtr pScreen, int argc, char **argv);
|
||||
static Bool I128EnterVT(ScrnInfoPtr pScrn);
|
||||
static void I128LeaveVT(ScrnInfoPtr pScrn);
|
||||
static Bool I128CloseScreen(ScreenPtr pScreen);
|
||||
static Bool I128SaveScreen(ScreenPtr pScreen, int mode);
|
||||
|
||||
static void I128DumpBaseRegisters(ScrnInfoPtr pScrn);
|
||||
static void I128DumpIBMDACRegisters(ScrnInfoPtr pScrn, volatile CARD32 *vrbg);
|
||||
|
||||
/* Optional functions */
|
||||
static void I128FreeScreen(FREE_SCREEN_ARGS_DECL);
|
||||
static ModeStatus I128ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
|
||||
static void I128FreeScreen(ScrnInfoPtr pScrn);
|
||||
static ModeStatus I128ValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
|
||||
Bool verbose, int flags);
|
||||
static void I128DisplayPowerManagementSet(ScrnInfoPtr pScrn,
|
||||
int PowerManagementMode,
|
||||
@@ -640,9 +640,6 @@ I128PreInit(ScrnInfoPtr pScrn, int flags)
|
||||
PCI_SUB_VENDOR_ID(pI128->PciInfo));
|
||||
|
||||
iobase = (PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO) & 0xFFFFFF00);
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
|
||||
iobase += hwp->PIOOffset;
|
||||
#endif
|
||||
pI128->RegRec.iobase = iobase;
|
||||
|
||||
pI128->io.rbase_g = inl(iobase) & 0xFFFFFF00;
|
||||
@@ -1392,9 +1389,8 @@ I128Restore(ScrnInfoPtr pScrn)
|
||||
|
||||
/* Usually mandatory */
|
||||
Bool
|
||||
I128SwitchMode(SWITCH_MODE_ARGS_DECL)
|
||||
I128SwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
return I128ModeInit(pScrn, mode);
|
||||
}
|
||||
|
||||
@@ -1429,7 +1425,7 @@ I128ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||
/* This gets called at the start of each server generation */
|
||||
|
||||
static Bool
|
||||
I128ScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
I128ScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
ScrnInfoPtr pScrn;
|
||||
I128Ptr pI128;
|
||||
@@ -1464,7 +1460,7 @@ I128ScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
|
||||
/* Darken the screen for aesthetic reasons and set the viewport */
|
||||
I128SaveScreen(pScreen, SCREEN_SAVER_ON);
|
||||
pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
|
||||
pScrn->AdjustFrame(pScrn, pScrn->frameX0, pScrn->frameY0);
|
||||
|
||||
/*
|
||||
* The next step is to setup the screen's visuals, and initialise the
|
||||
@@ -1614,9 +1610,8 @@ I128ScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
*/
|
||||
/* Usually mandatory */
|
||||
void
|
||||
I128AdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
||||
I128AdjustFrame(ScrnInfoPtr pScrn, int x, int y)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
int Base;
|
||||
I128Ptr pI128;
|
||||
#define I128_PAN_MASK 0x01FFFFE0
|
||||
@@ -1646,13 +1641,11 @@ I128AdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
||||
|
||||
/* Mandatory */
|
||||
static Bool
|
||||
I128EnterVT(VT_FUNC_ARGS_DECL)
|
||||
I128EnterVT(ScrnInfoPtr pScrn)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
|
||||
if (!I128ModeInit(pScrn, pScrn->currentMode))
|
||||
return FALSE;
|
||||
I128AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
|
||||
I128AdjustFrame(pScrn, pScrn->frameX0, pScrn->frameY0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1664,10 +1657,8 @@ I128EnterVT(VT_FUNC_ARGS_DECL)
|
||||
|
||||
/* Mandatory */
|
||||
static void
|
||||
I128LeaveVT(VT_FUNC_ARGS_DECL)
|
||||
I128LeaveVT(ScrnInfoPtr pScrn)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
|
||||
I128Restore(pScrn);
|
||||
}
|
||||
|
||||
@@ -1681,7 +1672,7 @@ I128LeaveVT(VT_FUNC_ARGS_DECL)
|
||||
|
||||
/* Mandatory */
|
||||
static Bool
|
||||
I128CloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
I128CloseScreen(ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
I128Ptr pI128 = I128PTR(pScrn);
|
||||
@@ -1701,7 +1692,7 @@ I128CloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
pScrn->vtSema = FALSE;
|
||||
|
||||
pScreen->CloseScreen = pI128->CloseScreen;
|
||||
return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
|
||||
return (*pScreen->CloseScreen)(pScreen);
|
||||
}
|
||||
|
||||
|
||||
@@ -1709,9 +1700,8 @@ I128CloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
|
||||
/* Optional */
|
||||
static void
|
||||
I128FreeScreen(FREE_SCREEN_ARGS_DECL)
|
||||
I128FreeScreen(ScrnInfoPtr pScrn)
|
||||
{
|
||||
SCRN_INFO_PTR(arg);
|
||||
/*
|
||||
* This only gets called when a screen is being deleted. It does not
|
||||
* get called routinely at the end of a server generation.
|
||||
@@ -1727,7 +1717,7 @@ I128FreeScreen(FREE_SCREEN_ARGS_DECL)
|
||||
|
||||
/* Optional */
|
||||
static ModeStatus
|
||||
I128ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
|
||||
I128ValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
|
||||
{
|
||||
int lace;
|
||||
|
||||
@@ -1929,7 +1919,7 @@ I128getDDC(ScrnInfoPtr pScrn)
|
||||
}
|
||||
/* Read and output monitor info using DDC2 over I2C bus */
|
||||
if (pI128->I2C) {
|
||||
MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn), pI128->I2C);
|
||||
MonInfo = xf86DoEDID_DDC2(pScrn, pI128->I2C);
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "I2C Monitor info: %p\n",
|
||||
(void *)MonInfo);
|
||||
xf86PrintEDID(MonInfo);
|
||||
@@ -1938,7 +1928,7 @@ I128getDDC(ScrnInfoPtr pScrn)
|
||||
if (!MonInfo) {
|
||||
/* Read and output monitor info using DDC1 */
|
||||
if (pI128->ddc1Read) {
|
||||
MonInfo = xf86DoEDID_DDC1(XF86_SCRN_ARG(pScrn), NULL, pI128->ddc1Read ) ;
|
||||
MonInfo = xf86DoEDID_DDC1(pScrn, NULL, pI128->ddc1Read ) ;
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DDC Monitor info: %p\n",
|
||||
(void *)MonInfo);
|
||||
xf86PrintEDID(MonInfo);
|
||||
|
||||
@@ -139,7 +139,7 @@ I128_SetMode(
|
||||
|
||||
pScrn->displayWidth = OldDisplayWidth[index];
|
||||
|
||||
I128SwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode));
|
||||
I128SwitchMode(pScrn, pScrn->currentMode);
|
||||
pI128->DGAactive = FALSE;
|
||||
} else {
|
||||
if(!pI128->DGAactive) { /* save the old parameters */
|
||||
@@ -151,7 +151,7 @@ I128_SetMode(
|
||||
pScrn->displayWidth = pMode->bytesPerScanline /
|
||||
(pMode->bitsPerPixel >> 3);
|
||||
|
||||
I128SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode));
|
||||
I128SwitchMode(pScrn, pMode->mode);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -176,7 +176,7 @@ I128_SetViewport(
|
||||
){
|
||||
I128Ptr pI128 = I128PTR(pScrn);
|
||||
|
||||
I128AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y));
|
||||
I128AdjustFrame(pScrn, x, y);
|
||||
pI128->DGAViewportStatus = 0; /* I128AdjustFrame loops until finished */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user