From b17fbb56d56524f3d12c448aa19186473e6c95d1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 12:10:46 +0200 Subject: use XNFalloc() instead of xnfalloc xnfalloc is just an alias for XNFalloc() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- src/lx_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lx_panel.c b/src/lx_panel.c index 6b5d4ed..dedfaa8 100644 --- a/src/lx_panel.c +++ b/src/lx_panel.c @@ -133,7 +133,7 @@ LXGetManualPanelMode(char *modestr) sprintf(sname, "%dx%d", hactive, vactive); - mode->name = xnfalloc(strlen(sname) + 1); + mode->name = XNFalloc(strlen(sname) + 1); strcpy(mode->name, sname); mode->type = M_T_DRIVER | M_T_PREFERRED; -- cgit v1.2.3 From f4842d760cdd09710ab7e436eb1de690493a5f13 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 8 May 2024 15:54:57 +0200 Subject: use XNFcallocarray() instead of xnfcalloc macro xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- src/geode_dcon.c | 2 +- src/gx_driver.c | 4 ++-- src/lx_display.c | 2 +- src/lx_driver.c | 2 +- src/lx_output.c | 2 +- src/lx_panel.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/geode_dcon.c b/src/geode_dcon.c index 5efd79e..20ca194 100644 --- a/src/geode_dcon.c +++ b/src/geode_dcon.c @@ -126,7 +126,7 @@ dcon_init(ScrnInfoPtr pScrni) return FALSE; } - pGeode->panelMode = xnfcalloc(1, sizeof(DisplayModeRec)); + pGeode->panelMode = XNFcallocarray(1, sizeof(DisplayModeRec)); if (pGeode->panelMode == NULL) return FALSE; diff --git a/src/gx_driver.c b/src/gx_driver.c index 0471389..2a45e61 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -462,7 +462,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) return FALSE; #endif - pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec)); + pGeode = pScrni->driverPrivate = XNFcallocarray(1, sizeof(GeodeRec)); if (pGeode == NULL) return FALSE; @@ -692,7 +692,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) else pScrni->videoRam = pGeode->pEnt->device->videoRam; - GeodeClockRange = (ClockRangePtr) xnfcalloc(1, sizeof(ClockRange)); + GeodeClockRange = (ClockRangePtr) XNFcallocarray(1, sizeof(ClockRange)); GeodeClockRange->next = NULL; GeodeClockRange->minClock = 25175; GeodeClockRange->maxClock = 229500; diff --git a/src/lx_display.c b/src/lx_display.c index 2aeb3b4..43d20b3 100644 --- a/src/lx_display.c +++ b/src/lx_display.c @@ -576,7 +576,7 @@ LXSetupCrtc(ScrnInfoPtr pScrni) return; } - lxpriv = xnfcalloc(1, sizeof(LXCrtcPrivateRec)); + lxpriv = XNFcallocarray(1, sizeof(LXCrtcPrivateRec)); if (!lxpriv) { xf86CrtcDestroy(crtc); diff --git a/src/lx_driver.c b/src/lx_driver.c index 0f04579..a199310 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -324,7 +324,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) return TRUE; } - pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec)); + pGeode = pScrni->driverPrivate = XNFcallocarray(1, sizeof(GeodeRec)); if (pGeode == NULL) return FALSE; diff --git a/src/lx_output.c b/src/lx_output.c index 40455ce..4cd5b64 100644 --- a/src/lx_output.c +++ b/src/lx_output.c @@ -285,7 +285,7 @@ LXSetupOutput(ScrnInfoPtr pScrni) output = xf86OutputCreate(pScrni, &lx_output_funcs, "default"); - lxpriv = xnfcalloc(1, sizeof(LXOutputPrivateRec)); + lxpriv = XNFcallocarray(1, sizeof(LXOutputPrivateRec)); if (!lxpriv) { xf86OutputDestroy(output); diff --git a/src/lx_panel.c b/src/lx_panel.c index dedfaa8..8dfd68c 100644 --- a/src/lx_panel.c +++ b/src/lx_panel.c @@ -126,7 +126,7 @@ LXGetManualPanelMode(char *modestr) if (ret != 9) return NULL; - mode = xnfcalloc(1, sizeof(DisplayModeRec)); + mode = XNFcallocarray(1, sizeof(DisplayModeRec)); if (mode == NULL) return NULL; -- cgit v1.2.3 From bcfe151ba1f8dcf743f181f8673f8a5a9f90823d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 14 May 2024 17:03:47 +0200 Subject: drop compat with ancient xserver versions We're relying on at least 1.18 now. Signed-off-by: Enrico Weigelt, metux IT consult --- src/geode_ddc.c | 2 -- src/lx_display.c | 4 ---- 2 files changed, 6 deletions(-) (limited to 'src') diff --git a/src/geode_ddc.c b/src/geode_ddc.c index 7b8277d..a72844d 100644 --- a/src/geode_ddc.c +++ b/src/geode_ddc.c @@ -175,10 +175,8 @@ GeodeGetDDC(ScrnInfoPtr pScrni) mon = xf86DoEDID_DDC2(DDC_CALL(pScrni), bus); -#if (XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,4,99,0,0)) if (mon) xf86DDCApplyQuirks(pScrni->scrnIndex, mon); -#endif xf86DestroyI2CBusRec(bus, FALSE, FALSE); diff --git a/src/lx_display.c b/src/lx_display.c index 43d20b3..7816b94 100644 --- a/src/lx_display.c +++ b/src/lx_display.c @@ -389,11 +389,7 @@ lx_create_bo_pixmap(ScreenPtr pScreen, { PixmapPtr pixmap; -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,0,0,0) pixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); -#else - pixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth); -#endif if (!pixmap) return NULL; -- cgit v1.2.3 From d00350fd0d301bb73f5e72d7e36ae8f6f698cecf Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 22 May 2024 21:04:54 +0200 Subject: drop obsolete check for REGION_NULL Since we're depending on at least 1.18, we can rely on it being present. Signed-off-by: Enrico Weigelt, metux IT consult --- src/gx_video.c | 4 ---- src/z4l.c | 4 ---- 2 files changed, 8 deletions(-) (limited to 'src') diff --git a/src/gx_video.c b/src/gx_video.c index cc69dc2..847ca83 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -416,11 +416,7 @@ GXSetupImageVideo(ScreenPtr pScrn) #endif /* gotta uninit this someplace */ -#if defined(REGION_NULL) REGION_NULL(pScrn, &pPriv->clip); -#else - REGION_INIT(pScrn, &pPriv->clip, NullBox, 0); -#endif pGeode->adaptor = adapt; diff --git a/src/z4l.c b/src/z4l.c index c7b33e8..3cee57d 100644 --- a/src/z4l.c +++ b/src/z4l.c @@ -1577,11 +1577,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) pPriv->bufsz = -1; pPriv->last = -1; pPriv->pixfmt = opixfmt; -#if defined(REGION_NULL) REGION_NULL(pScrni->pScreen, &pPriv->clips); -#else - REGION_INIT(pScrni->pScreen, &pPriv->clips, NullBox, 0); -#endif strncpy(&pPriv->dev_path[0], z4l_dev_paths[dev], sizeof(pPriv->dev_path)); pPriv->enc = &encs[cenc]; -- cgit v1.2.3 From 42727dadba813bc0c952e87abf67cf027c6a6256 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 22 May 2024 22:31:08 +0200 Subject: drop obsolete check for HAS_DIXREGISTERPRIVATEKEY and HAS_DEVPRIVATEKEYREC Since we're relying on xserver >= 1.18, we know its present. Signed-off-by: Enrico Weigelt, metux IT consult --- src/gx_randr.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/gx_randr.c b/src/gx_randr.c index c0ca3b9..e38da53 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -59,11 +59,7 @@ typedef struct _GXRandRInfo { Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if HAS_DEVPRIVATEKEYREC static DevPrivateKeyRec GXRandRIndex; -#else -static int GXRandRIndex; -#endif #define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) @@ -350,10 +346,8 @@ GXRandRInit(ScreenPtr pScreen, int rotation) #if OLD_VIDEODRV_INTERFACE GXRandRIndex = AllocateScreenPrivateIndex(); #endif -#if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0)) return FALSE; -#endif pRandr = calloc(1, sizeof(XF86RandRInfoRec)); if (pRandr == NULL) -- cgit v1.2.3 From caa04ba605bbbf0a1b8d819b9c810ae49b4e2dac Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 22 May 2024 22:38:37 +0200 Subject: drop compat with video api major version < 20 Since we're relying on xserver >= 1.18, we can assume video api major version >= 20. Signed-off-by: Enrico Weigelt, metux IT consult --- src/geode_driver.c | 3 --- src/gx_driver.c | 3 --- src/gx_randr.c | 14 -------------- src/lx_driver.c | 3 --- 4 files changed, 23 deletions(-) (limited to 'src') diff --git a/src/geode_driver.c b/src/geode_driver.c index e16ea72..3185db8 100644 --- a/src/geode_driver.c +++ b/src/geode_driver.c @@ -42,9 +42,6 @@ /* Includes that are used by all drivers */ #include "xf86.h" #include "xf86_OSproc.h" -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 -#include "xf86Resources.h" -#endif #include "compiler.h" #include "xf86PciInfo.h" #include "xf86Pci.h" diff --git a/src/gx_driver.c b/src/gx_driver.c index 2a45e61..e858ad3 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -38,9 +38,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 -#include "xf86Resources.h" -#endif #include "xf86cmap.h" #include "compiler.h" #include "mipointer.h" diff --git a/src/gx_randr.c b/src/gx_randr.c index e38da53..64a66eb 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -61,16 +61,9 @@ typedef struct _GXRandRInfo { static DevPrivateKeyRec GXRandRIndex; -#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) - -#if OLD_VIDEODRV_INTERFACE -#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr) -#define XF86RANDRSET(p, v) (p)->devPrivates[GXRandRIndex].ptr = v -#else #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, &GXRandRIndex)) #define XF86RANDRSET(p, v) dixSetPrivate(&(p)->devPrivates, &GXRandRIndex, v) -#endif static int GXRandRModeRefresh(DisplayModePtr mode) @@ -164,11 +157,7 @@ GXRandRSetMode(ScreenPtr pScreen, int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8 - WindowPtr pRoot = WindowTable[pScreen->myNum]; -#else WindowPtr pRoot = pScreen->root; -#endif DisplayModePtr currentMode = NULL; Bool ret = TRUE; @@ -343,9 +332,6 @@ GXRandRInit(ScreenPtr pScreen, int rotation) if (GXRandRGeneration != serverGeneration) { GXRandRGeneration = serverGeneration; } -#if OLD_VIDEODRV_INTERFACE - GXRandRIndex = AllocateScreenPrivateIndex(); -#endif if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0)) return FALSE; diff --git a/src/lx_driver.c b/src/lx_driver.c index a199310..794e830 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -39,9 +39,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 -#include "xf86Resources.h" -#endif #include "xf86i2c.h" #include "xf86Crtc.h" #include "xf86cmap.h" -- cgit v1.2.3 From dab65155d83c5cfbc5985f03fba5c4a6f6925ab4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 22 May 2024 22:41:54 +0200 Subject: drop compat for old XINPUT ABI versions < 22 Signed-off-by: Enrico Weigelt, metux IT consult --- src/gx_randr.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src') diff --git a/src/gx_randr.c b/src/gx_randr.c index 64a66eb..2c492f6 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -249,11 +249,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, } /* FIXME: we don't have a new video ABI yet */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 miPointerGetPosition(inputInfo.pointer, &px, &py); -#else - miPointerPosition(&px, &py); -#endif for (mode = pScrni->modes;; mode = mode->next) { if (pRandr->maxX == 0 || pRandr->maxY == 0) { @@ -293,11 +289,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, } /* FIXME: we don't have a new video ABI yet */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 if (pScreen == miPointerGetScreen(inputInfo.pointer)) -#else - if (pScreen == miPointerCurrentScreen()) -#endif { px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); @@ -305,11 +297,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, xf86SetViewport(pScreen, px, py); /* FIXME: we don't have a new video ABI yet */ - (*pScreen->SetCursorPosition) ( -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 - inputInfo.pointer, -#endif - pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); } return TRUE; -- cgit v1.2.3 From 83b14d6e438d7250e1bc018ee0929f5779bf551c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 23 May 2024 19:38:40 +0200 Subject: 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 --- src/compat-api.h | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'src') diff --git a/src/compat-api.h b/src/compat-api.h index f6df925..bbeb769 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -31,54 +31,6 @@ #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 DDC_CALL(pScrni) (pScrni->scrnIndex) - -#define SCRN_ARG_TYPE int -#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrni = xf86Screens[(arg1)] - -#define SCREEN_ARG_TYPE int -#define SCREEN_PTR(arg1) ScreenPtr pScrn = screenInfo.screens[(arg1)] - -#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScrn, 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 pScrn -#define CLOSE_SCREEN_ARGS scrnIndex, pScrn - -#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags -#define ADJUST_FRAME_ARGS(x, y) pScrni->scrnIndex, (x), (y), 0 - -#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr pMode, int flags - -#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) pScrni->scrnIndex, (flags) - -#define XF86_ENABLEDISABLEFB_ARG(pScrni, x) ((pScrni)->scrnIndex), (x) - -#define POINTER_MOVED_ARGS_DECL int arg, int x, int y -#define POINTER_MOVED_ARGS(x, y) pScrni->scrnIndex, (x), (y) - -#define VALID_MODE_ARGS_DECL int arg, DisplayModePtr pMode, Bool Verbose, int flags - -#else /*XF86_SCRN_INTERFACE) */ - #define DDC_CALL(pScrni) (pScrni) #define SCRN_ARG_TYPE ScrnInfoPtr @@ -119,5 +71,3 @@ #define VALID_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode, Bool Verbose, int flags #endif - -#endif -- cgit v1.2.3 From 1bd62d4e151931e41e879ea4cb28b3a6a0600978 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 27 May 2024 18:02:54 +0200 Subject: drop obsolete XAA support Since recent commits require xserver-1.18.0 or later to build against, there's no reason leaving behind big chunks of code that can only build against the XAA support removed in xserver-1.13.0 (released in 2012). Signed-off-by: Enrico Weigelt, metux IT consult --- src/geode.h | 29 ------------- src/gx_accel.c | 125 -------------------------------------------------------- src/gx_driver.c | 60 +-------------------------- src/gx_rotate.c | 19 --------- src/gx_video.c | 4 -- 5 files changed, 2 insertions(+), 235 deletions(-) (limited to 'src') diff --git a/src/geode.h b/src/geode.h index 3dd3e15..5ff1cca 100644 --- a/src/geode.h +++ b/src/geode.h @@ -32,9 +32,6 @@ #endif #include "geode_pcirename.h" -#ifdef HAVE_XAA_H -#include "xaa.h" -#endif #include "exa.h" #include "xf86Cursor.h" @@ -57,12 +54,6 @@ #undef XF86EXA #endif -#ifdef HAVE_XAA_H -#define XF86XAA 1 -#else -#undef XF86XAA -#endif - #define CFB 0 #define INT10_SUPPORT 1 @@ -83,21 +74,6 @@ #define GFX_CPU_GEODELX 4 -#if defined(HAVE_GX) && XF86XAA -#define GX_FILL_RECT_SUPPORT 1 -#define GX_BRES_LINE_SUPPORT 1 -#define GX_DASH_LINE_SUPPORT 0 /* does not do dashed lines */ -#define GX_MONO_8X8_PAT_SUPPORT 1 -#define GX_CLREXP_8X8_PAT_SUPPORT 1 -#define GX_SCR2SCREXP_SUPPORT 1 -#define GX_SCR2SCRCPY_SUPPORT 1 -#define GX_CPU2SCREXP_SUPPORT 1 -#define GX_SCANLINE_SUPPORT 1 -#define GX_USE_OFFSCRN_MEM 0 -#define GX_ONE_LINE_AT_A_TIME 1 -#define GX_WRITE_PIXMAP_SUPPORT 1 -#endif - #define GFX(func) gfx_##func #define GFX2(func) gfx2_##func @@ -297,8 +273,6 @@ typedef struct _geodeRec { xf86CursorInfoPtr CursorInfo; - /* XAA structures */ - unsigned int cpySrcOffset; int cpySrcPitch, cpySrcBpp; int cpyDx, cpyDy; @@ -311,9 +285,6 @@ typedef struct _geodeRec { int NoOfImgBuffers; unsigned char **AccelColorExpandBuffers; int NoOfColorExpandLines; -#if XF86XAA - XAAInfoRecPtr AccelInfoRec; -#endif /* Save state */ unsigned long FBCompressionOffset; diff --git a/src/gx_accel.c b/src/gx_accel.c index 1bc9a4c..38bd233 100644 --- a/src/gx_accel.c +++ b/src/gx_accel.c @@ -39,9 +39,6 @@ #include "vgaHW.h" #include "xf86.h" -#ifdef HAVE_XAA_H -#include "xaalocal.h" -#endif #include "xf86fbman.h" #include "miline.h" #include "xaarop.h" @@ -130,10 +127,6 @@ static GDashLine gdln; static unsigned int gu2_xshift, gu2_yshift; static unsigned int gu2_pitch; -#if XF86XAA -static XAAInfoRecPtr localRecPtr; -#endif - /* pat 0xF0 */ /* src 0xCC */ /* dst 0xAA */ @@ -1971,123 +1964,5 @@ GXAccelInit(ScreenPtr pScrn) } #endif -#if XF86XAA - - /* Getting the pointer for acceleration Inforecord */ - pGeode->AccelInfoRec = localRecPtr = XAACreateInfoRec(); - if (!pGeode->AccelInfoRec) - return FALSE; - - /* SET ACCELERATION FLAGS */ - localRecPtr->Flags = PIXMAP_CACHE | OFFSCREEN_PIXMAPS | LINEAR_FRAMEBUFFER; - - /* HOOK SYNCRONIZARION ROUTINE */ - localRecPtr->Sync = GXAccelSync; - -#if GX_FILL_RECT_SUPPORT - /* HOOK FILLED RECTANGLES */ - HOOK(SetupForSolidFill); - HOOK(SubsequentSolidFillRect); - localRecPtr->SolidFillFlags = 0; -#endif - -#if GX_MONO_8X8_PAT_SUPPORT - /* Color expansion */ - HOOK(SetupForMono8x8PatternFill); - HOOK(SubsequentMono8x8PatternFillRect); -/* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ - localRecPtr->Mono8x8PatternFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN; -#endif - -#if GX_CLREXP_8X8_PAT_SUPPORT - /* Color expansion */ - HOOK(SetupForColor8x8PatternFill); - HOOK(SubsequentColor8x8PatternFillRect); -/* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ - localRecPtr->Color8x8PatternFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_ORIGIN; -#endif - -#if GX_SCR2SCRCPY_SUPPORT - /* HOOK SCREEN TO SCREEN COPIES - * Set flag to only allow copy if transparency is enabled. - */ - HOOK(SetupForScreenToScreenCopy); - HOOK(SubsequentScreenToScreenCopy); - localRecPtr->ScreenToScreenCopyFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - -#if GX_BRES_LINE_SUPPORT - /* HOOK BRESENHAM SOLID LINES */ - localRecPtr->SolidLineFlags = NO_PLANEMASK; - HOOK(SetupForSolidLine); - HOOK(SubsequentSolidBresenhamLine); - HOOK(SubsequentSolidHorVertLine); - HOOK(SubsequentSolidTwoPointLine); - localRecPtr->SolidBresenhamLineErrorTermBits = 15; -#endif - -#if GX_DASH_LINE_SUPPORT - /* HOOK BRESENHAM DASHED LINES */ - HOOK(SetupForDashedLine); - HOOK(SubsequentDashedBresenhamLine); - HOOK(SubsequentDashedTwoPointLine); - localRecPtr->DashedBresenhamLineErrorTermBits = 15; - localRecPtr->DashPatternMaxLength = 64; - localRecPtr->DashedLineFlags = NO_PLANEMASK | /* TRANSPARENCY_ONLY | */ - LINE_PATTERN_POWER_OF_2_ONLY | LINE_PATTERN_MSBFIRST_MSBJUSTIFIED; -#endif - -#if GX_SCR2SCREXP_SUPPORT - /* Color expansion */ - HOOK(SetupForScreenToScreenColorExpandFill); - HOOK(SubsequentScreenToScreenColorExpandFill); - localRecPtr->ScreenToScreenColorExpandFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY; -#endif - - if (pGeode->AccelImageWriteBuffers) { -#if GX_SCANLINE_SUPPORT - localRecPtr->ScanlineImageWriteBuffers = pGeode->AccelImageWriteBuffers; - localRecPtr->NumScanlineImageWriteBuffers = pGeode->NoOfImgBuffers; - HOOK(SetupForScanlineImageWrite); - HOOK(SubsequentScanlineImageWriteRect); - HOOK(SubsequentImageWriteScanline); - localRecPtr->ScanlineImageWriteFlags = NO_PLANEMASK | NO_GXCOPY | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - - } - else { - localRecPtr->PixmapCacheFlags = DO_NOT_BLIT_STIPPLES; - } - - if (pGeode->AccelColorExpandBuffers) { -#if GX_CPU2SCREXP_SUPPORT - /* Color expansion */ - localRecPtr->ScanlineColorExpandBuffers = - pGeode->AccelColorExpandBuffers; - localRecPtr->NumScanlineColorExpandBuffers = - pGeode->NoOfColorExpandLines; - HOOK(SetupForScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentColorExpandScanline); - localRecPtr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - } -#if GX_WRITE_PIXMAP_SUPPORT - pGeode->WritePixmap = localRecPtr->WritePixmap; - HOOK(WritePixmap); -#endif - - return (XAAInit(pScrn, localRecPtr)); -#else /* XF86XAA */ return FALSE; -#endif } - -/* END OF FILE */ diff --git a/src/gx_driver.c b/src/gx_driver.c index e858ad3..ca84427 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -255,50 +255,6 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) pExa->offScreenBase = fboffset; pExa->memorySize = fboffset + fbavail; } - - if (!pGeode->useEXA) { - -#if XF86XAA - if (!xf86FBManagerRunning(pScrn)) { - - unsigned int offset = fboffset; - unsigned int avail = fbavail; - RegionRec OffscreenRegion; - BoxRec AvailBox; - - /* Assume the shadow FB exists even if it doesn't */ - - if (pGeode->shadowSize == 0) { - size = (pScrn->width * bytpp) * pScrni->virtualX; - offset += size; - avail -= size; - } - - AvailBox.x1 = 0; - AvailBox.y1 = - (offset + pGeode->displayPitch - 1) / pGeode->displayPitch; - - AvailBox.x2 = pGeode->displayWidth; - AvailBox.y2 = (offset + avail) / pGeode->displayPitch; - - if (AvailBox.y1 < AvailBox.y2) { - REGION_INIT(pScrn, &OffscreenRegion, &AvailBox, 2); - - if (!xf86InitFBManagerRegion(pScrn, &OffscreenRegion)) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Memory manager initialization failed.\n"); - - REGION_UNINIT(pScrn, &OffscreenRegion); - } - else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "Cache disabled - no offscreen memory available.\n"); - } - else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "XAA offscreen memory has already been allocated.\n"); -#endif - } } return ret; } @@ -612,14 +568,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) panelgeo = xf86GetOptValString(GeodeOptions, GX_OPTION_PANEL_GEOMETRY); if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_ACCEL_METHOD))) { -#if defined(XF86XAA) && defined(XF86EXA) - if (!xf86NameCmp(s, "XAA")) - pGeode->useEXA = FALSE; - else if (xf86NameCmp(s, "EXA")) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Unknown acceleration method %s. Defaulting to XAA.\n", - s); -#elif defined(XF86EXA) +#if defined(XF86EXA) pGeode->useEXA = TRUE; #else pGeode->useEXA = FALSE; @@ -628,7 +577,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) xf86DrvMsg(pScrni->scrnIndex, X_INFO, "Using %s acceleration architecture\n", - pGeode->useEXA ? "EXA" : "XAA"); + pGeode->useEXA ? "EXA" : "none"); /* Set up the panel */ @@ -1011,11 +960,6 @@ GXCloseScreen(CLOSE_SCREEN_ARGS_DECL) if (pScrni->vtSema) GXLeaveGraphics(pScrni); -#ifdef XF86XAA - if (pGeode->AccelInfoRec) - XAADestroyInfoRec(pGeode->AccelInfoRec); -#endif - if (pGeode->AccelImageWriteBuffers) { free(pGeode->AccelImageWriteBuffers[0]); free(pGeode->AccelImageWriteBuffers); diff --git a/src/gx_rotate.c b/src/gx_rotate.c index 6076a40..c849792 100644 --- a/src/gx_rotate.c +++ b/src/gx_rotate.c @@ -157,25 +157,6 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) (pointer) (pGeode->FBBase + pScrni->fbOffset)); - /* Don't use XAA pixmap cache or offscreen pixmaps when rotated */ -#if XF86XAA - if (pGeode->AccelInfoRec) { - if (pGeode->rotation == RR_Rotate_0) { - pGeode->AccelInfoRec->Flags = - LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS | PIXMAP_CACHE; - pGeode->AccelInfoRec->UsingPixmapCache = TRUE; - pGeode->AccelInfoRec->maxOffPixWidth = 0; - pGeode->AccelInfoRec->maxOffPixHeight = 0; - } - else { - pGeode->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER; - pGeode->AccelInfoRec->UsingPixmapCache = FALSE; - pGeode->AccelInfoRec->maxOffPixWidth = 1; - pGeode->AccelInfoRec->maxOffPixHeight = 1; - } - } -#endif - return TRUE; error: diff --git a/src/gx_video.c b/src/gx_video.c index 847ca83..4eae44f 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -54,10 +54,6 @@ #include "geode.h" #include "xf86xv.h" #include -#ifdef HAVE_XAA_H -#include "xaa.h" -#include "xaalocal.h" -#endif #include "dixstruct.h" #include "fourcc.h" #include "geode_fourcc.h" -- cgit v1.2.3 From e46b0b9a39ec00dd8006d9927aaa21440b30b7bc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 28 May 2024 14:49:08 +0200 Subject: drop old compat macros There's used to have separate versions for older Xserver versions, but no anymore, so these aren't needed anymore. Signed-off-by: Enrico Weigelt, metux IT consult --- src/compat-api.h | 39 ++++----------------------------------- src/geode.h | 8 ++++---- src/geode_ddc.c | 2 +- src/gx_driver.c | 31 ++++++++++++------------------- src/gx_randr.c | 6 ++---- src/gx_video.c | 11 +++++------ src/lx_driver.c | 20 ++++++++------------ src/lx_video.c | 17 ++++++++--------- src/z4l.c | 7 +++---- 9 files changed, 47 insertions(+), 94 deletions(-) (limited to 'src') diff --git a/src/compat-api.h b/src/compat-api.h index bbeb769..d8100c3 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -31,43 +31,12 @@ #ifndef COMPAT_API_H #define COMPAT_API_H -#define DDC_CALL(pScrni) (pScrni) - -#define SCRN_ARG_TYPE ScrnInfoPtr -#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrni = (arg1) - -#define SCREEN_ARG_TYPE ScreenPtr -#define SCREEN_PTR(arg1) ScreenPtr pScrn = (arg1) - -#define SCREEN_INIT_ARGS_DECL ScreenPtr pScrn, int argc, char **argv - #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) -#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout -#define BLOCKHANDLER_ARGS arg, pTimeout +#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout +#define BLOCKHANDLER_ARGS pScreen, pTimeout #else -#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask -#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask +#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask #endif -#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScrn -#define CLOSE_SCREEN_ARGS pScrn - -#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y -#define ADJUST_FRAME_ARGS(x, y) pScrni, (x), (y) - -#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode - -#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) pScrni - -#define XF86_ENABLEDISABLEFB_ARG(pScrni, x) (pScrni), (x) - -#define POINTER_MOVED_ARGS_DECL ScrnInfoPtr arg, int x, int y -#define POINTER_MOVED_ARGS(x, y) pScrni, (x), (y) - -#define VALID_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode, Bool Verbose, int flags - #endif diff --git a/src/geode.h b/src/geode.h index 5ff1cca..65f6f84 100644 --- a/src/geode.h +++ b/src/geode.h @@ -228,7 +228,7 @@ typedef struct _geodeRec { /* Hooks */ - void (*PointerMoved) (POINTER_MOVED_ARGS_DECL); + void (*PointerMoved) (ScrnInfoPtr pScrn, int x, int y); CloseScreenProcPtr CloseScreen; Bool (*CreateScreenResources) (ScreenPtr); @@ -381,8 +381,8 @@ xf86MonPtr GeodeDoDDC(ScrnInfoPtr pScrni, int index); Bool GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name); int GeodeGetFPGeometry(const char *str, int *width, int *height); -void GeodePointerMoved(POINTER_MOVED_ARGS_DECL); -void GeodeFreeScreen(FREE_SCREEN_ARGS_DECL); +void GeodePointerMoved(ScrnInfoPtr pScrn, int x, int y); +void GeodeFreeScreen(ScrnInfoPtr pScrn); int GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp); void GXSetupChipsetFPtr(ScrnInfoPtr pScrn); @@ -438,7 +438,7 @@ void LXSetupOutput(ScrnInfoPtr); DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni); DisplayModePtr LXGetManualPanelMode(char *modestr); -void LXAdjustFrame(ADJUST_FRAME_ARGS_DECL); +void LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y); /* lx_display.c */ void LXSetupCrtc(ScrnInfoPtr pScrni); diff --git a/src/geode_ddc.c b/src/geode_ddc.c index a72844d..8227207 100644 --- a/src/geode_ddc.c +++ b/src/geode_ddc.c @@ -173,7 +173,7 @@ GeodeGetDDC(ScrnInfoPtr pScrni) if (!GeodeI2CInit(pScrni, &bus, "CS5536 DDC BUS")) return NULL; - mon = xf86DoEDID_DDC2(DDC_CALL(pScrni), bus); + mon = xf86DoEDID_DDC2(pScrni, bus); if (mon) xf86DDCApplyQuirks(pScrni->scrnIndex, mon); diff --git a/src/gx_driver.c b/src/gx_driver.c index ca84427..be1bd17 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -770,9 +770,8 @@ GXSetDvLineSize(unsigned int pitch) /* XXX - this is nothing like the original function - not sure exactly what the purpose is for this quite yet */ static void -GXAdjustFrame(ADJUST_FRAME_ARGS_DECL) +GXAdjustFrame(ScrnInfoPtr pScrni, int x, int y) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); unsigned long offset; @@ -854,16 +853,15 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) pGeode->HWCursor = FALSE; } - GXAdjustFrame(ADJUST_FRAME_ARGS(pScrni->frameX0, pScrni->frameY0)); + GXAdjustFrame(pScrni, pScrni->frameX0, pScrni->frameY0); gx_enable_dac_power(); return TRUE; } static Bool -GXSwitchMode(SWITCH_MODE_ARGS_DECL) +GXSwitchMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int ret = TRUE; int rotate; @@ -952,7 +950,7 @@ GXLeaveGraphics(ScrnInfoPtr pScrni) } static Bool -GXCloseScreen(CLOSE_SCREEN_ARGS_DECL) +GXCloseScreen(ScreenPtr pScrn) { ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); @@ -985,7 +983,7 @@ GXCloseScreen(CLOSE_SCREEN_ARGS_DECL) pScrn->CloseScreen = pGeode->CloseScreen; if (pScrn->CloseScreen) - return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS); + return (*pScrn->CloseScreen) (pScrn); return TRUE; } @@ -1216,7 +1214,7 @@ GXCreateScreenResources(ScreenPtr pScreen) } static Bool -GXScreenInit(SCREEN_INIT_ARGS_DECL) +GXScreenInit(ScreenPtr pScrn, int argc, char **argv) { ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); @@ -1416,9 +1414,8 @@ GXScreenInit(SCREEN_INIT_ARGS_DECL) } static int -GXValidMode(VALID_MODE_ARGS_DECL) +GXValidMode(ScrnInfoPtr pScrni, DisplayModePtr pMode, Bool Verbose, int flags) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int p; int custom = 0; @@ -1467,16 +1464,14 @@ GXValidMode(VALID_MODE_ARGS_DECL) /* XXX - Way more to do here */ static Bool -GXEnterVT(VT_FUNC_ARGS_DECL) +GXEnterVT(ScrnInfoPtr pScrni) { - SCRN_INFO_PTR(arg); return GXEnterGraphics(NULL, pScrni); } static void -GXLeaveVT(VT_FUNC_ARGS_DECL) +GXLeaveVT(ScrnInfoPtr pScrni) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); pGeode->PrevDisplayOffset = gfx_get_display_offset(); @@ -1503,9 +1498,8 @@ GXSetupChipsetFPtr(ScrnInfoPtr pScrn) * ============================== */ void -GeodePointerMoved(POINTER_MOVED_ARGS_DECL) +GeodePointerMoved(ScrnInfoPtr pScrni, int x, int y) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int newX = x, newY = y; @@ -1527,7 +1521,7 @@ GeodePointerMoved(POINTER_MOVED_ARGS_DECL) break; } - (*pGeode->PointerMoved) (POINTER_MOVED_ARGS(newX, newY)); + (*pGeode->PointerMoved) (pScrni, newX, newY); } int @@ -1549,9 +1543,8 @@ GeodeFreeRec(ScrnInfoPtr pScrni) } void -GeodeFreeScreen(FREE_SCREEN_ARGS_DECL) +GeodeFreeScreen(ScrnInfoPtr pScrni) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode == NULL) diff --git a/src/gx_randr.c b/src/gx_randr.c index 2c492f6..48f7ce4 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -166,8 +166,7 @@ GXRandRSetMode(ScreenPtr pScreen, #endif if (pRoot) - (*pScrni-> - EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE)); + (*pScrni->EnableDisableFBAccess) (pScrni, FALSE); if (useVirtual) { pScrni->virtualX = pRandr->virtualX; @@ -222,8 +221,7 @@ GXRandRSetMode(ScreenPtr pScreen, xf86SetViewport(pScreen, 0, 0); if (pRoot) - (*pScrni-> - EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE)); + (*pScrni->EnableDisableFBAccess) (pScrni, TRUE); return ret; } diff --git a/src/gx_video.c b/src/gx_video.c index 4eae44f..8b40456 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -1314,14 +1314,13 @@ GeodeQueryImageAttributes(ScrnInfoPtr pScrni, static void GXBlockHandler(BLOCKHANDLER_ARGS_DECL) { - SCREEN_PTR(arg); - ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); - pScrn->BlockHandler = pGeode->BlockHandler; - (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS); - pScrn->BlockHandler = GXBlockHandler; + pScreen->BlockHandler = pGeode->BlockHandler; + (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); + pScreen->BlockHandler = GXBlockHandler; if (pPriv->videoStatus & TIMER_MASK) { GXAccelSync(pScrni); @@ -1350,7 +1349,7 @@ GXBlockHandler(BLOCKHANDLER_ARGS_DECL) if (pPriv->area) { #ifdef XF86EXA if (pGeode->useEXA) - exaOffscreenFree(pScrn, pPriv->area); + exaOffscreenFree(pScrni, pPriv->area); #endif if (!pGeode->useEXA) xf86FreeOffscreenArea(pPriv->area); diff --git a/src/lx_driver.c b/src/lx_driver.c index 794e830..b791de7 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -648,9 +648,8 @@ LXUnmapMem(ScrnInfoPtr pScrni) /* These should be correctly accounted for rotation */ void -LXAdjustFrame(ADJUST_FRAME_ARGS_DECL) +LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); unsigned long offset; @@ -662,9 +661,8 @@ LXAdjustFrame(ADJUST_FRAME_ARGS_DECL) } static Bool -LXSwitchMode(SWITCH_MODE_ARGS_DECL) +LXSwitchMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); /* Set the new mode */ @@ -714,7 +712,7 @@ LXLeaveGraphics(ScrnInfoPtr pScrni) } static Bool -LXCloseScreen(CLOSE_SCREEN_ARGS_DECL) +LXCloseScreen(ScreenPtr pScrn) { ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); @@ -740,7 +738,7 @@ LXCloseScreen(CLOSE_SCREEN_ARGS_DECL) pScrn->CloseScreen = pGeode->CloseScreen; if (pScrn->CloseScreen) - return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS); + return (*pScrn->CloseScreen) (pScrn); return TRUE; } @@ -836,7 +834,7 @@ LXLoadPalette(ScrnInfoPtr pScrni, } static Bool -LXScreenInit(SCREEN_INIT_ARGS_DECL) +LXScreenInit(ScreenPtr pScrn, int argc, char **argv) { ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); @@ -1006,22 +1004,20 @@ LXScreenInit(SCREEN_INIT_ARGS_DECL) } static int -LXValidMode(VALID_MODE_ARGS_DECL) +LXValidMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, Bool Verbose, int flags) { return MODE_OK; } static Bool -LXEnterVT(VT_FUNC_ARGS_DECL) +LXEnterVT(ScrnInfoPtr pScrni) { - SCRN_INFO_PTR(arg); return LXEnterGraphics(NULL, pScrni); } static void -LXLeaveVT(VT_FUNC_ARGS_DECL) +LXLeaveVT(ScrnInfoPtr pScrni) { - SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); pGeode->PrevDisplayOffset = vg_get_display_offset(); diff --git a/src/lx_video.c b/src/lx_video.c index eb46cb5..6ebfd6b 100644 --- a/src/lx_video.c +++ b/src/lx_video.c @@ -643,14 +643,13 @@ LXResetVideo(ScrnInfoPtr pScrni) static void LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL) { - SCREEN_PTR(arg); - ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); - pScrn->BlockHandler = pGeode->BlockHandler; - (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS); - pScrn->BlockHandler = LXVidBlockHandler; + pScreen->BlockHandler = pGeode->BlockHandler; + (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); + pScreen->BlockHandler = LXVidBlockHandler; if (pPriv->videoStatus & TIMER_MASK) { Time now = currentTime.milliseconds; @@ -685,9 +684,9 @@ LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL) } static XF86VideoAdaptorPtr -LXSetupImageVideo(ScreenPtr pScrn) +LXSetupImageVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); XF86VideoAdaptorPtr adapt; GeodePortPrivRec *pPriv; @@ -741,8 +740,8 @@ LXSetupImageVideo(ScreenPtr pScrn) pGeode->adaptor = adapt; - pGeode->BlockHandler = pScrn->BlockHandler; - pScrn->BlockHandler = LXVidBlockHandler; + pGeode->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = LXVidBlockHandler; xvColorKey = MAKE_ATOM("XV_COLORKEY"); xvColorKeyMode = MAKE_ATOM("XV_COLORKEYMODE"); diff --git a/src/z4l.c b/src/z4l.c index 3cee57d..e5fe729 100644 --- a/src/z4l.c +++ b/src/z4l.c @@ -1273,12 +1273,11 @@ Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value, return Success; } -static void (*oldAdjustFrame) (ADJUST_FRAME_ARGS_DECL) = NULL; +static void (*oldAdjustFrame) (ScrnInfoPtr pScrni, int x, int y) = NULL; static void -Z4lAdjustFrame(ADJUST_FRAME_ARGS_DECL) +Z4lAdjustFrame(ScrnInfoPtr pScrni, int x, int y) { - SCRN_INFO_PTR(arg); int i; XF86VideoAdaptorPtr adpt; Z4lPortPrivRec *pPriv; @@ -1286,7 +1285,7 @@ Z4lAdjustFrame(ADJUST_FRAME_ARGS_DECL) DBLOG(3, "Z4lAdjustFrame(%d,%d)\n", x, y); z4l_x_offset = x; z4l_y_offset = y; - oldAdjustFrame(ADJUST_FRAME_ARGS(x, y)); + oldAdjustFrame(pScrni, x, y); /* xv adjust does not handle putvideo case */ for (i = 0; i < Z4l_nAdaptors; ++i) { -- cgit v1.2.3 From c74b1d68849897f5a27a84ab60c635731b48e5a0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 5 Jun 2024 15:43:03 +0200 Subject: fix rendundant declarations Fix a a lot warnings on duplicate forward declarations. Signed-off-by: Enrico Weigelt, metux IT consult --- src/cimarron.c | 15 ++++++++------- src/gfx/disp_gu1.c | 3 --- src/gfx/disp_gu2.c | 3 --- src/gfx/gfx_priv.h | 11 ----------- src/gfx/gfx_vid.c | 2 -- 5 files changed, 8 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/cimarron.c b/src/cimarron.c index e4376a9..4b54de8 100644 --- a/src/cimarron.c +++ b/src/cimarron.c @@ -145,6 +145,14 @@ /* #define CIMARRON_EXCLUDE_CUSTOM_MACROS */ + +/* ROUTINE DEFINITIONS */ +/* All routines have a prototype, even those that are not included */ +/* via #ifdefs. This prevents the user from having to include the */ +/* correct #defines anywhere he/she wants to call a Cimarron routine. */ + +#include "cim_rtns.h" + /*----------------------------------------------------------------------*/ /* MODULE VARIABLES */ /* The following #defines affect how global variables in each Cimarron */ @@ -190,13 +198,6 @@ void (*cim_wrmsr) (unsigned long, unsigned long, unsigned long); #include "cim_regs.h" -/* ROUTINE DEFINITIONS */ -/* All routines have a prototype, even those that are not included */ -/* via #ifdefs. This prevents the user from having to include the */ -/* correct #defines anywhere he/she wants to call a Cimarron routine. */ - -#include "cim_rtns.h" - /* HARDWARE ACCESS MACROS */ #include "cim_defs.h" diff --git a/src/gfx/disp_gu1.c b/src/gfx/disp_gu1.c index a03c754..fa081eb 100644 --- a/src/gfx/disp_gu1.c +++ b/src/gfx/disp_gu1.c @@ -25,9 +25,6 @@ void gu1_enable_compression(void); /* private routine definition */ void gu1_disable_compression(void); /* private routine definition */ -void gfx_reset_video(void); /* private routine definition */ -int gfx_set_display_control(int sync_polarities); /* private routine - * definition */ int gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp); /* VIDEO BUFFER SIZE */ diff --git a/src/gfx/disp_gu2.c b/src/gfx/disp_gu2.c index 1f0bbb6..381b4ef 100644 --- a/src/gfx/disp_gu2.c +++ b/src/gfx/disp_gu2.c @@ -29,9 +29,6 @@ void gu2_enable_compression(void); /* private routine definition */ void gu2_disable_compression(void); /* private routine definition */ -int gfx_set_display_control(int sync_polarities); /* private routine - * definition */ -void gfx_reset_video(void); int gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp); /*--------------------------------------------------------------------------- diff --git a/src/gfx/gfx_priv.h b/src/gfx/gfx_priv.h index 4f63f62..7b255a5 100644 --- a/src/gfx/gfx_priv.h +++ b/src/gfx/gfx_priv.h @@ -77,12 +77,6 @@ unsigned long gu2_get_vip_register_base(void); #if GFX_MSR_REDCLOUD -/* PRIVATE ROUTINES */ - -void redcloud_build_mbus_tree(void); -int redcloud_init_msr_devices(MSR aDev[], unsigned int array_size); -DEV_STATUS redcloud_find_msr_device(MSR * pDev); - /* DYNAMIC ROUTINES */ #if GFX_MSR_DYNAMIC @@ -240,11 +234,6 @@ int gfx_get_display_video_downscale_enable(void); #if GFX_DISPLAY_GU2 -/* PRIVATE ROUTINES */ - -void gu2_enable_compression(void); -void gu2_disable_compression(void); - /* DYNAMIC ROUTINES */ #if GFX_DISPLAY_DYNAMIC diff --git a/src/gfx/gfx_vid.c b/src/gfx/gfx_vid.c index 0dd7847..c4215e8 100644 --- a/src/gfx/gfx_vid.c +++ b/src/gfx/gfx_vid.c @@ -145,8 +145,6 @@ unsigned short gfx_vid_height = 0; /* copy from last gfx_set_video_window int gfx_alpha_select = 0; /* currently selected alpha region */ -int gfx_set_screen_enable(int enable); /* forward declaration */ - /* INCLUDE SUPPORT FOR CS5530, IF SPECIFIED. */ #if GFX_VIDEO_CS5530 -- cgit v1.2.3 From e364d99f0ddc6cab210e58b0c47936575b0d0830 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 5 Jun 2024 18:23:10 +0200 Subject: vid_rdc1: fix unused variable "value" Fix warning on unused variable "value". Signed-off-by: Enrico Weigelt, metux IT consult --- src/gfx/vid_rdcl.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/gfx/vid_rdcl.c b/src/gfx/vid_rdcl.c index 72f45d4..34a4659 100644 --- a/src/gfx/vid_rdcl.c +++ b/src/gfx/vid_rdcl.c @@ -256,14 +256,12 @@ gfx_set_clock_frequency(unsigned long frequency) Q_WORD msr_value, sys_value; unsigned long sys_low; unsigned int i, index = 0; - unsigned long value; long timeout = 1000; long min, diff; /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ - value = RCDF_PLLtable[0].pll_value; min = (long) RCDF_PLLtable[0].frequency - frequency; if (min < 0L) min = -min; -- cgit v1.2.3 From eb79135ab2a2621315883c31d09dd98d0c5a1a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin-=C3=89ric=20Racine?= Date: Sun, 23 Jun 2024 13:02:54 +0300 Subject: [LX] Bump the default pixel depth up to 24-bit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin-Éric Racine --- src/lx_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lx_driver.c b/src/lx_driver.c index b791de7..29d8948 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -354,7 +354,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) /* Fill in the monitor information */ pScrni->monitor = pScrni->confScreen->monitor; - if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb)) + if (!xf86SetDepthBpp(pScrni, 24, 24, 24, Support24bppFb | Support32bppFb)) return FALSE; switch (pScrni->depth) { -- cgit v1.2.3 From 9fbd276f1de0f695f2b884d0778db7a0e12bdc56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin-=C3=89ric=20Racine?= Date: Mon, 24 Jun 2024 10:25:06 +0300 Subject: Remove all deprecated xf86PciInfo.h includes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have PCI_VENDOR_ID and PCI_CHIP defined in geode.h. Signed-off-by: Martin-Éric Racine --- src/geode_driver.c | 1 - src/gx_accel.c | 1 - src/gx_cursor.c | 1 - src/gx_video.c | 1 - src/lx_video.c | 1 - 5 files changed, 5 deletions(-) (limited to 'src') diff --git a/src/geode_driver.c b/src/geode_driver.c index 3185db8..a8c9dee 100644 --- a/src/geode_driver.c +++ b/src/geode_driver.c @@ -43,7 +43,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" -#include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86cmap.h" diff --git a/src/gx_accel.c b/src/gx_accel.c index 38bd233..89c7486 100644 --- a/src/gx_accel.c +++ b/src/gx_accel.c @@ -47,7 +47,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xf86PciInfo.h" #include "geode.h" #include "gfx_defs.h" #include "gfx_regs.h" diff --git a/src/gx_cursor.c b/src/gx_cursor.c index 54a1bf1..8e1a6ac 100644 --- a/src/gx_cursor.c +++ b/src/gx_cursor.c @@ -37,7 +37,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xf86PciInfo.h" #include "geode.h" /* Forward declarations of the functions */ diff --git a/src/gx_video.c b/src/gx_video.c index 8b40456..70c0410 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -46,7 +46,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" -#include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86fbman.h" #include "regionstr.h" diff --git a/src/lx_video.c b/src/lx_video.c index 6ebfd6b..f3bcf4a 100644 --- a/src/lx_video.c +++ b/src/lx_video.c @@ -39,7 +39,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" -#include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86fbman.h" #include "regionstr.h" -- cgit v1.2.3 From 224f565dec708eb0f85964e2b74c31b87c3e1808 Mon Sep 17 00:00:00 2001 From: Connor Behan Date: Sun, 23 Jun 2024 22:24:44 -0300 Subject: Suppress majority of compiler warnings This applies some obvious changes to stop gcc from complaining about dead code, shadow declarations, differing signedness and sections that mix declarations with code. The warning about discarding const qualifiers is more annoying because we pass string literals to some functions which accept non-const pointers. Currently, this takes the following approach. If the function *needs* to accept non-const pointers, cast the string literal as char *. Otherwise, change the function to only accept a const pointer. To anticipate future use cases though, I could also leave function definitions as they are and just always cast string literals. Alternatively, if this is more trouble that it is worth, we could just put up with the warnings. Signed-off-by: Connor Behan --- src/cim/cim_gp.c | 8 ++++---- src/cim/cim_msr.c | 12 +++++------ src/cim/cim_vg.c | 22 ++++++++++----------- src/geode.h | 4 ++-- src/geode_ddc.c | 4 ++-- src/gfx/disp_gu2.c | 3 +-- src/gx_accel.c | 9 ++++----- src/gx_driver.c | 2 +- src/gx_video.c | 56 +++++++++++++++++++++++++--------------------------- src/lx_driver.c | 4 ++-- src/lx_output.c | 2 +- src/lx_panel.c | 6 +++--- src/lx_video.c | 6 +++--- src/panel/cen9211.c | 2 -- src/panel/platform.c | 12 +++++------ src/z4l.c | 23 ++++++++++----------- 16 files changed, 84 insertions(+), 91 deletions(-) (limited to 'src') diff --git a/src/cim/cim_gp.c b/src/cim/cim_gp.c index 2085d4f..4ab909f 100644 --- a/src/cim/cim_gp.c +++ b/src/cim/cim_gp.c @@ -2642,7 +2642,7 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, unsigned long total_dwords, size_dwords; unsigned long dword_count, byte_count; unsigned long srcoffset, size; - unsigned long i, ch3_offset, base; + unsigned long j, ch3_offset, base; unsigned long flags = 0; if (gp3_blt_flags & CIMGP_BLTFLAGS_INVERTMONO) @@ -2688,7 +2688,7 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - for (i = 0; i < height; i++) { + for (j = 0; j < height; j++) { /* UPDATE THE COMMAND POINTER * The WRITE_COMMANDXX macros use a pointer to the current buffer * space. This is created by adding gp3_cmd_current to the base @@ -2880,7 +2880,7 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, unsigned long total_dwords, size_dwords; unsigned long dword_count, byte_count; unsigned long srcoff, size; - unsigned long i, base; + unsigned long j, base; unsigned long flags = 0; if (gp3_blt_flags & CIMGP_BLTFLAGS_INVERTMONO) @@ -2926,7 +2926,7 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - for (i = 0; i < height; i++) { + for (j = 0; j < height; j++) { /* UPDATE THE COMMAND POINTER * The WRITE_COMMANDXX macros use a pointer to the current buffer * space. This is created by adding gp3_cmd_current to the base diff --git a/src/cim/cim_msr.c b/src/cim/cim_msr.c index d43bc4b..0d3c571 100644 --- a/src/cim/cim_msr.c +++ b/src/cim/cim_msr.c @@ -35,7 +35,7 @@ /* as well as a lookup table for easy device addressing. */ /*--------------------------------------------------------------*/ -GEODELINK_NODE gliu_nodes[24]; +GEODELINK_NODE gliu_node_list[24]; GEODELINK_NODE msr_dev_lookup[MSR_DEVICE_EMPTY]; #define GET_DEVICE_ID(macrohigh, macrolow) ((macrolow >> 12) & 0xFF) @@ -79,7 +79,7 @@ msr_init_table(void) if (return_value == CIM_STATUS_OK) { /* BUILD LOCAL COPY OF THE GEODELINK BUS */ - msr_create_geodelink_table(gliu_nodes); + msr_create_geodelink_table(gliu_node_list); /* CLEAR TABLE STATUS */ @@ -107,7 +107,7 @@ msr_init_table(void) for (i = 0; i < MSR_DEVICE_EMPTY; i++) { if (msr_dev_lookup[i].device_id == MSR_DEVICE_NOTFOUND) { for (j = 0; j < 24; j++) { - if (gliu_nodes[j].device_id == i) + if (gliu_node_list[j].device_id == i) break; } @@ -116,7 +116,7 @@ msr_init_table(void) else { msr_dev_lookup[i].device_id = MSR_DEVICE_PRESENT; msr_dev_lookup[i].address_from_cpu = - gliu_nodes[j].address_from_cpu; + gliu_node_list[j].address_from_cpu; } } } @@ -125,8 +125,8 @@ msr_init_table(void) /* ERROR OUT THE GEODELINK TABLES */ for (i = 0; i < 24; i++) { - gliu_nodes[i].address_from_cpu = 0xFFFFFFFF; - gliu_nodes[i].device_id = MSR_DEVICE_EMPTY; + gliu_node_list[i].address_from_cpu = 0xFFFFFFFF; + gliu_node_list[i].device_id = MSR_DEVICE_EMPTY; } for (i = 0; i < MSR_DEVICE_EMPTY; i++) { diff --git a/src/cim/cim_vg.c b/src/cim/cim_vg.c index 46984b5..a8a875b 100644 --- a/src/cim/cim_vg.c +++ b/src/cim/cim_vg.c @@ -1381,8 +1381,6 @@ vg_get_current_display_mode(VG_DISPLAY_MODE * current_display, int *bpp) /* Cimarron when returning the current mode information. */ if (vg3_panel_enable) { - Q_WORD msr_value; - flags |= VG_MODEFLAG_PANELOUT; current_display->panel_width = vg3_panel_width; @@ -2736,7 +2734,7 @@ vg_save_state(VG_SAVE_RESTORE * vg_state) int vg_restore_state(VG_SAVE_RESTORE * vg_state) { - unsigned long irqfilt, i; + unsigned long irqfilt, j; unsigned long memoffset; /* TEMPORARILY UNLOCK ALL REGISTERS */ @@ -2801,27 +2799,27 @@ vg_restore_state(VG_SAVE_RESTORE * vg_state) /* RESTORE THE PALETTE */ WRITE_REG32(DC3_PAL_ADDRESS, 0); - for (i = 0; i < 261; i++) - WRITE_REG32(DC3_PAL_DATA, vg_state->palette[i]); + for (j = 0; j < 261; j++) + WRITE_REG32(DC3_PAL_DATA, vg_state->palette[j]); /* RESTORE THE HORIZONTAL FILTER COEFFICIENTS */ irqfilt = READ_REG32(DC3_IRQ_FILT_CTL); irqfilt |= DC3_IRQFILT_H_FILT_SEL; - for (i = 0; i < 256; i++) { - WRITE_REG32(DC3_IRQ_FILT_CTL, ((irqfilt & 0xFFFFFF00L) | i)); - WRITE_REG32(DC3_FILT_COEFF1, vg_state->h_coeff[(i << 1)]); - WRITE_REG32(DC3_FILT_COEFF2, vg_state->h_coeff[(i << 1) + 1]); + for (j = 0; j < 256; j++) { + WRITE_REG32(DC3_IRQ_FILT_CTL, ((irqfilt & 0xFFFFFF00L) | j)); + WRITE_REG32(DC3_FILT_COEFF1, vg_state->h_coeff[(j << 1)]); + WRITE_REG32(DC3_FILT_COEFF2, vg_state->h_coeff[(j << 1) + 1]); } /* RESTORE VERTICAL COEFFICIENTS */ irqfilt &= ~DC3_IRQFILT_H_FILT_SEL; - for (i = 0; i < 256; i++) { - WRITE_REG32(DC3_IRQ_FILT_CTL, ((irqfilt & 0xFFFFFF00L) | i)); - WRITE_REG32(DC3_FILT_COEFF1, vg_state->v_coeff[i]); + for (j = 0; j < 256; j++) { + WRITE_REG32(DC3_IRQ_FILT_CTL, ((irqfilt & 0xFFFFFF00L) | j)); + WRITE_REG32(DC3_FILT_COEFF1, vg_state->v_coeff[j]); } /* RESTORE THE CURSOR DATA */ diff --git a/src/geode.h b/src/geode.h index 65f6f84..5e6d422 100644 --- a/src/geode.h +++ b/src/geode.h @@ -378,7 +378,7 @@ Bool RegionsEqual(RegionPtr A, RegionPtr B); void GeodeProbeDDC(ScrnInfoPtr pScrni, int index); xf86MonPtr GeodeDoDDC(ScrnInfoPtr pScrni, int index); -Bool GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name); +Bool GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, const char *name); int GeodeGetFPGeometry(const char *str, int *width, int *height); void GeodePointerMoved(ScrnInfoPtr pScrn, int x, int y); @@ -436,7 +436,7 @@ void LXSetupOutput(ScrnInfoPtr); /* lx_panel.c */ DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni); -DisplayModePtr LXGetManualPanelMode(char *modestr); +DisplayModePtr LXGetManualPanelMode(const char *modestr); void LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y); diff --git a/src/geode_ddc.c b/src/geode_ddc.c index 8227207..0a873c4 100644 --- a/src/geode_ddc.c +++ b/src/geode_ddc.c @@ -117,7 +117,7 @@ geode_ddc_getbits(I2CBusPtr b, int *scl, int *sda) } Bool -GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name) +GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, const char *name) { I2CBusPtr bus; unsigned int ddciobase; @@ -150,7 +150,7 @@ GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name) if (!bus) return FALSE; - bus->BusName = name; + bus->BusName = (char *)name; bus->scrnIndex = pScrni->scrnIndex; bus->I2CGetBits = geode_ddc_getbits; diff --git a/src/gfx/disp_gu2.c b/src/gfx/disp_gu2.c index 381b4ef..8bd89e9 100644 --- a/src/gfx/disp_gu2.c +++ b/src/gfx/disp_gu2.c @@ -1257,13 +1257,12 @@ void gfx_set_display_video_enable(int enable) #endif { - unsigned long lock, gcfg, dcfg; + unsigned long lock, gcfg; /* READ CURRENT VALUES */ lock = READ_REG32(MDC_UNLOCK); gcfg = READ_REG32(MDC_GENERAL_CFG); - dcfg = READ_REG32(MDC_DISPLAY_CFG); /* SET OR CLEAR VIDEO ENABLE IN GENERAL_CFG */ diff --git a/src/gx_accel.c b/src/gx_accel.c index 89c7486..8e68486 100644 --- a/src/gx_accel.c +++ b/src/gx_accel.c @@ -1482,7 +1482,7 @@ amd_gx_exa_UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pDst); - char *dst = pGeode->pExa->memoryBase + exaGetPixmapOffset(pDst); + unsigned char *dst = pGeode->pExa->memoryBase + exaGetPixmapOffset(pDst); int dst_pitch = exaGetPixmapPitch(pDst); int bpp = pDst->drawable.bitsPerPixel; @@ -1498,7 +1498,7 @@ amd_gx_exa_DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pSrc); - char *src = pGeode->pExa->memoryBase + exaGetPixmapOffset(pSrc); + unsigned char *src = pGeode->pExa->memoryBase + exaGetPixmapOffset(pSrc); int src_pitch = exaGetPixmapPitch(pSrc); int bpp = pSrc->drawable.bitsPerPixel; @@ -1734,10 +1734,9 @@ amd_gx_exa_PrepareComposite(int op, PicturePtr pSrc, PicturePtr pMsk, PixmapPtr pxDst) { int srcPitch; - if (!pxSrc || !pSrc->pDrawable) return FALSE; - - GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); amd_gx_exa_fmt_t *sfp, *dfp; + GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); + if (!pxSrc || !pSrc->pDrawable) return FALSE; //ErrorF("amd_gx_exa_PrepareComposite()\n"); diff --git a/src/gx_driver.c b/src/gx_driver.c index be1bd17..1850deb 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -403,7 +403,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) EntityInfoPtr pEnt; rgb defaultWeight = { 0, 0, 0 }; int modecnt; - char *s, *panelgeo; + const char *s, *panelgeo; Bool useVGA; if (pScrni->numEntities != 1) diff --git a/src/gx_video.c b/src/gx_video.c index 70c0410..7c0c162 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -105,8 +105,6 @@ void GXSetVideoPosition(int x, int y, int width, int height, short src_w, short src_h, short drw_w, short drw_h, int id, int offset, ScrnInfoPtr pScrni); -extern void GXAccelSync(ScrnInfoPtr pScrni); - extern int DeltaX, DeltaY; unsigned long graphics_lut[256]; @@ -224,11 +222,11 @@ static XF86VideoFormatRec Formats[NUM_FORMATS] = { static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { #if DBUF - {XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"}, + {XvSettable | XvGettable, 0, 1, (char *)"XV_DOUBLE_BUFFER"}, #endif - {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, - {XvSettable | XvGettable, 0, 1, "XV_FILTER"}, - {XvSettable | XvGettable, 0, 1, "XV_COLORKEYMODE"} + {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"}, + {XvSettable | XvGettable, 0, 1, (char *)"XV_FILTER"}, + {XvSettable | XvGettable, 0, 1, (char *)"XV_COLORKEYMODE"} }; #define NUM_IMAGES 8 @@ -759,11 +757,11 @@ GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) return 0; } -static BoxRec dstBox; +static BoxRec global_dstBox; static int srcPitch = 0, srcPitch2 = 0, dstPitch = 0, dstPitch2 = 0; static INT32 Bx1, Bx2, By1, By2; static int top, left, npixels, nlines; -static int offset, s1offset = 0, s2offset = 0, s3offset = 0; +static int global_offset, s1offset = 0, s2offset = 0, s3offset = 0; static unsigned char *dst_start; static int d2offset = 0, d3offset = 0; @@ -1074,15 +1072,15 @@ GXPutImage(ScrnInfoPtr pScrni, if ((Bx1 >= Bx2) || (By1 >= By2)) return Success; - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; + global_dstBox.x1 = drw_x; + global_dstBox.x2 = drw_x + drw_w; + global_dstBox.y1 = drw_y; + global_dstBox.y2 = drw_y + drw_h; - dstBox.x1 -= pScrni->frameX0; - dstBox.x2 -= pScrni->frameX0; - dstBox.y1 -= pScrni->frameY0; - dstBox.y2 -= pScrni->frameY0; + global_dstBox.x1 -= pScrni->frameX0; + global_dstBox.x2 -= pScrni->frameX0; + global_dstBox.y1 -= pScrni->frameY0; + global_dstBox.y2 -= pScrni->frameY0; switch (id) { case FOURCC_YV12: @@ -1138,13 +1136,13 @@ GXPutImage(ScrnInfoPtr pScrni, top &= ~1; - offset = pPriv->offset + (top * dstPitch); + global_offset = pPriv->offset + (top * dstPitch); #if DBUF if (pPriv->doubleBuffer && pPriv->currentBuffer) - offset += (new_h >> 1) * pGeode->Pitch; + global_offset += (new_h >> 1) * pGeode->Pitch; #endif - dst_start = pGeode->FBBase + offset + left; + dst_start = pGeode->FBBase + global_offset + left; tmp = ((top >> 1) * srcPitch2) + (left >> 1); s2offset += tmp; s3offset += tmp; @@ -1164,13 +1162,13 @@ GXPutImage(ScrnInfoPtr pScrni, left <<= 1; buf += (top * srcPitch) + left; nlines = By2 - top; - offset = (pPriv->offset) + (top * dstPitch); + global_offset = (pPriv->offset) + (top * dstPitch); #if DBUF if (pPriv->doubleBuffer && pPriv->currentBuffer) - offset += (new_h >> 1) * pGeode->Pitch; + global_offset += (new_h >> 1) * pGeode->Pitch; #endif - dst_start = pGeode->FBBase + offset + left; + dst_start = pGeode->FBBase + global_offset + left; break; } s1offset = (top * srcPitch) + left; @@ -1182,8 +1180,8 @@ GXPutImage(ScrnInfoPtr pScrni, xf86XVFillKeyHelper(pScrni->pScreen, pPriv->colorKey, clipBoxes); } - GXDisplayVideo(pScrni, id, offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); + GXDisplayVideo(pScrni, id, global_offset, width, height, dstPitch, + Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, drw_h); } #endif switch (id) { @@ -1216,8 +1214,8 @@ GXPutImage(ScrnInfoPtr pScrni, REGION_NUM_RECTS(clipBoxes), REGION_RECTS(clipBoxes)); } - GXDisplayVideo(pScrni, id, offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); + GXDisplayVideo(pScrni, id, global_offset, width, height, dstPitch, + Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, drw_h); #endif #if XV_PROFILE @@ -1400,7 +1398,7 @@ GXAllocateSurface(ScrnInfoPtr pScrni, fbpitch = pScrni->bitsPerPixel * pScrni->displayWidth >> 3; numlines = ((pitch * h) + fbpitch - 1) / fbpitch; - if (!(offset = GXAllocateMemory(pScrni, &area, numlines))) + if (!(global_offset = GXAllocateMemory(pScrni, &area, numlines))) return BadAlloc; surface->width = w; @@ -1421,14 +1419,14 @@ GXAllocateSurface(ScrnInfoPtr pScrni, } pPriv->area = area; - pPriv->offset = offset; + pPriv->offset = global_offset; pPriv->isOn = FALSE; surface->pScrn = pScrni; surface->id = id; surface->pitches[0] = pitch; - surface->offsets[0] = offset; + surface->offsets[0] = global_offset; surface->devPrivate.ptr = (pointer) pPriv; return Success; diff --git a/src/lx_driver.c b/src/lx_driver.c index 29d8948..5ab88db 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -306,7 +306,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) EntityInfoPtr pEnt; OptionInfoRec *GeodeOptions = &LX_GeodeOptions[0]; rgb defaultWeight = { 0, 0, 0 }; - char *s; + const char *s; if (pScrni->numEntities != 1) return FALSE; @@ -469,7 +469,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON; } else if (pGeode->Output & OUTPUT_PANEL) { - char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); + const char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); if (pmode != NULL) pGeode->panelMode = LXGetManualPanelMode(pmode); diff --git a/src/lx_output.c b/src/lx_output.c index 4cd5b64..fbe21ab 100644 --- a/src/lx_output.c +++ b/src/lx_output.c @@ -47,7 +47,7 @@ static void lx_create_resources(xf86OutputPtr output) { int ret; - char *s; + const char *s; ScrnInfoPtr pScrni = output->scrn; GeodeRec *pGeode = GEODEPTR(pScrni); diff --git a/src/lx_panel.c b/src/lx_panel.c index 8dfd68c..4a304a9 100644 --- a/src/lx_panel.c +++ b/src/lx_panel.c @@ -110,7 +110,7 @@ LXGetLegacyPanelMode(ScrnInfoPtr pScrni) /* Construct a moderec from the specified panel mode */ DisplayModePtr -LXGetManualPanelMode(char *modestr) +LXGetManualPanelMode(const char *modestr) { int clock; int hactive, hsstart, hsend, htotal; @@ -133,8 +133,8 @@ LXGetManualPanelMode(char *modestr) sprintf(sname, "%dx%d", hactive, vactive); - mode->name = XNFalloc(strlen(sname) + 1); - strcpy(mode->name, sname); + mode->name = (char *)XNFalloc(strlen(sname) + 1); + strcpy((char *)mode->name, sname); mode->type = M_T_DRIVER | M_T_PREFERRED; mode->Clock = clock; diff --git a/src/lx_video.c b/src/lx_video.c index f3bcf4a..a941557 100644 --- a/src/lx_video.c +++ b/src/lx_video.c @@ -84,9 +84,9 @@ static XF86VideoFormatRec Formats[] = { }; static XF86AttributeRec Attributes[] = { - {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, - {XvSettable | XvGettable, 0, 1, "XV_FILTER"}, - {XvSettable | XvGettable, 0, 1, "XV_COLORKEYMODE"} + {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"}, + {XvSettable | XvGettable, 0, 1, (char *)"XV_FILTER"}, + {XvSettable | XvGettable, 0, 1, (char *)"XV_COLORKEYMODE"} }; static XF86ImageRec Images[] = { diff --git a/src/panel/cen9211.c b/src/panel/cen9211.c index d9cbc42..7a36a56 100644 --- a/src/panel/cen9211.c +++ b/src/panel/cen9211.c @@ -730,11 +730,9 @@ CentaurusProgramFRMload(void) }; unsigned char i; - unsigned short index; unsigned long data; Centaurus_write_gpio(FOUR_BYTES, CS92xx_FRM_MEMORY_INDEX, 0); - index = CS92xx_FRM_MEMORY_DATA; for (i = 0; i < 64; i += 2) { data = CentaurusFRMtable[i]; Centaurus_write_gpio(FOUR_BYTES, CS92xx_FRM_MEMORY_DATA, data); diff --git a/src/panel/platform.c b/src/panel/platform.c index 3e5afe3..812e762 100644 --- a/src/panel/platform.c +++ b/src/panel/platform.c @@ -68,7 +68,7 @@ SYS_BOARD_INFO Sys_board_info_array[] = { static int Num_sys_board_type = NUM_SYS_BOARD_TYPES; SYS_BOARD_INFO *Sys_board_array_base = Sys_board_info_array; -int FindStringInSeg(unsigned int, char *); +int FindStringInSeg(unsigned int, const char *); static unsigned char get_sys_board_type(SYS_BOARD_INFO *, SYS_BOARD_INFO *); /* Detect the Platform */ @@ -81,7 +81,7 @@ Detect_Platform(void) } static int -Strncmp(char *str1, char *str2, int len) +Strncmp(const char *str1, char *str2, int len) { int i; @@ -99,7 +99,7 @@ Strncmp(char *str1, char *str2, int len) } static char * -Strcpy(char *dst, char *src) +Strcpy(char *dst, const char *src) { int i; @@ -113,7 +113,7 @@ Strcpy(char *dst, char *src) } static int -Strlen(char *str) +Strlen(const char *str) { int i; @@ -135,7 +135,7 @@ Strlen(char *str) ************************************************************************ */ int -FindStringInSeg(unsigned int segment_address, char *string_ptr) +FindStringInSeg(unsigned int segment_address, const char *string_ptr) { int string_length = Strlen(string_ptr); char *psegment_buf; @@ -186,7 +186,7 @@ get_sys_board_type(SYS_BOARD_INFO * sys_info, SYS_BOARD_INFO * sys_board_array_base) { int index; - char *xpress_rom_string_ptr = "XpressStart"; + const char *xpress_rom_string_ptr = "XpressStart"; unsigned int segment = LINUX_ROM_SEGMENT; /* See if XpressStart is present in the BIOS area. diff --git a/src/z4l.c b/src/z4l.c index e5fe729..a20470e 100644 --- a/src/z4l.c +++ b/src/z4l.c @@ -83,7 +83,7 @@ int debuglvl = 0; #define MAX_OVLY_WIDTH 2048 #define MAX_OVLY_HEIGHT 2048 -static char *z4l_dev_paths[] = { +static const char *z4l_dev_paths[] = { "/dev/videox", NULL }; @@ -579,7 +579,7 @@ static int z4l_ovly_set_encoding(Z4lPortPrivRec * pPriv, int id) { int l, n, inp; - char *cp; + const char *cp; t_std_data *sp; XF86VideoEncodingPtr enc; XF86VideoAdaptorPtr adpt; @@ -992,7 +992,7 @@ Z4lEncodingName(char *ename, int l, char *inp_name, char *std_name, char *fmt) } static int -Z4lAddEncoding(XF86VideoEncodingPtr enc, char *name, int id, int width, +Z4lAddEncoding(XF86VideoEncodingPtr enc, const char *name, int id, int width, int height, int numer, int denom, int inp, v4l2_std_id std, unsigned int fmt) { @@ -1314,7 +1314,8 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) XF86VideoEncodingPtr encs, enc; XF86ImagePtr ip, img, imgs; Z4lPortPrivRec *pPriv; - char *dp, *msg; + char *dp; + const char *msg; char enc_name[256], attr_name[256]; int attrIds[V4L2_CID_LASTP1 - V4L2_CID_BASE + ATTR_MAX_ID]; struct v4l2_capability capability; @@ -1499,7 +1500,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; Z4lAttributeName(&attr_name[0], sizeof(attr_name), - (char *) &queryctrl.name[0]); + (char *)&queryctrl.name[0]); if (Z4lAddAttribute(attr, &attr_name[0], queryctrl.minimum, queryctrl.maximum, XvSettable | XvGettable) == 0) @@ -1508,7 +1509,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) attrIds[nattrs] = ATTR_ENCODING_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_ENCODING); + Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_ENCODING); if (Z4lAddAttribute(attr, &attr_name[0], 0, nencs - 1, XvSettable | XvGettable) == 0) goto fail; @@ -1521,14 +1522,14 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) attrIds[nattrs] = ATTR_KEYMODE_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_KEYMODE); + Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_KEYMODE); if (Z4lAddAttribute(attr, &attr_name[0], 0, 1, XvSettable | XvGettable) == 0) goto fail; attrIds[nattrs] = ATTR_COLORKEY_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_COLORKEY); + Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_COLORKEY); if (Z4lAddAttribute(attr, &attr_name[0], 0, 0xffffff, XvSettable | XvGettable) == 0) goto fail; @@ -1613,7 +1614,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if (encs != NULL) { for (i = 0; i < nencs; ++i) { if (encs[i].name != NULL) - free(encs[i].name); + free((char *)encs[i].name); } free(encs); } @@ -1625,7 +1626,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) for (i = 0; i < nadpts; ++i) { if ((adpt = adpts[i]) != NULL) { if (adpt->name != NULL) - free(adpt->name); + free((char *)adpt->name); if ((attrs = adpt->pAttributes) != NULL) { for (i = 0; i < adpt->nAttributes; ++i) if (attrs[i].name != NULL) @@ -1635,7 +1636,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if ((encs = adpt->pEncodings) != NULL) { for (i = 0; i < adpt->nEncodings; ++i, ++enc) if (encs[i].name != NULL) - free(encs[i].name); + free((char *)encs[i].name); free(encs); } if ((imgs = adpt->pImages) != NULL) -- cgit v1.2.3 From fc81b029c9a3eab94f6985640d6c629ae70cf112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin-=C3=89ric=20Racine?= Date: Mon, 24 Jun 2024 19:44:50 +0300 Subject: [LX] Make xf86SetDepthBpp use the Xserver defaults. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin-Éric Racine --- src/lx_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lx_driver.c b/src/lx_driver.c index 5ab88db..0d43096 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -354,7 +354,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) /* Fill in the monitor information */ pScrni->monitor = pScrni->confScreen->monitor; - if (!xf86SetDepthBpp(pScrni, 24, 24, 24, Support24bppFb | Support32bppFb)) + if (!xf86SetDepthBpp(pScrni, 0, 0, 0, Support24bppFb | Support32bppFb)) return FALSE; switch (pScrni->depth) { -- cgit v1.2.3 From c1a96d05ef0f76e933a8c002c75f548de8c2f14b Mon Sep 17 00:00:00 2001 From: Connor Behan Date: Sun, 23 Jun 2024 02:05:29 -0300 Subject: Fix exaOffscreenFree call --- src/gx_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gx_video.c b/src/gx_video.c index 7c0c162..4cc2836 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -1346,7 +1346,7 @@ GXBlockHandler(BLOCKHANDLER_ARGS_DECL) if (pPriv->area) { #ifdef XF86EXA if (pGeode->useEXA) - exaOffscreenFree(pScrni, pPriv->area); + exaOffscreenFree(pScrni->pScreen, pPriv->area); #endif if (!pGeode->useEXA) xf86FreeOffscreenArea(pPriv->area); -- cgit v1.2.3 From 7047b6da264e946e77eeee4080d194c807562d68 Mon Sep 17 00:00:00 2001 From: Connor Behan Date: Sun, 23 Jun 2024 22:22:43 -0300 Subject: Remove deprecated function and includes Long ago, xf86_reload_cursors() was turned into a noop. And we were not using anything specific from xf86PciInfo.h. Signed-off-by: Connor Behan --- src/lx_display.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/lx_display.c b/src/lx_display.c index 7816b94..8ee6443 100644 --- a/src/lx_display.c +++ b/src/lx_display.c @@ -324,7 +324,6 @@ lx_crtc_commit(xf86CrtcPtr crtc) /* Load the cursor */ if (crtc->scrn->pScreen != NULL) { - xf86_reload_cursors(crtc->scrn->pScreen); crtc->funcs->hide_cursor(crtc); crtc->cursor_shown = FALSE; } -- cgit v1.2.3