Hello community,

here is the log from the commit of package xf86-video-mga for openSUSE:Factory 
checked in at 2017-01-24 10:35:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-video-mga (Old)
 and      /work/SRC/openSUSE:Factory/.xf86-video-mga.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xf86-video-mga"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-video-mga/xf86-video-mga.changes    
2016-12-02 16:42:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xf86-video-mga.new/xf86-video-mga.changes       
2017-01-24 10:35:15.490596132 +0100
@@ -1,0 +2,15 @@
+Thu Jan 19 13:35:20 UTC 2017 - sndir...@suse.com
+
+- Update to version 1.6.5
+  * Enable write-combining on the framebuffer BAR
+  * Adapt Block/WakeupHandler signature for ABI 23
+  * Remove DownloadFromScreen
+  * Composite fixup
+  * Add support for a new G200eW3 chipset
+  * Add support for the new G200e chipset -- V2
+  * MGA DDX: make it possible to find EXA support
+  * Use correct type in function call.
+- supersedes U_Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
+- supersedes u_Fix-crash-when-EXA-accel-mode-is-enabled.patch
+
+-------------------------------------------------------------------

Old:
----
  U_Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
  u_Fix-crash-when-EXA-accel-mode-is-enabled.patch
  xf86-video-mga-1.6.4.tar.bz2

New:
----
  xf86-video-mga-1.6.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xf86-video-mga.spec ++++++
--- /var/tmp/diff_new_pack.TnJ3GS/_old  2017-01-24 10:35:16.454459209 +0100
+++ /var/tmp/diff_new_pack.TnJ3GS/_new  2017-01-24 10:35:16.454459209 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xf86-video-mga
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           xf86-video-mga
-Version:        1.6.4
+Version:        1.6.5
 Release:        0
 Summary:        Matrox video driver for the Xorg X server
 License:        MIT
@@ -26,10 +26,8 @@
 Source0:        
http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
 Patch0:         
u_Change-shadow-fb-implementation-from-DDX-based-to-miext-damage-based.patch
 Patch1:         u_Fix-compiler-warnings.patch
-Patch2:         u_Fix-crash-when-EXA-accel-mode-is-enabled.patch
 Patch3:         u_EXA-Fix-UploadToScreen.patch
 Patch4:         u_shadow-Calulate-the-shadow-buffer-size-correctly.patch
-Patch5:         U_Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(fontsproto)
@@ -70,10 +68,8 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 
 %build
 %configure

