22993744 mga driver core dump after enabling EXA s12_99
authorhenryzh <henry.zhao@oracle.com>
Tue, 03 May 2016 12:08:34 -0700
changeset 1631 4f761c384e9b
parent 1630 fedd05237f45
child 1632 3a44fbe3342c
22993744 mga driver core dump after enabling EXA 22993389 S12: mga driver not linked with EXA module in later builds
open-src/driver/xf86-video-mga/22993389.patch
open-src/driver/xf86-video-mga/22993744.patch
open-src/driver/xf86-video-mga/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-mga/22993389.patch	Tue May 03 12:08:34 2016 -0700
@@ -0,0 +1,29 @@
+diff --git a/configure.ac b/configure.ac
+index b770c88..94abea4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,3 +1,6 @@
++#
++#  Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
++#
+ #  Copyright 2005 Adam Jackson.
+ #
+ #  Permission is hereby granted, free of charge, to any person obtaining a
+@@ -156,7 +159,8 @@ if test "x$EXA" = xyes; then
+     SAVE_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+     AC_CHECK_HEADER(exa.h,
+-                   [have_exa_h="yes"], [have_exa_h="no"])
++                   [have_exa_h="yes"], [have_exa_h="no"],
++		    [#include "xorg-server.h"])
+     CPPFLAGS="$SAVE_CPPFLAGS"
+ else
+     AC_MSG_RESULT(no)
+@@ -167,6 +171,7 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+ 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!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-mga/22993744.patch	Tue May 03 12:08:34 2016 -0700
@@ -0,0 +1,20 @@
+diff --git a/src/mga_exa.c b/src/mga_exa.c
+index 69ffa16..c9e0038 100644
+--- a/src/mga_exa.c
++++ b/src/mga_exa.c
+@@ -1,4 +1,6 @@
+ /*
++ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
++ *
+  * Copyright 2006 Red Hat, Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person obtaining a
+@@ -756,7 +758,7 @@ mgaWaitMarker(ScreenPtr pScreen, int marker)
+ 
+     WAITFIFO(1);
+ 
+-    OUTREG(MGAREG_CACHEFLUSH, 0);
++    OUTREG8(MGAREG_CACHEFLUSH, 0);
+ 
+     /* wait until the "drawing engine busy" bit is unset */
+     while (INREG (MGAREG_Status) & 0x10000);
--- a/open-src/driver/xf86-video-mga/Makefile	Tue Apr 26 19:17:51 2016 -0700
+++ b/open-src/driver/xf86-video-mga/Makefile	Tue May 03 12:08:34 2016 -0700
@@ -2,7 +2,7 @@
 #
 # xf86-video-mga Makefile
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -41,7 +41,9 @@
 		libraries.patch,-p1 \
 		g200se_pilot3_offscreen.patch,-p1 \
 		sparc.patch,-p1 \
-		rom_map.patch,-p1
+		rom_map.patch,-p1 \
+		22993389.patch,-p1 \
+		22993744.patch,-p1
 
 # Regenerate Makefile after libraries.patch patches src/Makefile.am
 AUTORECONF=yes