16448336.patch revision 1634
561N/A--- a/src/ast_vgatool.h Thu Apr 28 20:32:02 2016
561N/A+++ b/src/ast_vgatool.h Thu Apr 28 20:34:40 2016
943N/A@@ -89,7 +89,7 @@
561N/A .value = index, \
561N/A .offset1 = off+1 \
919N/A }; \
919N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
919N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
919N/A val = io_reg.value; \
919N/A } while (0)
919N/A
919N/A@@ -100,7 +100,7 @@
919N/A .offset1 = off+1, \
919N/A .value1 = val \
919N/A }; \
919N/A- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
919N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
919N/A } while (0)
919N/A
919N/A #define GetIndexRegMask(off, index, and, val) do { \
919N/A@@ -109,7 +109,7 @@
919N/A .value = index, \
561N/A .offset1 = off+1 \
561N/A }; \
561N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
561N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
561N/A val = io_reg.value & and; \
561N/A } while (0)
970N/A
970N/A@@ -120,13 +120,13 @@
970N/A .value = index, \
970N/A .offset1 = off+1 \
561N/A }; \
837N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
837N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
911N/A __Temp = (io_reg.value & and) | val; \
911N/A io_reg.offset = off; \
911N/A io_reg.value = index; \
911N/A io_reg.offset1 = off+1; \
837N/A io_reg.value1 = __Temp; \
837N/A- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
561N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
561N/A } while (0)
837N/A
#else /* !__sparc__ */
--- a/src/ast.h Thu Apr 28 20:35:08 2016
+++ b/src/ast.h Thu Apr 28 20:35:57 2016
@@ -375,9 +375,19 @@
#define VIS_SETIOREG (VIOC | 17)
#define VIS_GETIOREG (VIOC | 18)
+#ifdef __sparc
+#define ASTIOC ('Y' << 8)
+#define AST_GET_INDEX (ASTIOC | 14)
+#define AST_SET_INDEX (ASTIOC | 15)
+#endif
+
typedef struct vis_io_reg {
uchar_t offset;
uchar_t value;
+#ifdef __sparc
+ uchar_t offset1;
+ uchar_t value1;
+#endif
} vis_io_reg_t;
#endif