mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
Revert "xf86-video-vmware: add patch to compile with xorg 1.13.0"
This reverts commit d71b5b246eec568fd587cff56f979f8c45d3624a.
This commit is contained in:
parent
e65a2830f1
commit
72f89ffacf
@ -1,610 +0,0 @@
|
|||||||
diff -urN a/saa/saa.c b/saa/saa.c
|
|
||||||
--- a/saa/saa.c 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/saa/saa.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -594,7 +594,7 @@
|
|
||||||
* screen private, before calling down to the next CloseScreen.
|
|
||||||
*/
|
|
||||||
Bool
|
|
||||||
-saa_close_screen(int i, ScreenPtr pScreen)
|
|
||||||
+saa_close_screen(CLOSE_SCREEN_ARGS_DECL)
|
|
||||||
{
|
|
||||||
struct saa_screen_priv *sscreen = saa_screen(pScreen);
|
|
||||||
struct saa_driver *driver = sscreen->driver;
|
|
||||||
@@ -624,7 +624,7 @@
|
|
||||||
|
|
||||||
free(sscreen);
|
|
||||||
|
|
||||||
- return (*pScreen->CloseScreen) (i, pScreen);
|
|
||||||
+ return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct saa_driver *
|
|
||||||
diff -urN a/saa/saa.h b/saa/saa.h
|
|
||||||
--- a/saa/saa.h 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/saa/saa.h 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -44,6 +44,8 @@
|
|
||||||
#include <damage.h>
|
|
||||||
#include <picturestr.h>
|
|
||||||
|
|
||||||
+#include "../src/compat-api.h"
|
|
||||||
+
|
|
||||||
#define SAA_VERSION_MAJOR 0
|
|
||||||
#define SAA_VERSION_MINOR 1
|
|
||||||
|
|
||||||
@@ -173,7 +175,7 @@
|
|
||||||
saa_bitmap_to_region(PixmapPtr pPix);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool
|
|
||||||
-saa_close_screen(int i, ScreenPtr pScreen);
|
|
||||||
+saa_close_screen(CLOSE_SCREEN_ARGS_DECL);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool
|
|
||||||
saa_gc_reads_destination(DrawablePtr pDrawable, GCPtr pGC);
|
|
||||||
diff -urN a/src/compat-api.h b/src/compat-api.h
|
|
||||||
--- a/src/compat-api.h 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ b/src/compat-api.h 2012-08-09 01:20:23.000000000 +0200
|
|
||||||
@@ -0,0 +1,99 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright 2012 Red Hat, Inc.
|
|
||||||
+ *
|
|
||||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
+ * copy of this software and associated documentation files (the "Software"),
|
|
||||||
+ * to deal in the Software without restriction, including without limitation
|
|
||||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
+ * Software is furnished to do so, subject to the following conditions:
|
|
||||||
+ *
|
|
||||||
+ * The above copyright notice and this permission notice (including the next
|
|
||||||
+ * paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
+ * Software.
|
|
||||||
+ *
|
|
||||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
+ * DEALINGS IN THE SOFTWARE.
|
|
||||||
+ *
|
|
||||||
+ * Author: Dave Airlie <airlied@redhat.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* this file provides API compat between server post 1.13 and pre it,
|
|
||||||
+ it should be reused inside as many drivers as possible */
|
|
||||||
+#ifndef COMPAT_API_H
|
|
||||||
+#define COMPAT_API_H
|
|
||||||
+
|
|
||||||
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
|
|
||||||
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
|
|
||||||
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef XF86_HAS_SCRN_CONV
|
|
||||||
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
|
|
||||||
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef XF86_SCRN_INTERFACE
|
|
||||||
+
|
|
||||||
+#define SCRN_ARG_TYPE int
|
|
||||||
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
|
|
||||||
+
|
|
||||||
+#define SCREEN_ARG_TYPE int
|
|
||||||
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
|
|
||||||
+
|
|
||||||
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
|
|
||||||
+
|
|
||||||
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
|
|
||||||
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
|
|
||||||
+
|
|
||||||
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
|
|
||||||
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
|
|
||||||
+
|
|
||||||
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
|
|
||||||
+#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
|
|
||||||
+
|
|
||||||
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
|
|
||||||
+#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
|
|
||||||
+
|
|
||||||
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
|
|
||||||
+
|
|
||||||
+#define VT_FUNC_ARGS_DECL int arg, int flags
|
|
||||||
+#define VT_FUNC_ARGS pScrn->scrnIndex, 0
|
|
||||||
+
|
|
||||||
+#define XF86_SCRN_ARG(x) ((x)->scrnIndex)
|
|
||||||
+#else
|
|
||||||
+#define SCRN_ARG_TYPE ScrnInfoPtr
|
|
||||||
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
|
|
||||||
+
|
|
||||||
+#define SCREEN_ARG_TYPE ScreenPtr
|
|
||||||
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
|
|
||||||
+
|
|
||||||
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
|
||||||
+
|
|
||||||
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
|
||||||
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
|
||||||
+
|
|
||||||
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
|
||||||
+#define CLOSE_SCREEN_ARGS pScreen
|
|
||||||
+
|
|
||||||
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
|
|
||||||
+#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
|
|
||||||
+
|
|
||||||
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
|
|
||||||
+#define SWITCH_MODE_ARGS(arg, m) arg, m
|
|
||||||
+
|
|
||||||
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
|
|
||||||
+
|
|
||||||
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
|
|
||||||
+#define VT_FUNC_ARGS pScrn
|
|
||||||
+
|
|
||||||
+#define XF86_SCRN_ARG(x) (x)
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff -urN a/src/Makefile.am b/src/Makefile.am
|
|
||||||
--- a/src/Makefile.am 2012-03-14 00:06:41.000000000 +0100
|
|
||||||
+++ b/src/Makefile.am 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -37,6 +37,7 @@
|
|
||||||
vmware_drv_la_SOURCES = \
|
|
||||||
bits2pixels.c \
|
|
||||||
bits2pixels.h \
|
|
||||||
+ compat-api.h \
|
|
||||||
guest_os.h \
|
|
||||||
includeCheck.h \
|
|
||||||
svga_escape.h \
|
|
||||||
diff -urN a/src/vmware.c b/src/vmware.c
|
|
||||||
--- a/src/vmware.c 2012-03-21 19:57:59.000000000 +0100
|
|
||||||
+++ b/src/vmware.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -901,8 +901,8 @@
|
|
||||||
pScrn->pScreen->rootDepth),
|
|
||||||
(pointer)(pVMWARE->FbBase + pScrn->fbOffset));
|
|
||||||
|
|
||||||
- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, FALSE);
|
|
||||||
- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, TRUE);
|
|
||||||
+ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), FALSE);
|
|
||||||
+ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
vgaHWProtect(pScrn, FALSE);
|
|
||||||
@@ -1018,7 +1018,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-VMWAREAdjustFrame(int scrnIndex, int x, int y, int flags)
|
|
||||||
+VMWAREAdjustFrame(ADJUST_FRAME_ARGS_DECL)
|
|
||||||
{
|
|
||||||
/* FIXME */
|
|
||||||
}
|
|
||||||
@@ -1089,9 +1089,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-VMWARECloseScreen(int scrnIndex, ScreenPtr pScreen)
|
|
||||||
+VMWARECloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
|
|
||||||
ScreenPtr save = &pVMWARE->ScrnFuncs;
|
|
||||||
|
|
||||||
@@ -1119,7 +1119,7 @@
|
|
||||||
pScrn->DriverFunc = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
|
|
||||||
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
@@ -1296,16 +1296,14 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|
||||||
+VMWAREScreenInit(SCREEN_INIT_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn;
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
vgaHWPtr hwp;
|
|
||||||
VMWAREPtr pVMWARE;
|
|
||||||
OptionInfoPtr options;
|
|
||||||
Bool useXinerama = TRUE;
|
|
||||||
|
|
||||||
- /* Get the ScrnInfoRec */
|
|
||||||
- pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
pVMWARE = VMWAREPTR(pScrn);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1381,7 +1379,7 @@
|
|
||||||
VMWAREModeInit(pScrn, pScrn->currentMode, FALSE);
|
|
||||||
|
|
||||||
/* Set the viewport if supported */
|
|
||||||
- VMWAREAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
|
|
||||||
+ VMWAREAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Setup the screen's visuals, and initialise the framebuffer
|
|
||||||
@@ -1582,10 +1580,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-VMWARESwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
|
|
||||||
-
|
|
||||||
+VMWARESwitchMode(SWITCH_MODE_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
ScreenPtr pScreen = pScrn->pScreen;
|
|
||||||
|
|
||||||
pScreen->mmWidth = (pScreen->width * VMWARE_INCHTOMM +
|
|
||||||
@@ -1597,9 +1594,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-VMWAREEnterVT(int scrnIndex, int flags)
|
|
||||||
+VMWAREEnterVT(VT_FUNC_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1616,9 +1613,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-VMWARELeaveVT(int scrnIndex, int flags)
|
|
||||||
+VMWARELeaveVT(VT_FUNC_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1631,17 +1628,18 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-VMWAREFreeScreen(int scrnIndex, int flags)
|
|
||||||
+VMWAREFreeScreen(FREE_SCREEN_ARGS_DECL)
|
|
||||||
{
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
/*
|
|
||||||
* If the vgahw module is used vgaHWFreeHWRec() would be called
|
|
||||||
* here.
|
|
||||||
*/
|
|
||||||
- VMWAREFreeRec(xf86Screens[scrnIndex]);
|
|
||||||
+ VMWAREFreeRec(pScrn);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ModeStatus
|
|
||||||
-VMWAREValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
|
|
||||||
+VMWAREValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
|
|
||||||
{
|
|
||||||
return MODE_OK;
|
|
||||||
}
|
|
||||||
diff -urN a/src/vmware_common.h b/src/vmware_common.h
|
|
||||||
--- a/src/vmware_common.h 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/src/vmware_common.h 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -32,6 +32,8 @@
|
|
||||||
#include <X11/extensions/panoramiXproto.h>
|
|
||||||
#include <xf86.h>
|
|
||||||
|
|
||||||
+#include "compat-api.h"
|
|
||||||
+
|
|
||||||
xXineramaScreenInfo *
|
|
||||||
VMWAREParseTopologyString(ScrnInfoPtr pScrn,
|
|
||||||
const char *topology,
|
|
||||||
diff -urN a/src/vmware.h b/src/vmware.h
|
|
||||||
--- a/src/vmware.h 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/src/vmware.h 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -177,7 +177,7 @@
|
|
||||||
#define VMWAREPTR(p) ((VMWAREPtr)((p)->driverPrivate))
|
|
||||||
|
|
||||||
static __inline ScrnInfoPtr infoFromScreen(ScreenPtr s) {
|
|
||||||
- return xf86Screens[s->myNum];
|
|
||||||
+ return xf86ScreenToScrn(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
|
||||||
diff -urN a/vmwgfx/vmwgfx_dri2.c b/vmwgfx/vmwgfx_dri2.c
|
|
||||||
--- a/vmwgfx/vmwgfx_dri2.c 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/vmwgfx/vmwgfx_dri2.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -83,7 +83,7 @@
|
|
||||||
dri2_do_create_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer, unsigned int format)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDraw->pScreen;
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
BufferPrivatePtr private = buffer->driverPrivate;
|
|
||||||
PixmapPtr pPixmap;
|
|
||||||
@@ -371,7 +371,7 @@
|
|
||||||
Bool
|
|
||||||
xorg_dri2_init(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
DRI2InfoRec dri2info;
|
|
||||||
int major, minor;
|
|
||||||
diff -urN a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c
|
|
||||||
--- a/vmwgfx/vmwgfx_driver.c 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/vmwgfx/vmwgfx_driver.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -107,14 +107,13 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
static Bool drv_pre_init(ScrnInfoPtr pScrn, int flags);
|
|
||||||
-static Bool drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc,
|
|
||||||
- char **argv);
|
|
||||||
-static Bool drv_switch_mode(int scrnIndex, DisplayModePtr mode, int flags);
|
|
||||||
-static void drv_adjust_frame(int scrnIndex, int x, int y, int flags);
|
|
||||||
-static Bool drv_enter_vt(int scrnIndex, int flags);
|
|
||||||
-static void drv_leave_vt(int scrnIndex, int flags);
|
|
||||||
-static void drv_free_screen(int scrnIndex, int flags);
|
|
||||||
-static ModeStatus drv_valid_mode(int scrnIndex, DisplayModePtr mode, Bool verbose,
|
|
||||||
+static Bool drv_screen_init(SCREEN_INIT_ARGS_DECL);
|
|
||||||
+static Bool drv_switch_mode(SWITCH_MODE_ARGS_DECL);
|
|
||||||
+static void drv_adjust_frame(ADJUST_FRAME_ARGS_DECL);
|
|
||||||
+static Bool drv_enter_vt(VT_FUNC_ARGS_DECL);
|
|
||||||
+static void drv_leave_vt(VT_FUNC_ARGS_DECL);
|
|
||||||
+static void drv_free_screen(FREE_SCREEN_ARGS_DECL);
|
|
||||||
+static ModeStatus drv_valid_mode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose,
|
|
||||||
int flags);
|
|
||||||
|
|
||||||
extern void xorg_tracker_set_functions(ScrnInfoPtr scrn);
|
|
||||||
@@ -133,7 +132,7 @@
|
|
||||||
* Internal function definitions
|
|
||||||
*/
|
|
||||||
|
|
||||||
-static Bool drv_close_screen(int scrnIndex, ScreenPtr pScreen);
|
|
||||||
+static Bool drv_close_screen(CLOSE_SCREEN_ARGS_DECL);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Internal functions
|
|
||||||
@@ -633,7 +632,7 @@
|
|
||||||
|
|
||||||
void xorg_flush(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
|
||||||
PixmapPtr pixmap = NULL;
|
|
||||||
@@ -708,14 +707,13 @@
|
|
||||||
free(pixmaps);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
|
|
||||||
- pointer pReadmask)
|
|
||||||
+static void drv_block_handler(BLOCKHANDLER_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScreenPtr pScreen = screenInfo.screens[i];
|
|
||||||
- modesettingPtr ms = modesettingPTR(xf86Screens[pScreen->myNum]);
|
|
||||||
+ SCREEN_PTR(arg);
|
|
||||||
+ modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
|
|
||||||
|
|
||||||
vmwgfx_swap(ms, pScreen, BlockHandler);
|
|
||||||
- pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
|
|
||||||
+ pScreen->BlockHandler(BLOCKHANDLER_ARGS);
|
|
||||||
vmwgfx_swap(ms, pScreen, BlockHandler);
|
|
||||||
|
|
||||||
vmwgfx_flush_dri2(pScreen);
|
|
||||||
@@ -725,7 +723,7 @@
|
|
||||||
static Bool
|
|
||||||
drv_create_screen_resources(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
@@ -735,9 +733,9 @@
|
|
||||||
if (!ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
- drv_adjust_frame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
|
|
||||||
+ drv_adjust_frame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
|
|
||||||
|
|
||||||
- return drv_enter_vt(pScreen->myNum, 1);
|
|
||||||
+ return drv_enter_vt(VT_FUNC_ARGS);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
@@ -773,7 +771,7 @@
|
|
||||||
static Bool
|
|
||||||
vmwgfx_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
|
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
|
||||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
@@ -804,7 +802,7 @@
|
|
||||||
static Bool
|
|
||||||
vmwgfx_use_hw_cursor(ScreenPtr screen, CursorPtr cursor)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
|
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
|
||||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
@@ -902,9 +900,9 @@
|
|
||||||
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|
||||||
+drv_screen_init(SCREEN_INIT_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
VisualPtr visual;
|
|
||||||
|
|
||||||
@@ -1088,9 +1086,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-drv_adjust_frame(int scrnIndex, int x, int y, int flags)
|
|
||||||
+drv_adjust_frame(ADJUST_FRAME_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
|
||||||
xf86OutputPtr output = config->output[config->compat_output];
|
|
||||||
xf86CrtcPtr crtc = output->crtc;
|
|
||||||
@@ -1104,15 +1102,16 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-drv_free_screen(int scrnIndex, int flags)
|
|
||||||
+drv_free_screen(FREE_SCREEN_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- drv_free_rec(xf86Screens[scrnIndex]);
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
+ drv_free_rec(pScrn);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
-drv_leave_vt(int scrnIndex, int flags)
|
|
||||||
+drv_leave_vt(VT_FUNC_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
|
|
||||||
vmwgfx_cursor_bypass(ms->fd, 0, 0);
|
|
||||||
@@ -1130,9 +1129,9 @@
|
|
||||||
* This gets called when gaining control of the VT, and from ScreenInit().
|
|
||||||
*/
|
|
||||||
static Bool
|
|
||||||
-drv_enter_vt(int scrnIndex, int flags)
|
|
||||||
+drv_enter_vt(VT_FUNC_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
|
|
||||||
if (!drv_set_master(pScrn))
|
|
||||||
return FALSE;
|
|
||||||
@@ -1144,17 +1143,17 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-drv_switch_mode(int scrnIndex, DisplayModePtr mode, int flags)
|
|
||||||
+drv_switch_mode(SWITCH_MODE_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ SCRN_INFO_PTR(arg);
|
|
||||||
|
|
||||||
return xf86SetSingleMode(pScrn, mode, RR_Rotate_0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
-drv_close_screen(int scrnIndex, ScreenPtr pScreen)
|
|
||||||
+drv_close_screen(CLOSE_SCREEN_ARGS_DECL)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
|
|
||||||
if (ms->cursor) {
|
|
||||||
@@ -1166,7 +1165,7 @@
|
|
||||||
xorg_dri2_close(pScreen);
|
|
||||||
|
|
||||||
if (pScrn->vtSema)
|
|
||||||
- pScrn->LeaveVT(scrnIndex, 0);
|
|
||||||
+ pScrn->LeaveVT(VT_FUNC_ARGS);
|
|
||||||
|
|
||||||
pScrn->vtSema = FALSE;
|
|
||||||
|
|
||||||
@@ -1180,11 +1179,11 @@
|
|
||||||
if (ms->xat)
|
|
||||||
xa_tracker_destroy(ms->xat);
|
|
||||||
|
|
||||||
- return (*pScreen->CloseScreen) (scrnIndex, pScreen);
|
|
||||||
+ return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ModeStatus
|
|
||||||
-drv_valid_mode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
|
|
||||||
+drv_valid_mode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
|
|
||||||
{
|
|
||||||
return MODE_OK;
|
|
||||||
}
|
|
||||||
diff -urN a/vmwgfx/vmwgfx_driver.h b/vmwgfx/vmwgfx_driver.h
|
|
||||||
--- a/vmwgfx/vmwgfx_driver.h 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/vmwgfx/vmwgfx_driver.h 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -46,6 +46,7 @@
|
|
||||||
#include <xa_tracker.h>
|
|
||||||
#include <xf86Module.h>
|
|
||||||
|
|
||||||
+#include "../src/compat-api.h"
|
|
||||||
#ifdef DRI2
|
|
||||||
#include <dri2.h>
|
|
||||||
#if (!defined(DRI2INFOREC_VERSION) || (DRI2INFOREC_VERSION < 3))
|
|
||||||
@@ -118,9 +119,9 @@
|
|
||||||
ScreenBlockHandlerProcPtr saved_BlockHandler;
|
|
||||||
CreateScreenResourcesProcPtr saved_CreateScreenResources;
|
|
||||||
CloseScreenProcPtr saved_CloseScreen;
|
|
||||||
- Bool (*saved_EnterVT)(int, int);
|
|
||||||
- void (*saved_LeaveVT)(int, int);
|
|
||||||
- void (*saved_AdjustFrame)(int, int, int, int);
|
|
||||||
+ Bool (*saved_EnterVT)(VT_FUNC_ARGS_DECL);
|
|
||||||
+ void (*saved_LeaveVT)(VT_FUNC_ARGS_DECL);
|
|
||||||
+ void (*saved_AdjustFrame)(ADJUST_FRAME_ARGS_DECL);
|
|
||||||
Bool (*saved_UseHWCursor)(ScreenPtr, CursorPtr);
|
|
||||||
Bool (*saved_UseHWCursorARGB)(ScreenPtr, CursorPtr);
|
|
||||||
|
|
||||||
diff -urN a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
|
|
||||||
--- a/vmwgfx/vmwgfx_saa.c 2012-03-21 19:57:59.000000000 +0100
|
|
||||||
+++ b/vmwgfx/vmwgfx_saa.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -460,7 +460,7 @@
|
|
||||||
struct vmwgfx_saa *vsaa =
|
|
||||||
to_vmwgfx_saa(saa_get_driver(pScreen));
|
|
||||||
struct _WsbmListHead *list, *next;
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
|
|
||||||
if (!pScrn->vtSema)
|
|
||||||
return;
|
|
||||||
@@ -1199,7 +1199,7 @@
|
|
||||||
struct vmwgfx_saa *vsaa = to_vmwgfx_saa(driver);
|
|
||||||
struct saa_pixmap *spix = saa_get_saa_pixmap(pixmap);
|
|
||||||
struct vmwgfx_saa_pixmap *vpix = to_vmwgfx_saa_pixmap(spix);
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[vsaa->pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(vsaa->pScreen);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Make dri2 drawables up to date, or add them to the flush list
|
|
||||||
diff -urN a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c
|
|
||||||
--- a/vmwgfx/vmwgfx_tex_video.c 2012-03-08 17:13:16.000000000 +0100
|
|
||||||
+++ b/vmwgfx/vmwgfx_tex_video.c 2012-08-09 01:23:14.000000000 +0200
|
|
||||||
@@ -638,7 +638,7 @@
|
|
||||||
DrawablePtr pDraw)
|
|
||||||
{
|
|
||||||
struct xorg_xv_port_priv *pPriv = (struct xorg_xv_port_priv *) data;
|
|
||||||
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
|
|
||||||
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
|
||||||
PixmapPtr pPixmap;
|
|
||||||
INT32 x1, x2, y1, y2;
|
|
||||||
BoxRec dstBox;
|
|
||||||
@@ -732,7 +732,7 @@
|
|
||||||
static XF86VideoAdaptorPtr
|
|
||||||
xorg_setup_textured_adapter(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
XF86VideoAdaptorPtr adapt;
|
|
||||||
XF86AttributePtr attrs;
|
|
||||||
@@ -799,7 +799,7 @@
|
|
||||||
void
|
|
||||||
xorg_xv_init(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
|
||||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
|
||||||
XF86VideoAdaptorPtr *adaptors, *new_adaptors = NULL;
|
|
||||||
XF86VideoAdaptorPtr textured_adapter = NULL, overlay_adaptor = NULL;
|
|
Loading…
x
Reference in New Issue
Block a user