++++++ xf86-video-mga-1.6.4.tar.bz2 -> xf86-video-mga-1.6.5.tar.bz2 ++++++
++++ 3838 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/ChangeLog new/xf86-video-mga-1.6.5/ChangeLog
--- old/xf86-video-mga-1.6.4/ChangeLog  2015-02-19 22:43:24.000000000 +0100
+++ new/xf86-video-mga-1.6.5/ChangeLog  2017-01-17 23:41:14.000000000 +0100
@@ -1,3 +1,107 @@
+commit 979e0e73eb3424b6a97746e29c8b4a5b7e86196e
+Author: Matt Turner <matts...@gmail.com>
+Date:   Tue Jan 17 14:40:48 2017 -0800
+
+    xf86-video-mga 1.6.5
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit fc5d7acc23fcec9d87ca26fadf466fcf107671c0
+Author: Mathieu Larouche <mathieu.larou...@matrox.com>
+Date:   Wed Jul 20 09:18:49 2016 -0400
+
+    xf86-video-mga: Add support for the new G200e chipset -- V2
+    
+    - Added PLL algorithm for a new rev of G200e
+    - Removed the bandwidth limitation for the new G200e
+    
+    Fixes : https://bugs.freedesktop.org/show_bug.cgi?id=92540
+    
+    Change from V1 :
+    - Make sure we don't cause issue on previous chips. (Dave Airlie review)
+    
+    Signed-off-by: Mathieu Larouche <mathieu.larou...@matrox.com>
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 12781f2e3deb7f6d86fde53134384996a6004894
+Author: Mathieu Larouche <mathieu.larou...@matrox.com>
+Date:   Fri Jun 17 10:52:42 2016 -0400
+
+    xf86-video-mga: Add support for a new G200eW3 chipset
+    
+    - Added support for the new deviceID for G200eW3
+    - Added PLL algorithm for the G200eW3
+    - Added some initialization code for G200eW3
+    
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92541
+    
+    Signed-off-by: Mathieu Larouche <mathieu.larou...@matrox.com>
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit df094bfffe4ef097bfd9a569f2d2e35649c1a3c7
+Author: Adam Jackson <a...@redhat.com>
+Date:   Tue Jul 19 10:03:56 2016 -0400
+
+    Adapt Block/WakeupHandler signature for ABI 23
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit 72a8b5ef0bcb08d4cde7b329a13a59db35342f58
+Author: Thomas Klausner <w...@netbsd.org>
+Date:   Mon Feb 23 13:26:14 2015 +0100
+
+    Use correct type in function call.
+    
+    Fixes
+    passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer 
type
+    pciaccess.h:153:5: note: expected '__uint32_t *' but argument is of type 
'CARD32 *'
+    
+    Signed-off-by: Thomas Klausner <w...@netbsd.org>
+    Reviewed-by: Connor Behan <connor.be...@gmail.com>
+
+commit f1e6c73be073c8816319104b2fde329bc286f5ec
+Author: Connor Behan <connor.be...@gmail.com>
+Date:   Mon Aug 24 13:48:29 2015 -0400
+
+    Composite fixup
+    
+    A driver like this that tries to composite a lot will definitely need to
+    avoid crashing for solid pictures.
+    
+    Signed-off-by: Connor Behan <connor.be...@gmail.com>
+
+commit e6770f7cc11800ab6cc2e88790f357189de7ce32
+Author: Connor Behan <connor.be...@gmail.com>
+Date:   Mon Aug 24 11:48:16 2015 -0400
+
+    Remove DownloadFromScreen
+    
+    This hook was broken and did the same thing as a software fallback.
+    
+    Signed-off-by: Connor Behan <connor.be...@gmail.com>
+
+commit 04432b9c1db255e8e3d39a924f8803f83c407acc
+Author: Adam Jackson <a...@redhat.com>
+Date:   Tue May 5 11:05:44 2015 -0400
+
+    Enable write-combining on the framebuffer BAR
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit da1223394ac9b6f3974b0b2570cbf46a2425fc11
+Author: Matthew Rezny <matt...@reztek.cz>
+Date:   Sun Jun 21 19:50:43 2015 +0200
+
+    MGA DDX: make it possible to find EXA support
+    
+    Newer versions of the xserver stricter requirements on header order
+    which caused the configure tests for EXA support to erroneously fail.
+    Since XAA was already removed from an earlier version of xserver, the
+    configure failure meant no acceleration was possible. Patch configure
+    tests similar to r128.
+    
+    Reviewed-by: Adam Jackson <a...@redhat.com>
+
 commit 8ed77eb7920f375e9490a31f907eccb02fb123cd
 Author: Matt Turner <matts...@gmail.com>
 Date:   Thu Feb 19 13:39:18 2015 -0800
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/INSTALL new/xf86-video-mga-1.6.5/INSTALL
--- old/xf86-video-mga-1.6.4/INSTALL    2015-02-19 22:43:24.000000000 +0100
+++ new/xf86-video-mga-1.6.5/INSTALL    2017-01-17 23:41:14.000000000 +0100
@@ -1,11 +1,13 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
 
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
 
 Basic Installation
 ==================
@@ -13,7 +15,11 @@
    Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -42,7 +48,7 @@
 you want to change it or regenerate `configure' using a newer version
 of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
      `./configure' to configure the package for your system.
@@ -53,12 +59,22 @@
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
 
-  5. You can remove the program binaries and object files from the
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -67,8 +83,15 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
 
 Compilers and Options
 =====================
