[xorg-x11-drv-openchrome] Make EXA work out of the box.
Xavier Bachelot
xavierb at fedoraproject.org
Mon Mar 26 20:43:13 UTC 2012
commit a7f63d752bcea7ec071a500be6ff5e07abca3254
Author: Xavier Bachelot <xavier at bachelot.org>
Date: Mon Mar 26 22:41:25 2012 +0200
Make EXA work out of the box.
openchrome-0.2.905-default_to_exa.patch | 454 +++++++++++++++++++++++++++++++
xorg-x11-drv-openchrome.spec | 7 +-
2 files changed, 459 insertions(+), 2 deletions(-)
---
diff --git a/openchrome-0.2.905-default_to_exa.patch b/openchrome-0.2.905-default_to_exa.patch
new file mode 100644
index 0000000..e3d3f7e
--- /dev/null
+++ b/openchrome-0.2.905-default_to_exa.patch
@@ -0,0 +1,454 @@
+commit 86361d6f3377d48818fb7b58f1f079020732dd3a
+Author: James Simmons <jsimmons at infradead.org>
+Date: Fri Mar 23 19:16:25 2012 -0400
+
+ Borrow the ROP values from xf86-video-chrome which comes from the nouveau project. Its silly that every one have their own ROP values but its the way it is.
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a5a6c6c..14ef961 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -37,6 +37,7 @@ openchrome_drv_la_SOURCES = \
+ via_3d.c \
+ via_3d.h \
+ via_3d_reg.h \
++ via_rop.h \
+ via_accel.c \
+ via_bandwidth.c \
+ via_bios.h \
+diff --git a/src/via_accel.c b/src/via_accel.c
+index 2cd77b3..306ebdd 100644
+--- a/src/via_accel.c
++++ b/src/via_accel.c
+@@ -35,7 +35,6 @@
+
+ #include <X11/Xarch.h>
+ #include "xaalocal.h"
+-#include "xaarop.h"
+ #include "miline.h"
+
+ #include "via.h"
+@@ -43,14 +42,7 @@
+ #include "via_regs.h"
+ #include "via_id.h"
+ #include "via_dmabuffer.h"
+-
+-#ifdef X_HAVE_XAAGETROP
+-#define VIAACCELPATTERNROP(vRop) (XAAGetPatternROP(vRop) << 24)
+-#define VIAACCELCOPYROP(vRop) (XAAGetCopyROP(vRop) << 24)
+-#else
+-#define VIAACCELPATTERNROP(vRop) (XAAPatternROP[vRop] << 24)
+-#define VIAACCELCOPYROP(vRop) (XAACopyROP[vRop] << 24)
+-#endif
++#include "via_rop.h"
+
+ enum VIA_2D_Regs {
+ GECMD,
+diff --git a/src/via_rop.h b/src/via_rop.h
+new file mode 100644
+index 0000000..5011c26
+--- /dev/null
++++ b/src/via_rop.h
+@@ -0,0 +1,322 @@
++/*
++ * Copyright 2008 Maarten Maathuis
++ *
++ * 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 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 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.
++ */
++
++/* Ternary Raster Operations as defined by GDI
++ * 0 = black
++ * 1 = white
++ * D = destination
++ * S = source
++ * P = pattern
++ * o = bitwise OR
++ * a = bitwise AND
++ * n = bitwise inverse
++ * x = bitwise XOR
++ *
++ * The notation is reverse polish.
++ * Example:
++ * ROP_PDSonon: !(P | !(D | S))
++*/
++
++#define ROP_0 0x00
++#define ROP_DPSoon 0x01
++#define ROP_DPSona 0x02
++#define ROP_PSon 0x03
++#define ROP_SDPona 0x04
++#define ROP_DPon 0x05
++#define ROP_PDSxnon 0x06
++#define ROP_PDSaon 0x07
++#define ROP_SDPnaa 0x08
++#define ROP_PDSxon 0x09
++#define ROP_DPna 0x0A
++#define ROP_PSDnaon 0x0B
++#define ROP_SPna 0x0C
++#define ROP_PDSnaon 0x0D
++#define ROP_PDSonon 0x0E
++#define ROP_Pn 0x0F
++#define ROP_PDSona 0x10
++#define ROP_DSon 0x11
++#define ROP_SDPxnon 0x12
++#define ROP_SDPaon 0x13
++#define ROP_DPSxnon 0x14
++#define ROP_DPSaon 0x15
++#define ROP_PSDPSanaxx 0x16
++#define ROP_SSPxDSxaxn 0x17
++#define ROP_SPxPDxa 0x18
++#define ROP_SDPSanaxn 0x19
++#define ROP_PDSPaox 0x1A
++#define ROP_SDPSxaxn 0x1B
++#define ROP_PSDPaox 0x1C
++#define ROP_DSPDxaxn 0x1D
++#define ROP_PDSox 0x1E
++#define ROP_PDSoan 0x1F
++#define ROP_DPSnaa 0x20
++#define ROP_SDPxon 0x21
++#define ROP_DSna 0x22
++#define ROP_SPDnaon 0x23
++#define ROP_SPxDSxa 0x24
++#define ROP_PDSPanaxn 0x25
++#define ROP_SDPSaox 0x26
++#define ROP_SDPSxnox 0x27
++#define ROP_DPSxa 0x28
++#define ROP_PSDPSaoxxn 0x29
++#define ROP_DPSana 0x2A
++#define ROP_SSPxPDxaxn 0x2B
++#define ROP_SPDSoax 0x2C
++#define ROP_PSDnox 0x2D
++#define ROP_PSDPxox 0x2E
++#define ROP_PSDnoan 0x2F
++#define ROP_PSna 0x30
++#define ROP_SDPnaon 0x31
++#define ROP_SDPSoox 0x32
++#define ROP_Sn 0x33
++#define ROP_SPDSaox 0x34
++#define ROP_SPDSxnox 0x35
++#define ROP_SDPox 0x36
++#define ROP_SDPoan 0x37
++#define ROP_PSDPoax 0x38
++#define ROP_SPDnox 0x39
++#define ROP_SPDSxox 0x3A
++#define ROP_SPDnoan 0x3B
++#define ROP_PSx 0x3C
++#define ROP_SPDSonox 0x3D
++#define ROP_SPDSnaox 0x3E
++#define ROP_PSan 0x3F
++#define ROP_PSDnaa 0x40
++#define ROP_DPSxon 0x41
++#define ROP_SDxPDxa 0x42
++#define ROP_SPDSanaxn 0x43
++#define ROP_SDna 0x44
++#define ROP_DPSnaon 0x45
++#define ROP_DSPDaox 0x46
++#define ROP_PSDPxaxn 0x47
++#define ROP_SDPxa 0x48
++#define ROP_PDSPDaoxxn 0x49
++#define ROP_DPSDoax 0x4A
++#define ROP_PDSnox 0x4B
++#define ROP_SDPana 0x4C
++#define ROP_SSPxDSxoxn 0x4D
++#define ROP_PDSPxox 0x4E
++#define ROP_PDSnoan 0x4F
++#define ROP_PDna 0x50
++#define ROP_DSPnaon 0x51
++#define ROP_DPSDaox 0x52
++#define ROP_SPDSxaxn 0x53
++#define ROP_DPSonon 0x54
++#define ROP_Dn 0x55
++#define ROP_DPSox 0x56
++#define ROP_DPSoan 0x57
++#define ROP_PDSPoax 0x58
++#define ROP_DPSnox 0x59
++#define ROP_DPx 0x5A
++#define ROP_DPSDonox 0x5B
++#define ROP_DPSDxox 0x5C
++#define ROP_DPSnoan 0x5D
++#define ROP_DPSDnaox 0x5E
++#define ROP_DPan 0x5F
++#define ROP_PDSxa 0x60
++#define ROP_DSPDSaoxxn 0x61
++#define ROP_DSPDoax 0x62
++#define ROP_SDPnox 0x63
++#define ROP_SDPSoax 0x64
++#define ROP_DSPnox 0x65
++#define ROP_DSx 0x66
++#define ROP_SDPSonox 0x67
++#define ROP_DSPDSonoxxn 0x68
++#define ROP_PDSxxn 0x69
++#define ROP_DPSax 0x6A
++#define ROP_PSDPSoaxxn 0x6B
++#define ROP_SDPax 0x6C
++#define ROP_PDSPDoaxxn 0x6D
++#define ROP_SDPSnoax 0x6E
++#define ROP_PDSxnan 0x6F
++#define ROP_PDSana 0x70
++#define ROP_SSDxPDxaxn 0x71
++#define ROP_SDPSxox 0x72
++#define ROP_SDPnoan 0x73
++#define ROP_DSPDxox 0x74
++#define ROP_DSPnoan 0x75
++#define ROP_SDPSnaox 0x76
++#define ROP_DSan 0x77
++#define ROP_PDSax 0x78
++#define ROP_DSPDSoaxxn 0x79
++#define ROP_DPSDnoax 0x7A
++#define ROP_SDPxnan 0x7B
++#define ROP_SPDSnoax 0x7C
++#define ROP_DPSxnan 0x7D
++#define ROP_SPxDSxo 0x7E
++#define ROP_DPSaan 0x7F
++#define ROP_DPSaa 0x80
++#define ROP_SPxDSxon 0x81
++#define ROP_DPSxna 0x82
++#define ROP_SPDSnoaxn 0x83
++#define ROP_SDPxna 0x84
++#define ROP_PDSPnoaxn 0x85
++#define ROP_DSPDSoaxx 0x86
++#define ROP_PDSaxn 0x87
++#define ROP_DSa 0x88
++#define ROP_SDPSnaoxn 0x89
++#define ROP_DSPnoa 0x8A
++#define ROP_DSPDxoxn 0x8B
++#define ROP_SDPnoa 0x8C
++#define ROP_SDPSxoxn 0x8D
++#define ROP_SSDxPDxax 0x8E
++#define ROP_PDSanan 0x8F
++#define ROP_PDSxna 0x90
++#define ROP_SDPSnoaxn 0x91
++#define ROP_DPSDPoaxx 0x92
++#define ROP_SPDaxn 0x93
++#define ROP_PSDPSoaxx 0x94
++#define ROP_DPSaxn 0x95
++#define ROP_DPSxx 0x96
++#define ROP_PSDPSonoxx 0x97
++#define ROP_SDPSonoxn 0x98
++#define ROP_DSxn 0x99
++#define ROP_DPSnax 0x9A
++#define ROP_SDPSoaxn 0x9B
++#define ROP_SPDnax 0x9C
++#define ROP_DSPDoaxn 0x9D
++#define ROP_DSPDSaoxx 0x9E
++#define ROP_PDSxan 0x9F
++#define ROP_DPa 0xA0
++#define ROP_PDSPnaoxn 0xA1
++#define ROP_DPSnoa 0xA2
++#define ROP_DPSDxoxn 0xA3
++#define ROP_PDSPonoxn 0xA4
++#define ROP_PDxn 0xA5
++#define ROP_DSPnax 0xA6
++#define ROP_PDSPoaxn 0xA7
++#define ROP_DPSoa 0xA8
++#define ROP_DPSoxn 0xA9
++#define ROP_D 0xAA
++#define ROP_DPSono 0xAB
++#define ROP_SPDSxax 0xAC
++#define ROP_DPSDaoxn 0xAD
++#define ROP_DSPnao 0xAE
++#define ROP_DPno 0xAF
++#define ROP_PDSnoa 0xB0
++#define ROP_PDSPxoxn 0xB1
++#define ROP_SSPxDSxox 0xB2
++#define ROP_SDPanan 0xB3
++#define ROP_PSDnax 0xB4
++#define ROP_DPSDoaxn 0xB5
++#define ROP_DPSDPaoxx 0xB6
++#define ROP_SDPxan 0xB7
++#define ROP_PSDPxax 0xB8
++#define ROP_DSPDaoxn 0xB9
++#define ROP_DPSnao 0xBA
++#define ROP_DSno 0xBB
++#define ROP_SPDSanax 0xBC
++#define ROP_SDxPDxan 0xBD
++#define ROP_DPSxo 0xBE
++#define ROP_DPSano 0xBF
++#define ROP_Psa 0xC0
++#define ROP_SPDSnaoxn 0xC1
++#define ROP_SPDSonoxn 0xC2
++#define ROP_PSxn 0xC3
++#define ROP_SPDnoa 0xC4
++#define ROP_SPDSxoxn 0xC5
++#define ROP_SDPnax 0xC6
++#define ROP_PSDPoaxn 0xC7
++#define ROP_SDPoa 0xC8
++#define ROP_SPDoxn 0xC9
++#define ROP_DPSDxax 0xCA
++#define ROP_SPDSaoxn 0xCB
++#define ROP_S 0xCC
++#define ROP_SDPono 0xCD
++#define ROP_SDPnao 0xCE
++#define ROP_SPno 0xCF
++#define ROP_PSDnoa 0xD0
++#define ROP_PSDPxoxn 0xD1
++#define ROP_PDSnax 0xD2
++#define ROP_SPDSoaxn 0xD3
++#define ROP_SSPxPDxax 0xD4
++#define ROP_DPSanan 0xD5
++#define ROP_PSDPSaoxx 0xD6
++#define ROP_DPSxan 0xD7
++#define ROP_PDSPxax 0xD8
++#define ROP_SDPSaoxn 0xD9
++#define ROP_DPSDanax 0xDA
++#define ROP_SPxDSxan 0xDB
++#define ROP_SPDnao 0xDC
++#define ROP_SDno 0xDD
++#define ROP_SDPxo 0xDE
++#define ROP_SDPano 0xDF
++#define ROP_PDSoa 0xE0
++#define ROP_PDSoxn 0xE1
++#define ROP_DSPDxax 0xE2
++#define ROP_PSDPaoxn 0xE3
++#define ROP_SDPSxax 0xE4
++#define ROP_PDSPaoxn 0xE5
++#define ROP_SDPSanax 0xE6
++#define ROP_SPxPDxan 0xE7
++#define ROP_SSPxDSxax 0xE8
++#define ROP_DSPDSanaxxn 0xE9
++#define ROP_DPSao 0xEA
++#define ROP_DPSxno 0xEB
++#define ROP_SDPao 0xEC
++#define ROP_SDPxno 0xED
++#define ROP_DSo 0xEE
++#define ROP_SDPnoo 0xEF
++#define ROP_P 0xF0
++#define ROP_PDSono 0xF1
++#define ROP_PDSnao 0xF2
++#define ROP_PSno 0xF3
++#define ROP_PSDnao 0xF4
++#define ROP_PDno 0xF5
++#define ROP_PDSxo 0xF6
++#define ROP_PDSano 0xF7
++#define ROP_PDSao 0xF8
++#define ROP_PDSxno 0xF9
++#define ROP_DPo 0xFA
++#define ROP_DPSnoo 0xFB
++#define ROP_PSo 0xFC
++#define ROP_PSDnoo 0xFD
++#define ROP_DPSoo 0xFE
++#define ROP_1 0xFF
++
++/* derived from XAA */
++static struct {
++ int copy;
++ int copy_planemask;
++ int pattern;
++ int pattern_planemask;
++} VIAROP[] = {
++ { ROP_0, ROP_0, ROP_0, ROP_DPna }, /* GXclear */
++ { ROP_DSa, ROP_DSPnoa, ROP_DPa, ROP_DPSnoa }, /* GXand */
++ { ROP_SDna, ROP_DPSnaon, ROP_PDna, ROP_DSPnaon }, /* GXandReverse */
++ { ROP_S, ROP_DPSDxax, ROP_P, ROP_DSPDxax }, /* GXcopy */
++ { ROP_DSna, ROP_DPSana, ROP_DPna, ROP_DPSana }, /* GXandInverted */
++ { ROP_D, ROP_D, ROP_D, ROP_D }, /* GXnoop */
++ { ROP_DSx, ROP_DPSax, ROP_DPx, ROP_DPSax }, /* GXxor */
++ { ROP_DSo, ROP_DPSao, ROP_DPo, ROP_DPSao }, /* GXor */
++ { ROP_DSon, ROP_DPSaon, ROP_DPon, ROP_DPSaon }, /* GXnor */
++ { ROP_DSxn, ROP_DPSaxn, ROP_PDxn, ROP_DPSaxn }, /* GXequiv */
++ { ROP_Dn, ROP_Dn, ROP_Dn, ROP_DPx }, /* GXinvert */
++ { ROP_SDno, ROP_DPSanan, ROP_PDno, ROP_DPSanan }, /* GXorReverse */
++ { ROP_Sn, ROP_PSDPxox, ROP_Pn, ROP_SPDSxox }, /* GXcopyInverted */
++ { ROP_DSno, ROP_DPSnao, ROP_DPno, ROP_DSPnao }, /* GXorInverted */
++ { ROP_DSan, ROP_DSPnoan, ROP_DPan, ROP_DPSnoan }, /* GXnand */
++ { ROP_1, ROP_1, ROP_1, ROP_DPo } /* GXset */
++};
++
++#define VIAACCELCOPYROP(vRop) (VIAROP[vRop].copy << 24)
++#define VIAACCELPATTERNROP(vRop) (VIAROP[vRop].pattern << 24)
+commit 9f5a88a5de671252215e045749d3234c1ed4b6fe
+Author: Xavier Bachelot <xavier at bachelot.org>
+Date: Mon Mar 26 22:26:52 2012 +0200
+
+ Don't load the XAA module when using EXA or NoAccel.
+
+diff --git a/src/via_driver.c b/src/via_driver.c
+index 9d3650c..1c863dc 100644
+--- a/src/via_driver.c
++++ b/src/via_driver.c
+@@ -1809,10 +1809,11 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
+ VIAFreeRec(pScrn);
+ return FALSE;
+ }
+- }
+- if (!xf86LoadSubModule(pScrn, "xaa")) {
+- VIAFreeRec(pScrn);
+- return FALSE;
++ } else {
++ if (!xf86LoadSubModule(pScrn, "xaa")) {
++ VIAFreeRec(pScrn);
++ return FALSE;
++ }
+ }
+ }
+
+commit 117d784b0b2ca254be46edd45246c919cac61d37
+Author: James Simmons <jsimmons at infradead.org>
+Date: Tue Jun 7 20:35:03 2011 +0000
+
+ enable EXA by default
+
+diff --git a/src/via_driver.c b/src/via_driver.c
+index 1c863dc..ab15d6d 100644
+--- a/src/via_driver.c
++++ b/src/via_driver.c
+@@ -683,6 +683,7 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn)
+ pVia->shadowFB = FALSE;
+ pVia->NoAccel = FALSE;
+ pVia->noComposite = FALSE;
++ pVia->useEXA = TRUE;
+ pVia->exaScratchSize = VIA_SCRATCH_SIZE / 1024;
+ pVia->hwcursor = TRUE;
+ pVia->VQEnable = TRUE;
+@@ -1215,12 +1216,12 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
+ if (!pVia->NoAccel) {
+ from = X_DEFAULT;
+ if ((s = (char *)xf86GetOptValString(VIAOptions, OPTION_ACCELMETHOD))) {
+- if (!xf86NameCmp(s, "XAA")) {
+- from = X_CONFIG;
+- pVia->useEXA = FALSE;
+- } else if (!xf86NameCmp(s, "EXA")) {
++ if (!xf86NameCmp(s, "EXA")) {
+ from = X_CONFIG;
+ pVia->useEXA = TRUE;
++ } else if (!xf86NameCmp(s, "XAA")) {
++ from = X_CONFIG;
++ pVia->useEXA = FALSE;
+ }
+ }
+ xf86DrvMsg(pScrn->scrnIndex, from,
+commit 1d053f6e0b06178802ba784de9d3baaefa340c11
+Author: James Simmons <jsimmons at infradead.org>
+Date: Tue Mar 6 14:22:25 2012 +0000
+
+ Disable EXA composite since it is broken. Will fix at a latter date.
+
+diff --git a/src/via_driver.c b/src/via_driver.c
+index ab15d6d..5d57867 100644
+--- a/src/via_driver.c
++++ b/src/via_driver.c
+@@ -682,7 +682,7 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn)
+
+ pVia->shadowFB = FALSE;
+ pVia->NoAccel = FALSE;
+- pVia->noComposite = FALSE;
++ pVia->noComposite = TRUE;
+ pVia->useEXA = TRUE;
+ pVia->exaScratchSize = VIA_SCRATCH_SIZE / 1024;
+ pVia->hwcursor = TRUE;
diff --git a/xorg-x11-drv-openchrome.spec b/xorg-x11-drv-openchrome.spec
index 9808283..79958f7 100644
--- a/xorg-x11-drv-openchrome.spec
+++ b/xorg-x11-drv-openchrome.spec
@@ -10,7 +10,7 @@
Summary: Xorg X11 openchrome video driver
Name: xorg-x11-drv-openchrome
Version: 0.2.905
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://www.openchrome.org
License: MIT
Group: User Interface/X Hardware Support
@@ -21,9 +21,9 @@ Source0: http://www.openchrome.org/releases/%{tarball}-%{version}.tar.bz2
# svn diff -x -p http://svn.openchrome.org/svn/tags/release_0_2_904 http://svn.openchrome.org/svn/trunk
#Patch0: openchrome-0.2.904-svn933.patch
Patch1: openchrome-0.2.905-xv_support_for_vx900.patch
+Patch2: openchrome-0.2.905-default_to_exa.patch
# Fedora specific patches :
-Patch2: openchrome-0.2.905-enable_exa.patch
# Experimental patches (branch backport, etc...):
Patch13: openchrome-0.2.904-fix_tvout_flickering.patch
@@ -123,6 +123,9 @@ fi
%changelog
+* Mon Mar 26 2012 Xavier Bachelot <xavier at bachelot.org> - 0.2.905-5
+- Make EXA work out of the box.
+
* Fri Mar 15 2012 Xavier Bachelot <xavier at bachelot.org> - 0.2.905-4
- Make EXA the default (but disable compositing) (RHBZ#804194).
- Xv support for VX900.
More information about the scm-commits
mailing list