Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sun add some register definitions from xf86-video-su...
details: https://anonhg.NetBSD.org/src/rev/ed2e338838db
branches: trunk
changeset: 780072:ed2e338838db
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Jul 10 22:34:32 2012 +0000
description:
add some register definitions from xf86-video-suncg6
diffstat:
sys/dev/sun/cgsixreg.h | 134 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 133 insertions(+), 1 deletions(-)
diffs (148 lines):
diff -r d596b9f3ed9c -r ed2e338838db sys/dev/sun/cgsixreg.h
--- a/sys/dev/sun/cgsixreg.h Tue Jul 10 22:33:15 2012 +0000
+++ b/sys/dev/sun/cgsixreg.h Tue Jul 10 22:34:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgsixreg.h,v 1.8 2006/10/16 22:27:16 macallan Exp $ */
+/* $NetBSD: cgsixreg.h,v 1.9 2012/07/10 22:34:32 macallan Exp $ */
/*
* Copyright (c) 1993
@@ -252,6 +252,138 @@
#define CG6_FBC_INDEX_MOD 0x00000040
#define CG6_FBC_INDEX_MASK 0x00000030
+/* rasterops */
+#define GX_ROP_CLEAR 0x0
+#define GX_ROP_INVERT 0x1
+#define GX_ROP_NOOP 0x2
+#define GX_ROP_SET 0x3
+
+#define GX_ROP_00_0(rop) ((rop) << 0)
+#define GX_ROP_00_1(rop) ((rop) << 2)
+#define GX_ROP_01_0(rop) ((rop) << 4)
+#define GX_ROP_01_1(rop) ((rop) << 6)
+#define GX_ROP_10_0(rop) ((rop) << 8)
+#define GX_ROP_10_1(rop) ((rop) << 10)
+#define GX_ROP_11_0(rop) ((rop) << 12)
+#define GX_ROP_11_1(rop) ((rop) << 14)
+#define GX_PLOT_PLOT 0x00000000
+#define GX_PLOT_UNPLOT 0x00020000
+#define GX_RAST_BOOL 0x00000000
+#define GX_RAST_LINEAR 0x00040000
+#define GX_ATTR_UNSUPP 0x00400000
+#define GX_ATTR_SUPP 0x00800000
+#define GX_POLYG_OVERLAP 0x01000000
+#define GX_POLYG_NONOVERLAP 0x02000000
+#define GX_PATTERN_ZEROS 0x04000000
+#define GX_PATTERN_ONES 0x08000000
+#define GX_PATTERN_MASK 0x0c000000
+#define GX_PIXEL_ZEROS 0x10000000
+#define GX_PIXEL_ONES 0x20000000
+#define GX_PIXEL_MASK 0x30000000
+#define GX_PLANE_ZEROS 0x40000000
+#define GX_PLANE_ONES 0x80000000
+#define GX_PLANE_MASK 0xc0000000
+/* rops for bit blit / copy area
+ with:
+ Plane Mask - use plane mask reg.
+ Pixel Mask - use all ones.
+ Patt Mask - use all ones.
+*/
+
+#define POLY_O GX_POLYG_OVERLAP
+#define POLY_N GX_POLYG_NONOVERLAP
+
+#define ROP_STANDARD (GX_PLANE_MASK |\
+ GX_PIXEL_ONES |\
+ GX_ATTR_SUPP |\
+ GX_RAST_BOOL |\
+ GX_PLOT_PLOT)
+
+/* fg = don't care bg = don't care */
+
+#define ROP_BLIT(O,I) (ROP_STANDARD | \
+ GX_PATTERN_ONES |\
+ GX_ROP_11_1(I) |\
+ GX_ROP_11_0(O) |\
+ GX_ROP_10_1(I) |\
+ GX_ROP_10_0(O) |\
+ GX_ROP_01_1(I) |\
+ GX_ROP_01_0(O) |\
+ GX_ROP_00_1(I) |\
+ GX_ROP_00_0(O))
+
+/* fg = fgPixel bg = don't care */
+
+#define ROP_FILL(O,I) (ROP_STANDARD | \
+ GX_PATTERN_ONES |\
+ GX_ROP_11_1(I) |\
+ GX_ROP_11_0(I) |\
+ GX_ROP_10_1(I) |\
+ GX_ROP_10_0(I) | \
+ GX_ROP_01_1(O) |\
+ GX_ROP_01_0(O) |\
+ GX_ROP_00_1(O) |\
+ GX_ROP_00_0(O))
+
+/* fg = fgPixel bg = don't care */
+
+#define ROP_STIP(O,I) (ROP_STANDARD |\
+ GX_ROP_11_1(I) |\
+ GX_ROP_11_0(GX_ROP_NOOP) |\
+ GX_ROP_10_1(I) |\
+ GX_ROP_10_0(GX_ROP_NOOP) | \
+ GX_ROP_01_1(O) |\
+ GX_ROP_01_0(GX_ROP_NOOP) |\
+ GX_ROP_00_1(O) |\
+ GX_ROP_00_0(GX_ROP_NOOP))
+
+/* fg = fgPixel bg = bgPixel */
+
+#define ROP_OSTP(O,I) (ROP_STANDARD |\
+ GX_ROP_11_1(I) |\
+ GX_ROP_11_0(I) |\
+ GX_ROP_10_1(I) |\
+ GX_ROP_10_0(O) |\
+ GX_ROP_01_1(O) |\
+ GX_ROP_01_0(I) |\
+ GX_ROP_00_1(O) |\
+ GX_ROP_00_0(O))
+
+#define GX_ROP_USE_PIXELMASK 0x30000000
+
+#define GX_BLT_INPROGRESS 0x20000000
+
+#define GX_INPROGRESS 0x10000000
+#define GX_FULL 0x20000000
+
+/* modes */
+#define GX_INDEX(n) ((n) << 4)
+#define GX_INDEX_ALL 0x00000030
+#define GX_INDEX_MOD 0x00000040
+#define GX_BDISP_0 0x00000080
+#define GX_BDISP_1 0x00000100
+#define GX_BDISP_ALL 0x00000180
+#define GX_BREAD_0 0x00000200
+#define GX_BREAD_1 0x00000400
+#define GX_BREAD_ALL 0x00000600
+#define GX_BWRITE1_ENABLE 0x00000800
+#define GX_BWRITE1_DISABLE 0x00001000
+#define GX_BWRITE1_ALL 0x00001800
+#define GX_BWRITE0_ENABLE 0x00002000
+#define GX_BWRITE0_DISABLE 0x00004000
+#define GX_BWRITE0_ALL 0x00006000
+#define GX_DRAW_RENDER 0x00008000
+#define GX_DRAW_PICK 0x00010000
+#define GX_DRAW_ALL 0x00018000
+#define GX_MODE_COLOR8 0x00020000
+#define GX_MODE_COLOR1 0x00040000
+#define GX_MODE_HRMONO 0x00060000
+#define GX_MODE_ALL 0x00060000
+#define GX_VBLANK 0x00080000
+#define GX_BLIT_NOSRC 0x00100000
+#define GX_BLIT_SRC 0x00200000
+#define GX_BLIT_ALL 0x00300000
+
#if _CG6_LAYOUT_NOT_USED_ANYMORE
/*
* This structure exists only to compute the layout of the CG6
Home |
Main Index |
Thread Index |
Old Index