@@ -93,7 +116,8 @@
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
    With a non-GNU `make', it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
@@ -120,7 +144,8 @@
    By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
@@ -131,15 +156,46 @@
    In addition, if you use an unusual directory layout you can give
 options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -152,6 +208,13 @@
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
 Particular systems
 ==================
 
@@ -159,10 +222,15 @@
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae"
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 a workaround.  If GNU CC is not installed, it is therefore recommended
@@ -174,6 +242,16 @@
 
      ./configure CC="cc -nodtk"
 
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -189,7 +267,8 @@
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
@@ -277,7 +356,7 @@
      `configure' can determine that directory automatically.
 
 `--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
+     Use DIR as the installation prefix.  *note Installation Names::
      for more details, including other options available for fine-tuning
      the installation locations.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/compile new/xf86-video-mga-1.6.5/compile
--- old/xf86-video-mga-1.6.4/compile    2015-02-19 22:43:18.000000000 +0100
+++ new/xf86-video-mga-1.6.5/compile    2017-01-17 23:41:10.000000000 +0100
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/config.h.in new/xf86-video-mga-1.6.5/config.h.in
--- old/xf86-video-mga-1.6.4/config.h.in        2015-02-19 22:43:18.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/config.h.in        2017-01-17 23:41:10.000000000 
+0100
@@ -5,6 +5,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the <exa.h> header file. */
+#undef HAVE_EXA_H
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/configure.ac new/xf86-video-mga-1.6.5/configure.ac
--- old/xf86-video-mga-1.6.4/configure.ac       2015-02-19 22:38:57.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/configure.ac       2017-01-17 23:40:38.000000000 
+0100
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-mga],
-        [1.6.4],
+        [1.6.5],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-mga])
 AC_CONFIG_SRCDIR([Makefile.am])
@@ -155,8 +155,9 @@
 
     SAVE_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
-    AC_CHECK_HEADER(exa.h,
-                   [have_exa_h="yes"], [have_exa_h="no"])
+    AC_CHECK_HEADERS(exa.h,
+                   [have_exa_h="yes"], [have_exa_h="no"],
+                   [#include "xorg-server.h"])
     CPPFLAGS="$SAVE_CPPFLAGS"
 else
     AC_MSG_RESULT(no)
@@ -167,6 +168,7 @@
 if test "x$have_exa_h" = xyes; then
     AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
     AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "xorg-server.h"
 #include "exa.h"
 #if EXA_VERSION_MAJOR < 2
 #error OLD EXA!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/missing new/xf86-video-mga-1.6.5/missing
--- old/xf86-video-mga-1.6.4/missing    2015-02-19 22:43:18.000000000 +0100
+++ new/xf86-video-mga-1.6.5/missing    2017-01-17 23:41:10.000000000 +0100
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/compat-api.h 
new/xf86-video-mga-1.6.5/src/compat-api.h
--- old/xf86-video-mga-1.6.4/src/compat-api.h   2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/compat-api.h   2017-01-17 23:40:29.000000000 
+0100
@@ -75,8 +75,13 @@
 
 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, 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
+#else
 #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer 
pReadmask
 #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+#endif
 
 #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
 #define CLOSE_SCREEN_ARGS pScreen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga.h new/xf86-video-mga-1.6.5/src/mga.h
--- old/xf86-video-mga-1.6.4/src/mga.h  2015-02-19 20:51:35.000000000 +0100
+++ new/xf86-video-mga-1.6.5/src/mga.h  2017-01-17 23:40:29.000000000 +0100
@@ -146,6 +146,12 @@
 #define PCI_CHIP_MGAG400                0x0525
 #define PCI_CHIP_MGAG550                0x2527
 
+#ifndef PCI_CHIP_MGAG200_EW3_PCI
+#define PCI_CHIP_MGAG200_EW3_PCI 0x0536
+#endif
+
+
+
 /*
  * Read/write to the DAC via MMIO 
  */
@@ -209,9 +215,9 @@
 typedef struct {
     unsigned char      ExtVga[6];
     unsigned char      DacClk[6];
-    unsigned char      ExtVga_Index24;
+    unsigned char      ExtVga_MgaReq;
     unsigned char      Dac_Index90;
-    unsigned char * DacRegs;
+    unsigned char       * DacRegs;
     unsigned long      crtc2[0x58];
     unsigned char      dac2[0x21];
     CARD32             Option;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_dac3026.c 
new/xf86-video-mga-1.6.5/src/mga_dac3026.c
--- old/xf86-video-mga-1.6.4/src/mga_dac3026.c  2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_dac3026.c  2017-01-17 23:40:29.000000000 
+0100
@@ -852,8 +852,12 @@
                mgaReg->DacRegs[i]       = inTi3026(MGADACregs[i]);
        
 #ifdef XSERVER_LIBPCIACCESS
-       pci_device_cfg_read_u32(pMga->PciInfo, & mgaReg->Option, 
+    {
+       uint32_t Option;
+       pci_device_cfg_read_u32(pMga->PciInfo, & Option,
                                PCI_OPTION_REG);
+        mgaReg->Option = Option;
+    }
 #else
        mgaReg->Option = pciReadLong(pMga->PciTag, PCI_OPTION_REG);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_dacG.c new/xf86-video-mga-1.6.5/src/mga_dacG.c
--- old/xf86-video-mga-1.6.4/src/mga_dacG.c     2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_dacG.c     2017-01-17 23:40:29.000000000 
+0100
@@ -51,6 +51,75 @@
 static void MGAGLoadPalette(ScrnInfoPtr, int, int*, LOCO*, VisualPtr);
 static Bool MGAG_i2cInit(ScrnInfoPtr pScrn);
 
+#define P_ARRAY_SIZE 9
+
+void
+MGAG200E4ComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
+{
+    unsigned int ulComputedFo;
+    unsigned int ulFDelta;
+    unsigned int ulFPermitedDelta;
+    unsigned int ulFTmpDelta;
+    unsigned int ulVCOMax, ulVCOMin;
+    unsigned int ulTestP;
+    unsigned int ulTestM;
+    unsigned int ulTestN;
+    unsigned int ulFoInternal;
+    unsigned int ulPLLFreqRef;
+    unsigned int pulPValues[P_ARRAY_SIZE] = {16, 14, 12, 10, 8, 6, 4, 2, 1};
+    unsigned int i;
+    unsigned int ulVCO;
+    unsigned int ulFVV;
+
+    ulVCOMax        = 1600000;
+    ulVCOMin        = 800000;
+    ulPLLFreqRef    = 25000;
+
+    if(lFo < 25000)
+        lFo = 25000;
+
+    ulFoInternal = lFo * 2;
+
+    ulFDelta = 0xFFFFFFFF;
+    /* Permited delta is 0.5% as VESA Specification */
+    ulFPermitedDelta = ulFoInternal * 5 / 1000;  
+
+    for (i = 0 ; i < P_ARRAY_SIZE ; i++)
+    {
+        ulTestP = pulPValues[i];
+
+        if ((ulFoInternal * ulTestP) > ulVCOMax) continue;
+        if ((ulFoInternal * ulTestP) < ulVCOMin) continue;
+
+        for (ulTestN = 50; ulTestN <= 256; ulTestN++) {
+            for (ulTestM = 1; ulTestM <= 32; ulTestM++) {
+                ulComputedFo = (ulPLLFreqRef * ulTestN) / (ulTestM * ulTestP);
+                if (ulComputedFo > ulFoInternal)
+                    ulFTmpDelta = ulComputedFo - ulFoInternal;
+                else
+                    ulFTmpDelta = ulFoInternal - ulComputedFo;
+
+                if (ulFTmpDelta < ulFDelta) {
+                    ulFDelta = ulFTmpDelta;
+                    *M = ulTestM - 1;
+                    *N = ulTestN - 1;
+                    *P = ulTestP - 1;
+                }
+            }
+        }
+    }
+                                                                               
                                     
+    ulVCO = ulPLLFreqRef * ((*N)+1) / ((*M)+1);
+    ulFVV = (ulVCO - 800000) / 50000;
+
+    if (ulFVV > 15)
+        ulFVV = 15;
+
+    *P |= (ulFVV << 4);                                                        
                                     
+
+    *M |= 0x80;
+}
+
 static void
 MGAG200SEComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
 {
@@ -207,6 +276,74 @@
 #endif
 }
 
+void
+MGAG200EW3ComputePLLParam(ScrnInfoPtr pScrn ,long lFo, int *M, int *N, int *P)
+{
+    unsigned int ulComputedFo;
+    unsigned int ulFDelta;
+    unsigned int ulFPermitedDelta;
+    unsigned int ulFTmpDelta;
+    unsigned int ulVCOMax, ulVCOMin;
+    unsigned int ulTestP1;
+    unsigned int ulTestP2;
+    unsigned int ulTestM;
+    unsigned int ulTestN;
+    unsigned int ulPLLFreqRef;
+    unsigned int ulTestP1Start;
+    unsigned int ulTestP1End;
+    unsigned int ulTestP2Start;
+    unsigned int ulTestP2End;
+    unsigned int ulTestMStart;
+    unsigned int ulTestMEnd;
+    unsigned int ulTestNStart;
+    unsigned int ulTestNEnd;
+
+    ulVCOMax        = 800000;
+    ulVCOMin        = 400000;
+    ulPLLFreqRef    = 25000;
+    ulTestP1Start   = 1;
+    ulTestP1End     = 8;
+    ulTestP2Start   = 1;
+    ulTestP2End     = 8;
+    ulTestMStart    = 1;
+    ulTestMEnd      = 26;
+    ulTestNStart    = 32;
+    ulTestNEnd      = 2048;
+
+    ulFDelta = 0xFFFFFFFF;
+    /* Permited delta is 0.5% as VESA Specification */
+    ulFPermitedDelta = lFo * 5 / 1000;
+
+    /* Then we need to minimize the M while staying within 0.5% */
+    for (ulTestP1 = ulTestP1Start; ulTestP1 < ulTestP1End; ulTestP1++) {
+        for (ulTestP2 = ulTestP2Start; ulTestP2 < ulTestP2End; ulTestP2++) {
+            if (ulTestP1 < ulTestP2) continue;
+            if ((lFo * ulTestP1 * ulTestP2) > ulVCOMax) continue;
+            if ((lFo * ulTestP1 * ulTestP2) < ulVCOMin) continue;
+
+            for (ulTestM = ulTestMStart; ulTestM < ulTestMEnd; ulTestM++) {
+                for (ulTestN = ulTestNStart; ulTestN < ulTestNEnd; ulTestN++) {
+                    ulComputedFo = (ulPLLFreqRef * ulTestN) / (ulTestM * 
ulTestP1 * ulTestP2);
+                    if (ulComputedFo > lFo)
+                        ulFTmpDelta = ulComputedFo - lFo;
+                    else
+                        ulFTmpDelta = lFo - ulComputedFo;
+
+                    if (ulFTmpDelta < ulFDelta) {
+                        ulFDelta = ulFTmpDelta;
+                        *M = (CARD8)((ulTestN & 0x100) >> 1) | 
+                             (CARD8)(ulTestM);
+                        *N = (CARD8)(ulTestN & 0xFF);
+                        *P = (CARD8)((ulTestN & 0x600) >> 3) | 
+                             (CARD8)(ulTestP2 << 3) | 
+                             (CARD8)ulTestP1;
+                    }
+                }
+            }
+        }
+    }
+}
+
 static void
 MGAG200EHComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
 {
@@ -890,7 +1027,11 @@
        }
 
        if (pMga->is_G200SE) {
-           MGAG200SEComputePLLParam(pScrn, f_out, &m, &n, &p);
+            if (pMga->reg_1e24 >= 0x04) {
+                MGAG200E4ComputePLLParam(pScrn, f_out, &m, &n, &p);
+            } else {
+                MGAG200SEComputePLLParam(pScrn, f_out, &m, &n, &p);
+            }
 
            pReg->DacRegs[ MGA1064_PIX_PLLC_M ] = m;
            pReg->DacRegs[ MGA1064_PIX_PLLC_N ] = n;
@@ -902,7 +1043,14 @@
            pReg->PllN = n;
            pReg->PllP = p;
        } else if (pMga->is_G200WB) {
-           MGAG200WBComputePLLParam(pScrn, f_out, &m, &n, &p);
+            if (pMga->Chipset == PCI_CHIP_MGAG200_EW3_PCI)
+            {
+                 MGAG200EW3ComputePLLParam(pScrn, f_out, &m, &n, &p);
+            }
+            else
+            {
+                MGAG200WBComputePLLParam(pScrn, f_out, &m, &n, &p);
+            }
 
            pReg->PllM = m;
            pReg->PllN = n;
@@ -1092,6 +1240,7 @@
                break;
 
         case PCI_CHIP_MGAG200_WINBOND_PCI:
+        case PCI_CHIP_MGAG200_EW3_PCI:
                 pReg->DacRegs[MGA1064_VREF_CTL] = 0x07;
                 pReg->Option = 0x41049120;
                 pReg->Option2 = 0x0000b000;
@@ -1232,7 +1381,7 @@
         if (pMga->is_G200WB){
             pReg->ExtVga[1] |= 0x88;
         }
-       pReg->ExtVga_Index24 = 0x05;
+       pReg->ExtVga_MgaReq = 0x05;
                
        pVga->CRTC[0]   = ht - 4;
        pVga->CRTC[1]   = hd;
@@ -1481,7 +1630,12 @@
         {
                        outMGAdac(0x90, mgaReg->Dac_Index90);
         }
-   
+           if (pMga->is_G200SE && (pMga->reg_1e24 >= 0x04)) {
+              outMGAdac( 0x1a, 0x09);
+              usleep(500);
+              outMGAdac( 0x1a, 0x01);
+           }
+    
           if (!MGAISGx50(pMga)) {
               /* restore pci_option register */
 #ifdef XSERVER_LIBPCIACCESS
@@ -1528,7 +1682,15 @@
 
            if (pMga->is_G200ER) {
                OUTREG8(MGAREG_CRTCEXT_INDEX, 0x24);
-               OUTREG8(MGAREG_CRTCEXT_DATA,  mgaReg->ExtVga_Index24);          
           
+               OUTREG8(MGAREG_CRTCEXT_DATA,  mgaReg->ExtVga_MgaReq);           
           
+           }
+
+           if (pMga->is_G200WB) {
+               if(pMga->Chipset == PCI_CHIP_MGAG200_EW3_PCI)
+               {
+                   OUTREG8(MGAREG_CRTCEXT_INDEX, 0x34);
+                   OUTREG8(MGAREG_CRTCEXT_DATA,  mgaReg->ExtVga_MgaReq);
+               } 
            }
 
           /* This handles restoring the generic VGA registers. */
@@ -1717,8 +1879,16 @@
        if (pMga->is_G200ER)
        {
                OUTREG8(MGAREG_CRTCEXT_INDEX, 0x24);
-               mgaReg->ExtVga_Index24 = INREG8(MGAREG_CRTCEXT_DATA);
-       }
+               mgaReg->ExtVga_MgaReq = INREG8(MGAREG_CRTCEXT_DATA);
+       }
+        if (pMga->is_G200WB) 
+        {
+            if(pMga->Chipset == PCI_CHIP_MGAG200_EW3_PCI)
+            {
+                OUTREG8(MGAREG_CRTCEXT_INDEX, 0x34);
+                mgaReg->ExtVga_MgaReq = INREG8(MGAREG_CRTCEXT_DATA);           
     
+            }
+        }
 
 #ifdef DEBUG           
        ErrorF("Saved values:\nDAC:");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_driver.c 
new/xf86-video-mga-1.6.5/src/mga_driver.c
--- old/xf86-video-mga-1.6.4/src/mga_driver.c   2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_driver.c   2017-01-17 23:40:29.000000000 
+0100
@@ -315,7 +315,7 @@
     },
 
     /* G200SE A PCI */
-    [10] = { 0, 1, 0, 0, 1, 0, 0, 1, new_BARs,
+    [10] = { 0, 1, 0, 0, 1, 0, 0, 0, new_BARs,
             (TRANSC_SOLID_FILL | TWO_PASS_COLOR_EXPAND | USE_LINEAR_EXPANSION),
        {
            { 50000, 230000 }, /* System VCO frequencies */
@@ -331,7 +331,7 @@
     },
 
     /* G200SE B PCI */
-    [11] = { 0, 1, 0, 0, 1, 0, 0, 1, new_BARs,
+    [11] = { 0, 1, 0, 0, 1, 0, 0, 0, new_BARs,
             (TRANSC_SOLID_FILL | TWO_PASS_COLOR_EXPAND | USE_LINEAR_EXPANSION),
        {
            { 50000, 114000 }, /* System VCO frequencies */
@@ -408,6 +408,22 @@
        },
 
        16384, 0x4000,          /* Memory probe size & offset values */
+    },
+
+    /* G200WB */
+    [16] = { 0, 1, 0, 0, 1, 0, 0, 0, new_BARs,
+            (TRANSC_SOLID_FILL | TWO_PASS_COLOR_EXPAND | USE_LINEAR_EXPANSION),
+       {
+           { 50000, 230000 }, /* System VCO frequencies */
+           { 50000, 203400 }, /* Pixel VCO frequencies */
+           { 0, 0 },          /* Video VCO frequencies */
+           45000,            /* Memory clock */
+           27050,             /* PLL reference frequency */
+           0,                 /* Supports fast bitblt? */
+           MGA_HOST_PCI       /* Host interface */
+       },
+
+       16384, 0x4000,          /* Memory probe size & offset values */
     }
 };
 
@@ -438,7 +454,9 @@
 
     MGA_DEVICE_MATCH( PCI_CHIP_MGAG200_EH_PCI, 14 ),
 
-       MGA_DEVICE_MATCH(PCI_CHIP_MGAG200_ER_PCI, 15 ),
+    MGA_DEVICE_MATCH(PCI_CHIP_MGAG200_ER_PCI, 15 ),
+
+    MGA_DEVICE_MATCH( PCI_CHIP_MGAG200_EW3_PCI, 16 ),
 
     { 0, 0, 0 },
 };
@@ -459,6 +477,7 @@
     { PCI_CHIP_MGAG200_EV_PCI, "mgag200 EV Maxim" },
     { PCI_CHIP_MGAG200_ER_PCI, "mgag200 ER SH7757" },  
     { PCI_CHIP_MGAG200_WINBOND_PCI,    "mgag200 eW Nuvoton" },
+    { PCI_CHIP_MGAG200_EW3_PCI,        "mgag200 eW3 Nuvoton" },
     { PCI_CHIP_MGAG200_EH_PCI, "mgag200eH" },
     { PCI_CHIP_MGAG400,                "mgag400" },
     { PCI_CHIP_MGAG550,                "mgag550" },
@@ -484,6 +503,8 @@
        RES_SHARED_VGA },
     { PCI_CHIP_MGAG200_WINBOND_PCI, PCI_CHIP_MGAG200_WINBOND_PCI,
        RES_SHARED_VGA },
+    { PCI_CHIP_MGAG200_EW3_PCI, PCI_CHIP_MGAG200_EW3_PCI,
+       RES_SHARED_VGA },
     { PCI_CHIP_MGAG200_EH_PCI, PCI_CHIP_MGAG200_EH_PCI,
        RES_SHARED_VGA },
     { PCI_CHIP_MGAG400,            PCI_CHIP_MGAG400,   RES_SHARED_VGA },
@@ -923,6 +944,9 @@
                 attrib_no = 15;
                 break;
                                
+            case PCI_CHIP_MGAG200_EW3_PCI:
+                attrib_no = 16;
+                break;
 
            default:
                return FALSE;
@@ -1541,7 +1565,8 @@
     pMga->is_G200SE = (pMga->Chipset == PCI_CHIP_MGAG200_SE_A_PCI)
        || (pMga->Chipset == PCI_CHIP_MGAG200_SE_B_PCI);
     pMga->is_G200EV = (pMga->Chipset == PCI_CHIP_MGAG200_EV_PCI);
-    pMga->is_G200WB = (pMga->Chipset == PCI_CHIP_MGAG200_WINBOND_PCI);
+    pMga->is_G200WB = (pMga->Chipset == PCI_CHIP_MGAG200_WINBOND_PCI)
+       || (pMga->Chipset ==  PCI_CHIP_MGAG200_EW3_PCI);
     pMga->is_G200EH = (pMga->Chipset == PCI_CHIP_MGAG200_EH_PCI);
     pMga->is_G200ER = (pMga->Chipset == PCI_CHIP_MGAG200_ER_PCI);
 
@@ -2049,6 +2074,7 @@
     case PCI_CHIP_MGAG200_SE_A_PCI:
     case PCI_CHIP_MGAG200_SE_B_PCI:
     case PCI_CHIP_MGAG200_WINBOND_PCI:
+    case PCI_CHIP_MGAG200_EW3_PCI:
     case PCI_CHIP_MGAG200_EV_PCI:
     case PCI_CHIP_MGAG200_EH_PCI:
     case PCI_CHIP_MGAG200_ER_PCI:      
@@ -2163,8 +2189,9 @@
          case PCI_CHIP_MGAG200_SE_A_PCI:
          case PCI_CHIP_MGAG200_SE_B_PCI:
           case PCI_CHIP_MGAG200_WINBOND_PCI:
+         case PCI_CHIP_MGAG200_EW3_PCI:
          case PCI_CHIP_MGAG200_EV_PCI:
-      case PCI_CHIP_MGAG200_EH_PCI:
+         case PCI_CHIP_MGAG200_EH_PCI:
          case PCI_CHIP_MGAG200_ER_PCI:   
            pMga->SrcOrg = 0;
            pMga->DstOrg = 0;
@@ -2347,6 +2374,7 @@
        case PCI_CHIP_MGAG200_PCI:
        case PCI_CHIP_MGAG200_SE_B_PCI:
         case PCI_CHIP_MGAG200_WINBOND_PCI:
+       case PCI_CHIP_MGAG200_EW3_PCI:
        case PCI_CHIP_MGAG200_EV_PCI:
     case PCI_CHIP_MGAG200_EH_PCI:
        case PCI_CHIP_MGAG200_ER_PCI:   
@@ -2594,7 +2622,8 @@
        pciaddr_t fbsize = pMga->FbMapSize;
        err = pci_device_map_range(dev,
                                   fbaddr, fbsize,
-                                  PCI_DEV_MAP_FLAG_WRITABLE,
+                                  PCI_DEV_MAP_FLAG_WRITABLE |
+                                  PCI_DEV_MAP_FLAG_WRITE_COMBINE,
                                   (void **)&pMga->FbBase);
 
        if (err) {
@@ -3825,7 +3854,7 @@
                if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
                    return MODE_BANDWIDTH;
         } else {
-            if (pMga->reg_1e24 >= 0x02) {
+            if (pMga->reg_1e24 == 0x02) {
                    if (mode->HDisplay > 1920)
                        return MODE_VIRTUAL_X;
                    if (mode->VDisplay > 1200)
@@ -3837,12 +3866,15 @@
     } else if (pMga->is_G200WB){
         if (mode->Flags & V_DBLSCAN)
             return MODE_NO_DBLESCAN;
-       if (pMga->KVM && mode->HDisplay > 1280)
-           return MODE_VIRTUAL_X;
-       if (pMga->KVM && mode->VDisplay > 1024)
-           return MODE_VIRTUAL_Y;
-       if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 318.77)
-           return MODE_BANDWIDTH;
+        if (pMga->Chipset != PCI_CHIP_MGAG200_EW3_PCI)
+        {
+           if (pMga->KVM && mode->HDisplay > 1280)
+               return MODE_VIRTUAL_X;
+           if (pMga->KVM && mode->VDisplay > 1024)
+               return MODE_VIRTUAL_Y;
+           if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 318.77)
+               return MODE_BANDWIDTH;
+        }
     } else if (pMga->is_G200EV
               && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 327)) {
        return MODE_BANDWIDTH;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_exa.c new/xf86-video-mga-1.6.5/src/mga_exa.c
--- old/xf86-video-mga-1.6.4/src/mga_exa.c      2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_exa.c      2017-01-17 23:40:29.000000000 
+0100
@@ -318,6 +318,11 @@
 static Bool
 mgaCheckSourceTexture(int tmu, PicturePtr pPict)
 {
+    if (!pPict->pDrawable) {
+        DEBUG_MSG(("Solid / gradient pictures not supported\n"));
+        return FALSE;
+    }
+
     int w = pPict->pDrawable->width;
     int h = pPict->pDrawable->height;
 
@@ -354,7 +359,7 @@
 mgaCheckComposite(int op, PicturePtr pSrcPict, PicturePtr pMaskPict,
                   PicturePtr pDstPict)
 {
-    MGAPtr pMga = 
xf86ScreenToScrn(pSrcPict->pDrawable->pScreen)->driverPrivate;
+    MGAPtr pMga = 
xf86ScreenToScrn(pDstPict->pDrawable->pScreen)->driverPrivate;
 
     if (op >= sizeof(mgaBlendOp) / sizeof(mgaBlendOp[0])) {
         DEBUG_MSG(("unsupported op %x\n", op));
@@ -521,6 +526,7 @@
 {
     PMGA(pDst);
     CARD32 fcol = 0xff000000, ds0 = 0, ds1 = 0, cmd, blendcntl;
+    if (!pSrc || !pSrcPict->pDrawable) return FALSE;
 
     mgaSetup(pMga, pDst, pDstPict, 2);
     OUTREG(MGAREG_DSTORG, exaGetPixmapOffset(pDst));
@@ -723,31 +729,6 @@
     return TRUE;
 }
 
-static Bool
-mgaDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
-                      char *dst, int dst_pitch)
-{
-    PMGA(pSrc);
-
-    char *src = (char *) exaGetPixmapFirstPixel(pSrc);
-    int src_pitch = exaGetPixmapPitch(pSrc);
-
-    int cpp = (pSrc->drawable.bitsPerPixel + 7) / 8;
-    int bytes = w * cpp;
-
-    src += y * src_pitch + x * cpp;
-
-    QUIESCE_DMA(pSrc);
-
-    while (h--) {
-       memcpy (dst, src, bytes);
-       src += src_pitch;
-       dst += dst_pitch;
-    }
-
-    return TRUE;
-}
-
 static void
 mgaWaitMarker(ScreenPtr pScreen, int marker)
 {
@@ -895,7 +876,6 @@
     }
 
     pExa->UploadToScreen = mgaUploadToScreen;
-    pExa->DownloadFromScreen = mgaDownloadFromScreen;
 
 #ifdef MGADRI
     if (pMga->directRenderingEnabled)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_merge.c 
new/xf86-video-mga-1.6.5/src/mga_merge.c
--- old/xf86-video-mga-1.6.4/src/mga_merge.c    2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_merge.c    2017-01-17 23:40:29.000000000 
+0100
@@ -353,9 +353,10 @@
     case PCI_CHIP_MGAG200_SE_A_PCI:
     case PCI_CHIP_MGAG200_SE_B_PCI:
     case PCI_CHIP_MGAG200_WINBOND_PCI:
+    case PCI_CHIP_MGAG200_EW3_PCI:
     case PCI_CHIP_MGAG200_EV_PCI:
     case PCI_CHIP_MGAG200_EH_PCI:
-       case PCI_CHIP_MGAG200_ER_PCI:
+    case PCI_CHIP_MGAG200_ER_PCI:
     case PCI_CHIP_MGAG400:
     case PCI_CHIP_MGAG550:
        MGAGSetupFuncs(pScrn);
@@ -505,6 +506,7 @@
        case PCI_CHIP_MGAG200_SE_A_PCI:
        case PCI_CHIP_MGAG200_SE_B_PCI:
         case PCI_CHIP_MGAG200_WINBOND_PCI:
+       case PCI_CHIP_MGAG200_EW3_PCI:          
         case PCI_CHIP_MGAG200_EV_PCI:
         case PCI_CHIP_MGAG200_EH_PCI:
        case PCI_CHIP_MGAG200_ER_PCI:           
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-mga-1.6.4/src/mga_storm.c 
new/xf86-video-mga-1.6.5/src/mga_storm.c
--- old/xf86-video-mga-1.6.4/src/mga_storm.c    2015-02-19 20:51:35.000000000 
+0100
+++ new/xf86-video-mga-1.6.5/src/mga_storm.c    2017-01-17 23:40:29.000000000 
+0100
@@ -1148,6 +1148,7 @@
     case PCI_CHIP_MGAG200_SE_A_PCI:
     case PCI_CHIP_MGAG200_SE_B_PCI:
     case PCI_CHIP_MGAG200_WINBOND_PCI:
+    case PCI_CHIP_MGAG200_EW3_PCI:
     case PCI_CHIP_MGAG200_EV_PCI:
     case PCI_CHIP_MGAG200_EH_PCI:
     case PCI_CHIP_MGAG200_ER_PCI:      


Reply via email to