summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-15 10:17:06 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-16 22:15:39 +0000
commitedbeab8c4edf9e0e89d85add485fe659795b6350 (patch)
tree09225d288a0a444c1ddaf18a0f5f1c98f2918f00 /src/sna
parent78d4e99fc916e6477edb01c6f24b69ad73adc552 (diff)
sna: Reduce and clarify dependencies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/Makefile.am1
-rw-r--r--src/sna/rop.h264
-rw-r--r--src/sna/sna.h1
-rw-r--r--src/sna/sna_accel.c2
-rw-r--r--src/sna/sna_blt.c2
-rw-r--r--src/sna/sna_composite.c1
-rw-r--r--src/sna/sna_display.c2
-rw-r--r--src/sna/sna_driver.c21
8 files changed, 273 insertions, 21 deletions
diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am
index ac609884..30cedc6a 100644
--- a/src/sna/Makefile.am
+++ b/src/sna/Makefile.am
@@ -35,6 +35,7 @@ libsna_la_SOURCES = \
compiler.h \
kgem.c \
kgem.h \
+ rop.h \
sna.h \
sna_accel.c \
sna_blt.c \
diff --git a/src/sna/rop.h b/src/sna/rop.h
new file mode 100644
index 00000000..9db15cf4
--- /dev/null
+++ b/src/sna/rop.h
@@ -0,0 +1,264 @@
+#ifndef ROP_H
+#define ROP_H
+
+#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
+
+#define NO_SRC_ROP(rop) \
+ ((rop == GXnoop) || (rop == GXset) || (rop == GXclear) || (rop == GXinvert))
+
+#endif /* ROP_H */
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 573fe0eb..9492fc2b 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -49,7 +49,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <xf86Pci.h>
#include <xf86Cursor.h>
#include <xf86xv.h>
-#include <vgaHW.h>
#include <xf86Crtc.h>
#include <xf86RandR12.h>
#include <gcstruct.h>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index e0990c52..46992f66 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -31,11 +31,11 @@
#include "sna.h"
#include "sna_reg.h"
+#include "rop.h"
#include <X11/fonts/font.h>
#include <X11/fonts/fontstruct.h>
-#include <xaarop.h>
#include <fb.h>
#include <dixfontstr.h>
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 0290a33f..4c7beabf 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -36,10 +36,10 @@
#include "sna_render.h"
#include "sna_render_inline.h"
#include "sna_reg.h"
+#include "rop.h"
#include <mipict.h>
#include <fbpict.h>
-#include <xaarop.h>
#if DEBUG_BLT
#undef DBG
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 532dd805..1d66a8d9 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -726,7 +726,6 @@ fallback:
sna_drawable_move_to_cpu(dst->alphaMap->pDrawable, true);
if (op == PictOpSrc || op == PictOpClear) {
- PixmapPtr pixmap = get_drawable_pixmap(dst->pDrawable);
int nbox = REGION_NUM_RECTS(&region);
BoxPtr box = REGION_RECTS(&region);
uint32_t pixel;
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index b1275ed6..32162ef2 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -39,6 +39,8 @@
#include <xorgVersion.h>
#include <X11/Xatom.h>
+#include <X11/extensions/dpmsconst.h>
+#include <xf86DDC.h>
#include "sna.h"
#include "sna_reg.h"
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 693febcc..19413a9c 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -45,21 +45,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <errno.h>
-#include "xf86.h"
-#include "xf86_OSproc.h"
-#include "xf86cmap.h"
+#include <xf86cmap.h>
+#include <micmap.h>
+#include <fb.h>
+
#include "compiler.h"
-#include "mibstore.h"
-#include "vgaHW.h"
-#include "mipointer.h"
-#include "micmap.h"
-#include "shadowfb.h"
-#include <X11/extensions/randr.h>
-#include "fb.h"
-#include "miscstruct.h"
-#include "dixstruct.h"
-#include "xf86xv.h"
-#include <X11/extensions/Xv.h>
#include "sna.h"
#include "sna_module.h"
#include "sna_video.h"
@@ -973,9 +963,6 @@ static void sna_free_screen(int scrnIndex, int flags)
}
sna_close_drm_master(scrn);
-
- if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
- vgaHWFreeHWRec(xf86Screens[scrnIndex]);
}
/*