16448336.patch revision 1445
1445N/A--- a/src/ast_vgatool.h Wed Nov 12 12:43:18 2014
1445N/A+++ b/src/ast_vgatool.h Wed Nov 12 12:48:31 2014
1445N/A@@ -86,33 +86,30 @@
1445N/A #define GetIndexReg(off, index, val) do { \
1445N/A struct vis_io_reg io_reg = { \
1445N/A .offset = off, \
1445N/A- .value = index \
1445N/A+ .value = index, \
1445N/A+ .offset1 = off+1 \
1445N/A }; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A- io_reg.offset = off+1; \
1445N/A- ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1445N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1445N/A val = io_reg.value; \
1445N/A } while (0)
1445N/A
1445N/A #define SetIndexReg(off, index, val) do { \
1445N/A struct vis_io_reg io_reg = { \
1445N/A- .offset = off, \
1445N/A- .value = index \
1445N/A+ .offset = off, \
1445N/A+ .value = index, \
1445N/A+ .offset1 = off+1, \
1445N/A+ .value1 = val \
1445N/A }; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A- io_reg.offset = off+1; \
1445N/A- io_reg.value = val; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A+ ioctl(pAST->fd, AST_SET_INDEX, &io_reg); \
1445N/A } while (0)
1445N/A
1445N/A #define GetIndexRegMask(off, index, and, val) do { \
1445N/A struct vis_io_reg io_reg = { \
1445N/A .offset = off, \
1445N/A- .value = index \
1445N/A+ .value = index, \
1445N/A+ .offset1 = off+1 \
1445N/A }; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A- io_reg.offset = off+1; \
1445N/A- ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1445N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1445N/A val = io_reg.value & and; \
1445N/A } while (0)
1445N/A
1445N/A@@ -120,18 +117,16 @@
1445N/A UCHAR __Temp; \
1445N/A struct vis_io_reg io_reg = { \
1445N/A .offset = off, \
1445N/A- .value = index \
1445N/A+ .value = index, \
1445N/A+ .offset1 = off+1 \
1445N/A }; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A- io_reg.offset = off + 1; \
1445N/A- ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1445N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1445N/A __Temp = (io_reg.value & and) | val; \
1445N/A io_reg.offset = off; \
1445N/A io_reg.value = index; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A- io_reg.offset = off+1; \
1445N/A- io_reg.value = __Temp; \
1445N/A- ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1445N/A+ io_reg.offset1 = off+1; \
1445N/A+ io_reg.value1 = __Temp; \
1445N/A+ ioctl(pAST->fd, AST_SET_INDEX, &io_reg); \
1445N/A } while (0)
1445N/A
1445N/A #else /* !__sparc__ */
1445N/A--- a/src/ast.h Wed Nov 12 12:42:27 2014
1445N/A+++ b/src/ast.h Wed Nov 12 12:43:02 2014
1445N/A@@ -376,9 +376,19 @@
1445N/A #define VIS_SETIOREG (VIOC | 17)
1445N/A #define VIS_GETIOREG (VIOC | 18)
1445N/A
1445N/A+#ifdef __sparc
1445N/A+#define ASTIOC ('Y' << 8)
1445N/A+#define AST_GET_INDEX (ASTIOC | 14)
1445N/A+#define AST_SET_INDEX (ASTIOC | 15)
1445N/A+#endif
1445N/A+
1445N/A typedef struct vis_io_reg {
1445N/A uchar_t offset;
1445N/A uchar_t value;
1445N/A+#ifdef __sparc
1445N/A+ uchar_t offset1;
1445N/A+ uchar_t value1;
1445N/A+#endif
1445N/A } vis_io_reg_t;
1445N/A #endif
1445N/A