CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
xorg-xf86-video-dove now patched to work with xorg 1.13
authorRyan Mullen <rmull@rmull.com>
Sat, 22 Dec 2012 18:25:31 +0000 (13:25 -0500)
committerRyan Mullen <rmull@rmull.com>
Sat, 22 Dec 2012 18:25:31 +0000 (13:25 -0500)
xorg-xf86-video-dove/.footprint [new file with mode: 0644]
xorg-xf86-video-dove/.md5sum [new file with mode: 0644]
xorg-xf86-video-dove/Pkgfile [new file with mode: 0644]
xorg-xf86-video-dove/dovefb-port-to-compat-api-for-new-server.patch [new file with mode: 0644]
xorg-xf86-video-dove/xorg.conf [new file with mode: 0644]

diff --git a/xorg-xf86-video-dove/.footprint b/xorg-xf86-video-dove/.footprint
new file mode 100644 (file)
index 0000000..9f94546
--- /dev/null
@@ -0,0 +1,13 @@
+drwxr-xr-x     root/root       etc/
+drwxr-xr-x     root/root       etc/X11/
+-rw-r--r--     root/root       etc/X11/xorg.conf
+drwxr-xr-x     root/root       usr/
+drwxr-xr-x     root/root       usr/lib/
+drwxr-xr-x     root/root       usr/lib/xorg/
+drwxr-xr-x     root/root       usr/lib/xorg/modules/
+drwxr-xr-x     root/root       usr/lib/xorg/modules/drivers/
+-rwxr-xr-x     root/root       usr/lib/xorg/modules/drivers/dovefb_drv.la
+-rwxr-xr-x     root/root       usr/lib/xorg/modules/drivers/dovefb_drv.so
+drwxr-xr-x     root/root       usr/man/
+drwxr-xr-x     root/root       usr/man/man4/
+-rw-r--r--     root/root       usr/man/man4/mrvl.4.gz
diff --git a/xorg-xf86-video-dove/.md5sum b/xorg-xf86-video-dove/.md5sum
new file mode 100644 (file)
index 0000000..7f0c76b
--- /dev/null
@@ -0,0 +1,3 @@
+0cf362fde4ca25572f8f264fb424e082  dovefb-port-to-compat-api-for-new-server.patch
+03294f82a3df0ccdf63f62ea1e4d027a  xorg.conf
+cd0cb4528b4c30095051af904a20505b  xserver-xorg-video-dove-0.1.0.tar.gz
diff --git a/xorg-xf86-video-dove/Pkgfile b/xorg-xf86-video-dove/Pkgfile
new file mode 100644 (file)
index 0000000..cb9ce53
--- /dev/null
@@ -0,0 +1,30 @@
+# Description: Marvell Armada 510/Dove graphics libraries
+# URL: http://www.solid-run.com/mw/index.php/Main_Page
+# Packager: Ryan Mullen, rmmullen at gmail dot com
+# Maintainer: Ryan Mullen, rmmullen at gmail dot com
+# Depends on: xorg-server marvell-libgfx
+
+name=xorg-xf86-video-dove
+version=0.1.0
+release=1
+source=(http://download.solid-run.com/pub/solidrun/cubox/packages/xserver-xorg-video-dove/xserver-xorg-video-dove-$version.tar.gz
+        dovefb-port-to-compat-api-for-new-server.patch
+        xorg.conf)
+
+build() {
+    tar -xf xserver-xorg-video-dove-0.1.0/xserver-xorg-video-dove_0.3.4-1.tar.gz
+    cd xserver-xorg-video-dove-$version
+
+    patch -p1 -i $SRC/dovefb-port-to-compat-api-for-new-server.patch
+
+    autoreconf -i
+
+    CFLAGS="${CFLAGS} -I/usr/include/HAL -g -DMRVL_SUPPORT_RANDR=1 -DMRVL_SUPPORT_EXA=1 -DDUMP_RAW_VIDEO=0 -DMRVL_USE_OFFSCREEN_HEAP=0 -DMRVL_EXA_MODE=2 -DMRVL_EXA_ENABLE_UP_DOWNLOAD=2 -DMRVL_EXA_FORCE_HW_LOAD=0 -DMRVL_EXA_ALLOC_PIXMAP_FROM_SYSTEM=0 -DMRVL_EXA_PERF_PROFILING=0 -DMRVL_EXA_TRACE_FALLBACK=0 -DMRVL_EXA_XBGR_SUPPORT=1 -DMRVL_XV_SUPPORT_RGB_FORMAT=1 -DMRVL_XV_TEX_VIDEO=1 -DMRVL_XV_OVERLAY_VIDEO=1 -DMRVL_XV_DEFERRED_STALL_GPU=1 -DMRVL_XV_USE_FAKE_FENCE_STALL=1 -DMRVL_RANDR_EDID_MODES=1  -DMRVL_CRTC_SUPPORT_ROTATION=1 -DMRVL_PLATFORM_INFO=1"
+
+    ./configure --prefix=/usr --mandir=/usr/man CFLAGS="${CFLAGS}"
+    make DESTDIR=$PKG install
+
+    mkdir -p $PKG/etc/X11
+    cp $SRC/xorg.conf $PKG/etc/X11
+}      
diff --git a/xorg-xf86-video-dove/dovefb-port-to-compat-api-for-new-server.patch b/xorg-xf86-video-dove/dovefb-port-to-compat-api-for-new-server.patch
new file mode 100644 (file)
index 0000000..fb1ec72
--- /dev/null
@@ -0,0 +1,475 @@
+diff -rupN xf86-video-dove-0.3.4.orig/src/compat-api.h xf86-video-dove-0.3.4/src/compat-api.h
+--- xf86-video-dove-0.3.4.orig/src/compat-api.h        1970-01-01 01:00:00.000000000 +0100
++++ xf86-video-dove-0.3.4/src/compat-api.h     2012-10-16 22:21:27.589861729 +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 -rupN xf86-video-dove-0.3.4.orig/src/dovefb.c xf86-video-dove-0.3.4/src/dovefb.c
+--- xf86-video-dove-0.3.4.orig/src/dovefb.c    2011-03-07 18:52:09.000000000 +0100
++++ xf86-video-dove-0.3.4/src/dovefb.c 2012-10-16 22:21:49.705464928 +0200
+@@ -78,9 +78,8 @@ static Bool  FBDevPciProbe(DriverPtr drv,
+      struct pci_device *dev, intptr_t match_data);
+ #endif
+ static Bool   FBDevPreInit(ScrnInfoPtr pScrn, int flags);
+-static Bool   FBDevScreenInit(int Index, ScreenPtr pScreen, int argc,
+-                              char **argv);
+-static Bool   FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen);
++static Bool   FBDevScreenInit(SCREEN_INIT_ARGS_DECL);
++static Bool   FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL);
+ static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode,
+                                 CARD32 *size, void *closure);
+ static void   FBDevPointerMoved(int index, int x, int y);
+@@ -329,9 +328,9 @@ mrvl_scn_validMode(int scrnIndex, Displa
+ }
+ Bool
+-mrvl_scn_switchMode(int scrnIndex, DisplayModePtr mode, int flags)
++mrvl_scn_switchMode(SWITCH_MODE_ARGS_DECL)
+ {
+-    ScrnInfoPtr    pScrn       = xf86Screens[scrnIndex];
++    SCRN_INFO_PTR(arg);
+     Bool  ret;
+     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Preparing to switch single mode\n");
+@@ -346,9 +345,9 @@ mrvl_scn_switchMode(int scrnIndex, Displ
+ extern int mrvl_crtc_set_pos(xf86CrtcPtr crtc, int x, int y);
+ void
+-mrvl_scn_adjustFrame(int scrnIndex, int x, int y, int flags)
++mrvl_scn_adjustFrame(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;
+@@ -485,9 +484,9 @@ static Bool mrvlRestoreServerScreen(Scrn
+ }
+ Bool
+-mrvl_scn_entervt(int scrnIndex, int flags)
++mrvl_scn_entervt(VT_FUNC_ARGS_DECL)
+ {
+-    ScrnInfoPtr    pScrn = xf86Screens[scrnIndex];
++    SCRN_INFO_PTR(arg);
+     MRVLGetPrivateByScrn(pScrn);
+     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Preparing to enter VT\n");
+@@ -512,10 +511,10 @@ mrvl_scn_entervt(int scrnIndex, int flag
+ // 
+ void
+-mrvl_scn_leavevt(int scrnIndex, int flags)
++mrvl_scn_leavevt(VT_FUNC_ARGS_DECL)
+ {
++    SCRN_INFO_PTR(arg);
+     int i;
+-    ScrnInfoPtr    pScrn = xf86Screens[scrnIndex];
+     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+     MRVLGetPrivateByScrn(pScrn);
+@@ -1252,9 +1251,9 @@ FBDevShadowInit(ScreenPtr pScreen)
+ static Bool
+-FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
++FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
+ {
+-      ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++      ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+       FBDevPtr    fPtr = FBDEVPTR(pScrn);
+       VisualPtr   visual;
+       int         init_picture = 0;
+@@ -1281,7 +1280,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+ #endif
+       if (NULL == (fPtr->fbmem = fbdevHWMapVidmem(pScrn))) {
+-              xf86DrvMsg(scrnIndex,X_ERROR,"mapping of video memory"
++              xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mapping of video memory"
+                          " failed\n");
+               return FALSE;
+       }
+@@ -1292,17 +1291,17 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       fbdevHWSave(pScrn);
+       if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) {
+-              xf86DrvMsg(scrnIndex,X_ERROR,"mode initialization failed\n");
++              xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mode initialization failed\n");
+               return FALSE;
+       }
+       fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON);
+-      fbdevHWAdjustFrame(scrnIndex,0,0,0);
++      fbdevHWAdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0));
+       /* mi layer */
+       miClearVisualTypes();
+       if (pScrn->bitsPerPixel > 8) {
+               if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) {
+-                      xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed"
++                      xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed"
+                                  " for %d bits per pixel [1]\n",
+                                  pScrn->bitsPerPixel);
+                       return FALSE;
+@@ -1311,14 +1310,14 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+               if (!miSetVisualTypes(pScrn->depth,
+                                     miGetDefaultVisualMask(pScrn->depth),
+                                     pScrn->rgbBits, pScrn->defaultVisual)) {
+-                      xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed"
++                      xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed"
+                                  " for %d bits per pixel [2]\n",
+                                  pScrn->bitsPerPixel);
+                       return FALSE;
+               }
+       }
+       if (!miSetPixmapDepths()) {
+-        xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n");
++        xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n");
+         return FALSE;
+       }
+@@ -1334,7 +1333,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+                                     (pScrn->bitsPerPixel / 8);
+               if (pScrn->displayWidth != pScrn->virtualX) {
+-                      xf86DrvMsg(scrnIndex, X_INFO,
++                      xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                                  "Pitch updated to %d after ModeInit\n",
+                                  pScrn->displayWidth);
+               }
+@@ -1367,14 +1366,14 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       case FBDEVHW_PLANES:
+               if (fPtr->rotate)
+               {
+-                xf86DrvMsg(scrnIndex, X_ERROR,
++                xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                            "internal error: rotate not supported for afb\n");
+                 ret = FALSE;
+                 break;
+               }
+               if (fPtr->shadowFB)
+               {
+-                xf86DrvMsg(scrnIndex, X_ERROR,
++                xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                            "internal error: shadow framebuffer not supported"
+                            " for afb\n");
+                 ret = FALSE;
+@@ -1399,7 +1398,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+                       init_picture = 1;
+                       break;
+               default:
+-                      xf86DrvMsg(scrnIndex, X_ERROR,
++                      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                                  "internal error: invalid number of bits per"
+                                  " pixel (%d) encountered in"
+                                  " FBDevScreenInit()\n", pScrn->bitsPerPixel);
+@@ -1410,7 +1409,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       case FBDEVHW_INTERLEAVED_PLANES:
+               /* This should never happen ...
+               * we should check for this much much earlier ... */
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: interleaved planes are not yet "
+                          "supported by the fbdev driver\n");
+               ret = FALSE;
+@@ -1418,20 +1417,20 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       case FBDEVHW_TEXT:
+               /* This should never happen ...
+               * we should check for this much much earlier ... */
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: text mode is not supported by the "
+                          "fbdev driver\n");
+               ret = FALSE;
+               break;
+       case FBDEVHW_VGA_PLANES:
+               /* Not supported yet */
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: EGA/VGA Planes are not yet "
+                          "supported by the fbdev driver\n");
+               ret = FALSE;
+               break;
+       default:
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: unrecognised hardware type (%d) "
+                          "encountered in FBDevScreenInit()\n", type);
+               ret = FALSE;
+@@ -1490,7 +1489,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+     pScrn->vtSema = TRUE;
+       if (fPtr->shadowFB && !FBDevShadowInit(pScreen)) {
+-          xf86DrvMsg(scrnIndex, X_ERROR,
++          xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                      "shadow framebuffer initialization failed\n");
+           return FALSE;
+       }
+@@ -1498,12 +1497,12 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       if (!fPtr->rotate)
+         FBDevDGAInit(pScrn, pScreen);
+       else {
+-        xf86DrvMsg(scrnIndex, X_INFO, "display rotated; disabling DGA\n");
+-        xf86DrvMsg(scrnIndex, X_INFO, "using driver rotation; disabling "
++        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "display rotated; disabling DGA\n");
++        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "using driver rotation; disabling "
+                                       "XRandR\n");
+         xf86DisableRandR();
+         if (pScrn->bitsPerPixel == 24)
+-          xf86DrvMsg(scrnIndex, X_WARNING, "rotation might be broken at 24 "
++          xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "rotation might be broken at 24 "
+                                              "bits per pixel\n");
+       }
+@@ -1521,7 +1520,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+ #ifdef USE_AFB
+       case FBDEVHW_PLANES:
+               if (!afbCreateDefColormap(pScreen)) {
+-                      xf86DrvMsg(scrnIndex, X_ERROR,
++                      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                                    "internal error: afbCreateDefColormap "
+                                  "failed in FBDevScreenInit()\n");
+                       return FALSE;
+@@ -1530,29 +1529,29 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+ #endif
+       case FBDEVHW_PACKED_PIXELS:
+               if (!miCreateDefColormap(pScreen)) {
+-                      xf86DrvMsg(scrnIndex, X_ERROR,
++                      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                                    "internal error: miCreateDefColormap failed "
+                                  "in FBDevScreenInit()\n");
+                       return FALSE;
+               }
+               break;
+       case FBDEVHW_INTERLEAVED_PLANES:
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: interleaved planes are not yet "
+                          "supported by the fbdev driver\n");
+               return FALSE;
+       case FBDEVHW_TEXT:
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: text mode is not supported by "
+                          "the fbdev driver\n");
+               return FALSE;
+       case FBDEVHW_VGA_PLANES:
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: EGA/VGA planes are not yet "
+                          "supported by the fbdev driver\n");
+               return FALSE;
+       default:
+-              xf86DrvMsg(scrnIndex, X_ERROR,
++              xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "internal error: unrecognised fbdev hardware type "
+                          "(%d) encountered in FBDevScreenInit()\n", type);
+               return FALSE;
+@@ -1574,7 +1573,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+ #if MRVL_SUPPORT_EXA          
+     if (fPtr->UseExa)
+     {
+-        xf86DrvMsg(scrnIndex, X_INFO,
++        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                          "Start to initialize vivnate hal module\n");
+         fPtr->UseGPU = TRUE;
+     }
+@@ -1588,11 +1587,11 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+           // Set up hal layer for Exa and Xv.
+         if( ! mrvlExaInitHal(pScreen) )
+         {       
+-            xf86DrvMsg(scrnIndex, X_ERROR,
++            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                              "Failed to initialize vivnate hal module\n");
+             return FALSE;
+         }
+-        xf86DrvMsg(scrnIndex, X_INFO,
++        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                          "Initialize vivnate hal module successfully\n");
+     }  
+ #endif
+@@ -1647,11 +1646,11 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+       /* Initialize Xv support. */
+       DovefbXVInitVideo (pScreen);
+       
+-      xf86DrvMsg(scrnIndex, X_INFO, "Xv acceleration is loaded successfully\n");
++      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv acceleration is loaded successfully\n");
+     }
+     else
+     {
+-        xf86DrvMsg(scrnIndex, X_INFO, "Xv acceleration is disabled\n");
++        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv acceleration is disabled\n");
+     }
+       /* Initialize hw cursor. */     
+@@ -1660,7 +1659,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+                       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Can not initialize h/w cursor\n");
+                       return FALSE;
+               }
+-              xf86DrvMsg(scrnIndex, X_INFO, "HW cursor init okay.\n");
++              xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HW cursor init okay.\n");
+       }               
+       
+       /* ----------------------------------------- */
+@@ -1682,18 +1681,18 @@ FBDevScreenInit(int scrnIndex, ScreenPtr
+     //pScrn->modes = xf86CVTMode(1024, 768, 60.0, FALSE, FALSE);
+ #endif      
+-   xf86DrvMsg(scrnIndex, X_INFO, "Leave FBDevScreenInit().\n");
++   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Leave FBDevScreenInit().\n");
+       return TRUE;
+ }
+ static Bool
+-FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen)
++FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+ {
+-    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+     FBDevPtr fPtr = FBDEVPTR(pScrn);
+-      
+-    xf86DrvMsg(scrnIndex, X_INFO, "FBDevCloseScreen.\n");
++
++    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBDevCloseScreen.\n");
+     fbdevHWRestore(pScrn);
+     fbdevHWUnmapVidmem(pScrn);
+     if (fPtr->shadow) {
+@@ -1750,7 +1749,7 @@ FBDevCloseScreen(int scrnIndex, ScreenPt
+     /* Restore resolution for fb console */
+     mrvlRestoreFBScreen(pScrn);
+-    return (*pScreen->CloseScreen)(scrnIndex, pScreen);
++    return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
+ }
+@@ -1859,9 +1858,9 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAMo
+       frameY0 = pScrn->frameY0;
+     }
+-    if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0))
++    if (!(*pScrn->SwitchMode)(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode)))
+       return FALSE;
+-    (*pScrn->AdjustFrame)(scrnIdx, frameX0, frameY0, 0);
++    (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, frameX0, frameY0));
+     return TRUE;
+ }
+@@ -1869,7 +1868,7 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAMo
+ static void
+ FBDevDGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
+ {
+-    (*pScrn->AdjustFrame)(pScrn->pScreen->myNum, x, y, flags);
++    (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y));
+ }
+ static int
+diff -rupN xf86-video-dove-0.3.4.orig/src/dovefb_driver.h xf86-video-dove-0.3.4/src/dovefb_driver.h
+--- xf86-video-dove-0.3.4.orig/src/dovefb_driver.h     2011-03-07 18:52:09.000000000 +0100
++++ xf86-video-dove-0.3.4/src/dovefb_driver.h  2012-10-16 22:21:27.589861730 +0200
+@@ -40,6 +40,8 @@
+ #include <linux/fb.h>
++#include "compat-api.h"
++
+ /* Platform ID*/
+ #define MRVL_DOVE 1
+ #define MRVL_MMP2 2
diff --git a/xorg-xf86-video-dove/xorg.conf b/xorg-xf86-video-dove/xorg.conf
new file mode 100644 (file)
index 0000000..62b11a9
--- /dev/null
@@ -0,0 +1,53 @@
+Section "Monitor"
+        Identifier      "DVI"
+        Option          "Position"      "0 0"
+       Option           "Enable"        "true"
+        Option          "PreferredMode" "1920x1080"
+#       Option          "PreferredMode" "1280x720"
+#        Option         "Rotate"  "left"
+#        Option         "NoDDCValue"  "true"
+#       Option          "PreferredMode" "800x600"
+EndSection
+Section "Monitor"
+        Identifier      "VGA"
+        Option          "Position"      "0 0"
+        Option          "Enable"        "true"
+        Option          "PreferredMode" "1920x1080"
+#       Option          "PreferredMode" "1280x720"
+#       Option          "PreferredMode" "800x600"
+EndSection
+
+Section "Device"
+        Identifier      "Driver0"
+        Screen          0
+        Driver          "dovefb"
+        Option          "debug" "false"
+#       Option          "ShadowFB" "TRUE"
+#       Option          "UseGPU" "FALSE"
+        Option          "ExaAccel" "FALSE"
+        Option          "Solid" "TRUE"
+        Option          "Copy" "TRUE"
+        Option          "Composite" "FALSE"
+        Option          "SWSolid" "FALSE"
+        Option          "SWCopy" "FALSE"
+        Option          "Commit" "FALSE"
+        Option          "XvAccel" "TRUE"
+        Option          "HWCursor" "false"
+        Option          "EncFunc" "7"
+        Option          "UseDriverBuiltInMode" "TRUE"
+        Option          "EnableDualDisplay" "true"
+        Option          "Monitor-VGA" "VGA"
+        Option          "Monitor-lvds" "DVI"
+EndSection
+
+Section "Screen"
+        Device          "Driver0"
+        Identifier      "Primary Screen"
+        DefaultDepth    32
+        DefaultFbBpp    32
+        SubSection      "Display"
+                Viewport 0 0
+                Virtual 2048 2048
+        EndSubSection
+EndSection
+