Module Name: xsrc
Committed By: mrg
Date: Mon Jun 19 09:06:01 UTC 2023
Modified Files:
xsrc/external/mit/xf86-video-geode/dist/src: geode.h geode_driver.c
gx_accel.c gx_cursor.c gx_driver.c gx_video.c lx_display.c
lx_driver.c lx_exa.c lx_memory.c
xsrc/external/mit/xf86-video-i128/dist/src: i128_driver.c
xsrc/external/mit/xf86-video-savage/dist/src: savage_dga.c savage_dri.c
savage_driver.c savage_driver.h
Removed Files:
xsrc/external/mit/xf86-video-savage/dist: README
Log Message:
merge xf86-video-geode 2.11.21, xf86-video-i128 1.4.1,
xf86-video-neomagic 1.3.1, and xf86-video-savage 2.4.0.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xf86-video-geode/dist/src/geode.h \
xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c \
xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c \
xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c \
xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xf86-video-savage/dist/README
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-geode/dist/src/geode.h
diff -u xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.7 xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.8
--- xsrc/external/mit/xf86-video-geode/dist/src/geode.h:1.7 Mon May 31 21:44:19 2021
+++ xsrc/external/mit/xf86-video-geode/dist/src/geode.h Mon Jun 19 09:06:01 2023
@@ -215,7 +215,7 @@ typedef struct _geodeRec {
unsigned long CursorStartOffset;
int Pitch; /* display FB pitch */
- int displaySize; /* The size of the visibile area */
+ int displaySize; /* The size of the visible area */
ExaOffscreenArea *shadowArea;
@@ -285,7 +285,7 @@ typedef struct _geodeRec {
int PanelX;
int PanelY;
- int displayPitch; /* The pitch ofthe visible area */
+ int displayPitch; /* The pitch of the visible area */
int displayOffset; /* The offset of the visible area */
DisplayModePtr curMode;
@@ -361,7 +361,7 @@ enum LX_GeodeOpts {
#endif
#ifdef HAVE_GX
-typedef enum {
+enum GX_GeodeOpts {
GX_OPTION_SW_CURSOR,
GX_OPTION_HW_CURSOR,
GX_OPTION_NOCOMPRESSION,
@@ -378,7 +378,7 @@ typedef enum {
GX_OPTION_FBSIZE,
GX_OPTION_PANEL_GEOMETRY,
GX_OPTION_DONT_PROGRAM
-} GX_GeodeOpts;
+};
#endif
/* geode_dcon.c */
Index: xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c:1.7 xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c:1.8
--- xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c:1.7 Mon May 31 21:44:19 2021
+++ xsrc/external/mit/xf86-video-geode/dist/src/lx_driver.c Mon Jun 19 09:06:01 2023
@@ -427,7 +427,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
(int *) &(pGeode->FBAvail)))
pGeode->FBAvail = 0;
- /* For compatability - allow SWCursor too */
+ /* For compatibility - allow SWCursor too */
if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_SW_CURSOR, FALSE))
pGeode->tryHWCursor = FALSE;
Index: xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c:1.2 xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c:1.3
--- xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c:1.2 Tue May 30 15:54:38 2017
+++ xsrc/external/mit/xf86-video-geode/dist/src/geode_driver.c Mon Jun 19 09:06:01 2023
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Avanced Micro Devices, Inc.
+ * Copyright (c) 2006 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -416,7 +416,7 @@ AmdPciProbe(DriverPtr driver,
*
* Comments :This should be minimal probe and it should under no
* circumstances change the state of the hardware.Don't do
- * any intiallizations other than the required
+ * any initializations other than the required
* ScreenInforec.
*----------------------------------------------------------------------------
*/
Index: xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c:1.2 xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c:1.3
--- xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c:1.2 Tue May 30 15:54:38 2017
+++ xsrc/external/mit/xf86-video-geode/dist/src/gx_cursor.c Mon Jun 19 09:06:01 2023
@@ -76,15 +76,15 @@ GXHWCursorInit(ScreenPtr pScrn)
infoPtr = xf86CreateCursorInfoRec();
if (!infoPtr)
return FALSE;
- /* the geode structure is intiallized with the cursor infoRec */
+ /* the geode structure is initialized with the cursor infoRec */
pGeode->CursorInfo = infoPtr;
infoPtr->MaxWidth = 32;
infoPtr->MaxHeight = 32;
- /* seeting up the cursor flags */
+ /* setting up the cursor flags */
infoPtr->Flags = HARDWARE_CURSOR_BIT_ORDER_MSBFIRST |
HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED;
- /* cursor info ptr is intiallized with the values obtained from
+ /* cursor info ptr is initialized with the values obtained from
* * durnago calls
*/
infoPtr->SetCursorColors = GXSetCursorColors;
@@ -127,7 +127,7 @@ GXSetCursorColors(ScrnInfoPtr pScrni, in
* Parameters:
* pScrn: Screeen pointer structure.
* x: Specifies the x-cordinates of the cursor.
- * y: Specifies the y co-ordinate of the cursor.
+ * y: Specifies the y coordinate of the cursor.
*
* Returns: none.
*
Index: xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c:1.2 xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c:1.3
--- xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c:1.2 Tue May 30 15:54:38 2017
+++ xsrc/external/mit/xf86-video-geode/dist/src/lx_memory.c Mon Jun 19 09:06:01 2023
@@ -263,7 +263,7 @@ LXInitOffscreen(ScrnInfoPtr pScrni)
if (ptr == NULL) {
/* If we couldn't allocate what we wanted,
- * then allocate whats left */
+ * then allocate what's left */
ptr = GeodeAllocRemainder(pGeode);
}
Index: xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c:1.5 xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c:1.6
--- xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c:1.5 Tue May 30 15:54:38 2017
+++ xsrc/external/mit/xf86-video-geode/dist/src/gx_accel.c Mon Jun 19 09:06:01 2023
@@ -1160,7 +1160,7 @@ GXSubsequentSolidBresenhamLine(ScrnInfoP
* y0 int destination y start offset
* x1 int destination x end offset
* y1 int destination y end offset
- * flags int OMIT_LAST, dont draw last pixel (not used)
+ * flags int OMIT_LAST, don't draw last pixel (not used)
*
* Returns :none
*---------------------------------------------------------------------------*/
@@ -1321,9 +1321,9 @@ GXSetupForDashedLine(ScrnInfoPtr pScrn,
* Parameters:
* pScrni: Screen handler pointer having screen information.
* x1: Specifies the starting x position
- * y1: Specifies starting y possition
- * absmaj: Specfies the Bresenman absolute major.
- * absmin: Specfies the Bresenman absolute minor.
+ * y1: Specifies starting y position
+ * absmaj: Specifies the Bresenman absolute major.
+ * absmin: Specifies the Bresenman absolute minor.
* err: Specifies the bresenham err term.
* len: Specifies the length of the vector interms of pixels.
* octant: not used in this function,may be added for standard
@@ -1378,7 +1378,7 @@ GXSubsequentDashedBresenhamLine(ScrnInfo
* y0 int destination y start offset
* x1 int destination x end offset
* y1 int destination y end offset
- * flags int OMIT_LAST, dont draw last pixel (not used)
+ * flags int OMIT_LAST, don't draw last pixel (not used)
* phase int initial pattern offset at x1,y1
*
* Returns :none
Index: xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.6 xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.7
--- xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.6 Sun Feb 23 06:33:19 2020
+++ xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c Mon Jun 19 09:06:01 2023
@@ -80,7 +80,7 @@
extern OptionInfoRec GX_GeodeOptions[];
-unsigned char *XpressROMPtr;
+extern unsigned char *XpressROMPtr;
static inline void
gx_enable_dac_power(void)
@@ -271,7 +271,7 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnIn
RegionRec OffscreenRegion;
BoxRec AvailBox;
- /* Assume the shadow FB exists even if it doesnt */
+ /* Assume the shadow FB exists even if it doesn't */
if (pGeode->shadowSize == 0) {
size = (pScrn->width * bytpp) * pScrni->virtualX;
@@ -566,7 +566,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
(int *) &(pGeode->FBAvail)))
pGeode->FBAvail = 0;
- /* For compatability - allow SWCursor too */
+ /* For compatibility - allow SWCursor too */
if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_SW_CURSOR, FALSE))
pGeode->tryHWCursor = FALSE;
@@ -622,7 +622,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->useEXA = FALSE;
else if (xf86NameCmp(s, "EXA"))
xf86DrvMsg(pScrni->scrnIndex, X_ERROR,
- "Unknown accleration method %s. Defaulting to XAA.\n",
+ "Unknown acceleration method %s. Defaulting to XAA.\n",
s);
#elif defined(XF86EXA)
pGeode->useEXA = TRUE;
@@ -1137,7 +1137,7 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInf
}
/* Set up the memory */
- /* XXX - FIXME - when we alow inital rotation, it should be here */
+ /* XXX - FIXME - when we allow initial rotation, it should be here */
GXAllocateMemory(pScrn, pScrni, pGeode->rotation);
/* Clear the framebuffer */
@@ -1637,7 +1637,7 @@ GeodeCalculatePitchBytes(unsigned int wi
if (width < 640)
delta <<= 1;
- /* Calculate the pitch (compression rquires a power of 2) */
+ /* Calculate the pitch (compression requires a power of 2) */
if (delta > 4096)
delta = 8192;
Index: xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c:1.3 xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c:1.4
--- xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c:1.3 Mon May 31 21:44:19 2021
+++ xsrc/external/mit/xf86-video-geode/dist/src/gx_video.c Mon Jun 19 09:06:01 2023
@@ -273,7 +273,7 @@ typedef struct {
/*----------------------------------------------------------------------------
* GXSetColorKey
*
- * Description :This function reads the color key for the pallete and
+ * Description :This function reads the color key for the palette and
* sets the video color key register.
*
* Parameters.
@@ -516,7 +516,7 @@ GXStopVideo(ScrnInfoPtr pScrni, pointer
* attribute :The port attribute to be set
* value :Value of the attribute to be set.
*
- * Returns :Sucess if the attribute is supported, else BadMatch
+ * Returns :Success if the attribute is supported, else BadMatch
*
* Comments :none
*----------------------------------------------------------------------------
@@ -566,7 +566,7 @@ GXSetPortAttribute(ScrnInfoPtr pScrni,
* attribute :The port attribute to be read
* value :Pointer to the value of the attribute to be read.
*
- * Returns :Sucess if the attribute is supported, else BadMatch
+ * Returns :Success if the attribute is supported, else BadMatch
*
* Comments :none
*----------------------------------------------------------------------------
Index: xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c:1.3 xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c:1.4
--- xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c:1.3 Tue Jan 1 00:34:52 2019
+++ xsrc/external/mit/xf86-video-geode/dist/src/lx_display.c Mon Jun 19 09:06:01 2023
@@ -299,7 +299,7 @@ lx_crtc_mode_set(xf86CrtcPtr crtc, Displ
else
vg_set_display_offset(0);
- /* FIXME: Whats up with X and Y? Does that come into play
+ /* FIXME: What's up with X and Y? Does that come into play
* here? */
df_configure_video_source(&vs_odd, &vs_even);
Index: xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c:1.4 xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c:1.5
--- xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c:1.4 Tue May 30 15:54:38 2017
+++ xsrc/external/mit/xf86-video-geode/dist/src/lx_exa.c Mon Jun 19 09:06:01 2023
@@ -1138,7 +1138,7 @@ lx_do_composite_mask_two_pass(PixmapPtr
/* The rendering region should not be bigger than off-screen memory size
* which equals to DEFAULT_EXA_SCRATCH_BFRSZ. If that happens, we split
* the PictOpOver rendering region into several 256KB chunks. And because
- * of the Pitch(stride) parameter, so we use maximun width of mask picture.
+ * of the Pitch(stride) parameter, so we use maximum width of mask picture.
* that is to say it is a scanline rendering process */
if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) {
opWidth = width;
Index: xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c
diff -u xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c:1.4 xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c:1.5
--- xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c:1.4 Sat Dec 29 06:46:43 2018
+++ xsrc/external/mit/xf86-video-i128/dist/src/i128_driver.c Mon Jun 19 09:06:01 2023
@@ -115,7 +115,7 @@ static unsigned int I128DDC1Read(ScrnInf
/*
* This contains the functions needed by the server after loading the
* driver module. It must be supplied, and gets added the driver list by
- * the Module Setup funtion in the dynamic case. In the static case a
+ * the Module Setup function in the dynamic case. In the static case a
* reference to this is compiled in, and this requires that the name of
* this DriverRec be an upper-case version of the driver name.
*/
@@ -151,7 +151,7 @@ static XF86ModuleVersionInfo i128VersRec
/*
* XF86ModuleData structure is the first part of the driver that is used
* by the module loader. It provides the XF86ModuleVersionInfo structure
- * used to verify that the module version is compatable with the loader
+ * used to verify that the module version is compatible with the loader
* version. It also provides a pointer to the module specific
* ModuleSetupProc() and ModuleTearDownProc() functions.
*/
@@ -439,7 +439,7 @@ I128PreInit(ScrnInfoPtr pScrn, int flags
ClockRangePtr clockRanges;
MessageType from;
unsigned long iobase;
- char *ramdac = NULL;
+ const char *ramdac = NULL;
CARD32 tmpl, tmph, tmp;
unsigned char n, m, p, mdc, df;
float mclk;
Index: xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c
diff -u xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c:1.3 xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c:1.4
--- xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c:1.3 Mon Jun 3 08:50:48 2013
+++ xsrc/external/mit/xf86-video-savage/dist/src/savage_dga.c Mon Jun 19 09:06:01 2023
@@ -301,7 +301,7 @@ Savage_SetMode(
if( psav->hwcursor && psav->hwc_on) {
SavageHideCursor(pScrn);
- psav->hwc_on = TRUE; /* save for later restauration */
+ psav->hwc_on = TRUE; /* save for later restoration */
}
Index: xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c
diff -u xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c:1.5 xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c:1.6
--- xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c:1.5 Mon Jul 20 00:10:28 2015
+++ xsrc/external/mit/xf86-video-savage/dist/src/savage_dri.c Mon Jun 19 09:06:01 2023
@@ -50,28 +50,10 @@
#include "savage_common.h"
#define _XF86DRI_SERVER_
-#include "GL/glxtokens.h"
#include "sarea.h"
#include "savage_dri.h"
#include "savage_sarea.h"
-static struct {
- int bpp;
- int redSize;
- int greenSize;
- int blueSize;
- int alphaSize;
- int redMask;
- int greenMask;
- int blueMask;
- int alphaMask;
- int depthSize;
-} SAVAGEVisuals[] = {
- { 16, 5, 6, 5, 0, 0x0000F800, 0x000007E0, 0x0000001F, 0, 16 },
- { 32, 8, 8, 8, 0, 0x00FF0000, 0x0000FF00, 0x000000FF, 0, 24 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-};
-
static char SAVAGEKernelDriverName[] = "savage";
static char SAVAGEClientDriverName[] = "savage";
@@ -98,149 +80,6 @@ SAVAGEDRISubsequentScreenToScreenCopy(
ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2,
int w, int h);
-
-/* Initialize the visual configs that are supported by the hardware.
- * These are combined with the visual configs that the indirect
- * rendering core supports, and the intersection is exported to the
- * client.
- */
-static Bool SAVAGEInitVisualConfigs( ScreenPtr pScreen )
-{
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- SavagePtr psav = SAVPTR(pScrn);
- int numConfigs = 0;
- __GLXvisualConfig *pConfigs = 0;
- SAVAGEConfigPrivPtr pSAVAGEConfigs = 0;
- SAVAGEConfigPrivPtr *pSAVAGEConfigPtrs = 0;
- int i, db, stencil, accum, visNum;
-
- switch ( pScrn->bitsPerPixel ) {
- case 8:
- case 24:
- break;
-
- case 16:
- case 32:
- numConfigs = 8;
-
- pConfigs = (__GLXvisualConfig*)calloc( sizeof(__GLXvisualConfig),
- numConfigs );
- if ( !pConfigs ) {
- return FALSE;
- }
-
- pSAVAGEConfigs = (SAVAGEConfigPrivPtr)calloc( sizeof(SAVAGEConfigPrivRec),
- numConfigs );
- if ( !pSAVAGEConfigs ) {
- free( pConfigs );
- return FALSE;
- }
-
- pSAVAGEConfigPtrs = (SAVAGEConfigPrivPtr*)calloc( sizeof(SAVAGEConfigPrivPtr),
- numConfigs );
- if ( !pSAVAGEConfigPtrs ) {
- free( pConfigs );
- free( pSAVAGEConfigs );
- return FALSE;
- }
-
- for ( i = 0 ; i < numConfigs ; i++ ) {
- pSAVAGEConfigPtrs[i] = &pSAVAGEConfigs[i];
- }
-
- for (visNum = 0; SAVAGEVisuals[visNum].bpp != 0; visNum++) {
- if ( SAVAGEVisuals[visNum].bpp == pScrn->bitsPerPixel )
- break;
- }
- if ( SAVAGEVisuals[visNum].bpp == 0 ) {
- free( pConfigs );
- free( pSAVAGEConfigs );
- return FALSE;
- }
-
- i = 0;
- for ( accum = 0 ; accum <= 1 ; accum++ ) {
- for ( stencil = 0 ; stencil <= 1 ; stencil++ ) {
- for ( db = 1 ; db >= 0 ; db-- ) {
- pConfigs[i].vid = -1;
- pConfigs[i].class = -1;
- pConfigs[i].rgba = TRUE;
- pConfigs[i].redSize = SAVAGEVisuals[visNum].redSize;
- pConfigs[i].greenSize = SAVAGEVisuals[visNum].greenSize;
- pConfigs[i].blueSize = SAVAGEVisuals[visNum].blueSize;
- pConfigs[i].alphaSize = SAVAGEVisuals[visNum].alphaSize;
- pConfigs[i].redMask = SAVAGEVisuals[visNum].redMask;
- pConfigs[i].greenMask = SAVAGEVisuals[visNum].greenMask;
- pConfigs[i].blueMask = SAVAGEVisuals[visNum].blueMask;
- pConfigs[i].alphaMask = SAVAGEVisuals[visNum].alphaMask;
-
- if ( accum ) {
- pConfigs[i].accumRedSize = 16;
- pConfigs[i].accumGreenSize = 16;
- pConfigs[i].accumBlueSize = 16;
- pConfigs[i].accumAlphaSize = 0;
- } else {
- pConfigs[i].accumRedSize = 0;
- pConfigs[i].accumGreenSize = 0;
- pConfigs[i].accumBlueSize = 0;
- pConfigs[i].accumAlphaSize = 0;
- }
- if ( db ) {
- pConfigs[i].doubleBuffer = TRUE;
- } else {
- pConfigs[i].doubleBuffer = FALSE;
- }
- pConfigs[i].stereo = FALSE;
- pConfigs[i].bufferSize = pScrn->bitsPerPixel;
- pConfigs[i].depthSize = SAVAGEVisuals[visNum].depthSize;
- if ( stencil ) {
- pConfigs[i].stencilSize = 8;
- } else {
- pConfigs[i].stencilSize = 0;
- }
-
- pConfigs[i].auxBuffers = 0;
- pConfigs[i].level = 0;
-
- pConfigs[i].visualRating = GLX_NONE;
- if ( pScrn->bitsPerPixel == 16 ) {
- if ( accum || stencil ) {
- pConfigs[i].visualRating = GLX_SLOW_CONFIG;
- }
- } else if ( accum ) {
- pConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
- }
- pConfigs[i].transparentPixel = GLX_NONE;
- pConfigs[i].transparentRed = 0;
- pConfigs[i].transparentGreen = 0;
- pConfigs[i].transparentBlue = 0;
- pConfigs[i].transparentAlpha = 0;
- pConfigs[i].transparentIndex = 0;
- i++;
- }
- }
- }
- if ( i != numConfigs ) {
- xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
- "[drm] Incorrect initialization of visuals\n" );
- return FALSE;
- }
- break;
-
- default:
- /* Unexpected bits/pixels */
- break;
- }
-
- psav->numVisualConfigs = numConfigs;
- psav->pVisualConfigs = pConfigs;
- psav->pVisualConfigsPriv = pSAVAGEConfigs;
-
- GlxSetVisualConfigs( numConfigs, pConfigs, (void **)pSAVAGEConfigPtrs );
-
- return TRUE;
-}
-
static Bool SAVAGECreateContext( ScreenPtr pScreen, VisualPtr visual,
drm_context_t hwContext, void *pVisualConfigPriv,
DRIContextType contextStore )
@@ -799,10 +638,9 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScr
SAVAGEDRIPtr pSAVAGEDRI;
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer;
- /* Check that the GLX, DRI, and DRM modules have been loaded by testing
+ /* Check that the DRI, and DRM modules have been loaded by testing
* for canonical symbols in each module.
*/
- if ( !xf86LoaderCheckSymbol( "GlxSetVisualConfigs" ) ) return FALSE;
if ( !xf86LoaderCheckSymbol( "drmAvailable" ) ) return FALSE;
if ( !xf86LoaderCheckSymbol( "DRIQueryVersion" ) ) {
xf86DrvMsg( pScreen->myNum, X_ERROR,
@@ -895,8 +733,8 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScr
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
"[drm] Sarea %d+%d: %d\n",
- sizeof(XF86DRISAREARec), sizeof(SAVAGESAREAPrivRec),
- sizeof(XF86DRISAREARec) + sizeof(SAVAGESAREAPrivRec) );
+ (int) sizeof(XF86DRISAREARec), (int) sizeof(SAVAGESAREAPrivRec),
+ (int) (sizeof(XF86DRISAREARec) + sizeof(SAVAGESAREAPrivRec)) );
pDRIInfo->SAREASize = SAREA_MAX;
@@ -1013,10 +851,6 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScr
return FALSE;
}
- if ( !SAVAGEInitVisualConfigs( pScreen ) ) {
- SAVAGEDRICloseScreen( pScreen );
- return FALSE;
- }
xf86DrvMsg( pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized\n" );
return TRUE;
@@ -1333,12 +1167,6 @@ void SAVAGEDRICloseScreen( ScreenPtr pSc
free( psav->DRIServerInfo );
psav->DRIServerInfo = 0;
}
- if ( psav->pVisualConfigs ) {
- free( psav->pVisualConfigs );
- }
- if ( psav->pVisualConfigsPriv ) {
- free( psav->pVisualConfigsPriv );
- }
}
void
Index: xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c
diff -u xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c:1.4 xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c:1.5
--- xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c:1.4 Mon Aug 1 22:23:35 2022
+++ xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.c Mon Jun 19 09:06:01 2023
@@ -110,17 +110,18 @@ static Bool SavageModeInit(ScrnInfoPtr p
static Bool SavageCloseScreen(CLOSE_SCREEN_ARGS_DECL);
static Bool SavageSaveScreen(ScreenPtr pScreen, int mode);
static void SavageLoadPalette(ScrnInfoPtr pScrn, int numColors,
- int *indicies, LOCO *colors,
+ int *indices, LOCO *colors,
VisualPtr pVisual);
static void SavageLoadPaletteSavage4(ScrnInfoPtr pScrn, int numColors,
- int *indicies, LOCO *colors,
+ int *indices, LOCO *colors,
VisualPtr pVisual);
static void SavageUpdateKey(ScrnInfoPtr pScrn, int r, int g, int b);
static void SavageCalcClock(long freq, int min_m, int min_n1, int max_n1,
int min_n2, int max_n2, long freq_min,
long freq_max, unsigned int *mdiv,
unsigned int *ndiv, unsigned int *r);
-void SavageGEReset(ScrnInfoPtr pScrn, int from_timeout, int line, char *file);
+void SavageGEReset(ScrnInfoPtr pScrn, int from_timeout,
+ int line, const char *file);
void SavagePrintRegs(ScrnInfoPtr pScrn);
static void SavageDPMS(ScrnInfoPtr pScrn, int mode, int flags);
static Bool SavageDDC1(ScrnInfoPtr pScrn);
@@ -712,7 +713,7 @@ static Bool SavagePciProbe(DriverPtr drv
pEnt = xf86GetEntityInfo(entity_num);
/* MX, IX, SuperSavage cards support Dual-Head, mark the entity as
- * sharable.
+ * shareable.
*/
if (pEnt->chipset == S3_SAVAGE_MX || pEnt->chipset == S3_SUPERSAVAGE) {
DevUnion *pPriv;
@@ -820,7 +821,7 @@ static Bool SavageProbe(DriverPtr drv, i
pEnt = xf86GetEntityInfo(usedChips[i]);
- /* MX, IX, SuperSavage cards support Dual-Head, mark the entity as sharable*/
+ /* MX, IX, SuperSavage cards support Dual-Head, mark the entity as shareable*/
if(pEnt->chipset == S3_SAVAGE_MX || pEnt->chipset == S3_SUPERSAVAGE)
{
DevUnion *pPriv;
@@ -979,7 +980,7 @@ static void SavageGetPanelInfo(ScrnInfoP
vgaHWPtr hwp;
unsigned char cr6b;
int panelX, panelY;
- char * sTechnology = "Unknown";
+ const char *sTechnology = "Unknown";
enum ACTIVE_DISPLAYS { /* These are the bits in CR6B */
ActiveCRT = 0x01,
ActiveLCD = 0x02,
@@ -1271,8 +1272,8 @@ static Bool SavagePreInit(ScrnInfoPtr pS
if(!psav->NoAccel) {
from = X_DEFAULT;
- char *strptr;
#ifdef HAVE_XAA_H
+ char *strptr;
if((strptr = (char *)xf86GetOptValString(psav->Options, OPTION_ACCELMETHOD))) {
if(!xf86NameCmp(strptr,"XAA")) {
from = X_CONFIG;
@@ -1308,7 +1309,7 @@ static Bool SavagePreInit(ScrnInfoPtr pS
pScrn->overlayFlags = OVERLAY_8_32_DUALFB;
} else {
xf86DrvMsg(pScrn->scrnIndex,X_WARNING,"Wrong argument: "
- "\"%s\" Ingnoring\n",s);
+ "\"%s\" Ignoring\n",s);
}
} else if (pScrn->depth != 15) {
psav->overlayDepth = 8;
@@ -1471,7 +1472,7 @@ static Bool SavagePreInit(ScrnInfoPtr pS
/* We support 1X 2X and 4X */
#ifdef SAVAGEDRI
#ifdef XSERVER_LIBPCIACCESS
- /* Try to read the AGP capabilty block from the device. If there is
+ /* Try to read the AGP capability block from the device. If there is
* no AGP info, the device is PCI.
*/
@@ -1485,7 +1486,7 @@ static Bool SavagePreInit(ScrnInfoPtr pS
* capability is present. The procedure is outlined as follows:
*
* 1) Test bit 4 (CAP_LIST) of the PCI status register of the device
- * to determine wether or not this device implements any extended
+ * to determine whether or not this device implements any extended
* capabilities. If this bit is zero, then the device is a PCI 2.1
* or earlier device and is not AGP capable, and we can conclude it
* to be a PCI device.
@@ -2154,7 +2155,7 @@ static Bool SavagePreInit(ScrnInfoPtr pS
}
if( !psav->NoAccel ) {
- char *modName = NULL;
+ const char *modName = NULL;
if (psav->useEXA) {
modName = "exa";
@@ -3641,6 +3642,14 @@ static ModeStatus SavageValidMode(SCRN_A
(pMode->VDisplay > psav->PanelY)))
return MODE_PANEL;
+ /* 11 bits of h_total 8-pixel units */
+ if (pMode->HTotal > (2048 << 3))
+ return MODE_BAD_HVALUE;
+
+ /* 11 bits of v_total */
+ if (pMode->VTotal > 2048)
+ return MODE_BAD_VVALUE;
+
if (psav->UseBIOS) {
refresh = SavageGetRefresh(pMode);
return (SavageMatchBiosMode(pScrn,pMode->HDisplay,
@@ -4207,7 +4216,7 @@ void SavageDisableMMIO(ScrnInfoPtr pScrn
return;
}
-void SavageLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies,
+void SavageLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual)
{
SavagePtr psav = SAVPTR(pScrn);
@@ -4237,7 +4246,7 @@ void SavageLoadPalette(ScrnInfoPtr pScrn
}
for (i=0; i<numColors; i++) {
- index = indicies[i];
+ index = indices[i];
if (index == pScrn->colorKey) updateKey = index;
VGAOUT8(0x3c8, index);
VGAOUT8(0x3c9, colors[index].red);
@@ -4290,7 +4299,7 @@ SavageUpdateKey(ScrnInfoPtr pScrn, int r
#define inStatus1() (hwp->readST01( hwp ))
#endif
-void SavageLoadPaletteSavage4(ScrnInfoPtr pScrn, int numColors, int *indicies,
+void SavageLoadPaletteSavage4(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual)
{
SavagePtr psav = SAVPTR(pScrn);
@@ -4302,7 +4311,7 @@ void SavageLoadPaletteSavage4(ScrnInfoPt
for (i=0; i<numColors; i++) {
if (!(inStatus1() & 0x08))
VerticalRetraceWait();
- index = indicies[i];
+ index = indices[i];
VGAOUT8(0x3c8, index);
VGAOUT8(0x3c9, colors[index].red);
VGAOUT8(0x3c9, colors[index].green);
@@ -4370,7 +4379,8 @@ static void SavageCalcClock(long freq, i
}
-void SavageGEReset(ScrnInfoPtr pScrn, int from_timeout, int line, char *file)
+void SavageGEReset(ScrnInfoPtr pScrn, int from_timeout,
+ int line, const char *file)
{
unsigned char cr66;
int r, success = 0;
Index: xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h
diff -u xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h:1.6 xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h:1.7
--- xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h:1.6 Sat Aug 20 00:27:22 2016
+++ xsrc/external/mit/xf86-video-savage/dist/src/savage_driver.h Mon Jun 19 09:06:01 2023
@@ -85,7 +85,6 @@
#include "savage_dripriv.h"
#include "savage_dri.h"
#include "dri.h"
-#include "GL/glxint.h"
#include "xf86drm.h"
/* Totals 2 Mbytes which equals 2^16 32-byte vertices divided among up
@@ -476,9 +475,6 @@ typedef struct _Savage {
Bool directRenderingEnabled;
DRIInfoPtr pDRIInfo;
int drmFD;
- int numVisualConfigs;
- __GLXvisualConfig* pVisualConfigs;
- SAVAGEConfigPrivPtr pVisualConfigsPriv;
SAVAGEDRIServerPrivatePtr DRIServerInfo;
ScreenWakeupHandlerProcPtr coreWakeupHandler;
ScreenBlockHandlerProcPtr coreBlockHandler;