summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-03-14 23:23:36 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-03-14 23:23:36 +0000
commit784ff02611fdf4adeced1bd156fbb7e6ed63df22 (patch)
tree11dea01690506c420d8d6e870ad8ab1d721ac481 /src
parent7ce3a2ba6d211aeaa19a6841935bc50205788d62 (diff)
Version 0.60 from ASPEED Technology Inc. (Modify H/W cursor parts for
customer request) Bugzilla #4937 <https://bugs.freedesktop.org/show_bug.cgi?id=4937> Attachment #4044 <https://bugs.freedesktop.org/attachment.cgi?id=4044>
Diffstat (limited to 'src')
-rw-r--r--src/ast.h2
-rw-r--r--src/ast_cursor.c22
-rw-r--r--src/ast_cursor.h9
3 files changed, 28 insertions, 5 deletions
diff --git a/src/ast.h b/src/ast.h
index bbffa11..a30ae5f 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -38,7 +38,7 @@
#define AST_NAME "AST"
#define AST_DRIVER_NAME "ast"
#define AST_MAJOR_VERSION 0
-#define AST_MINOR_VERSION 51
+#define AST_MINOR_VERSION 60
#define AST_PATCH_VERSION 0
#define AST_VERSION \
((AST_MAJOR_VERSION << 20) | (AST_MINOR_VERSION << 10) | AST_PATCH_VERSION)
diff --git a/src/ast_cursor.c b/src/ast_cursor.c
index fbbce1b..e870331 100644
--- a/src/ast_cursor.c
+++ b/src/ast_cursor.c
@@ -159,7 +159,13 @@ ASTSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
ASTRecPtr pAST = ASTPTR(pScrn);
DisplayModePtr mode = pAST->ModePtr;
int x_offset, y_offset;
-
+ UCHAR *pjSignature;
+
+ /* Set cursor info to Offscreen */
+ pjSignature = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
+ *((ULONG *) (pjSignature + HWC_SIGNATURE_X)) = x;
+ *((ULONG *) (pjSignature + HWC_SIGNATURE_Y)) = y;
+
x_offset = pAST->HWCInfo.offset_x;
y_offset = pAST->HWCInfo.offset_y;
@@ -174,7 +180,7 @@ ASTSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
}
if(mode->Flags & V_DBLSCAN) y *= 2;
-
+
/* Set to Reg. */
SetIndexReg(CRTC_PORT, 0xC2, (UCHAR) (x_offset));
SetIndexReg(CRTC_PORT, 0xC3, (UCHAR) (y_offset));
@@ -249,7 +255,11 @@ ASTLoadCursorImage(ScrnInfoPtr pScrn, UCHAR *src)
/* Write Checksum as signature */
pjDstData = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
*((ULONG *) pjDstData) = ulCheckSum;
-
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_SizeX)) = pAST->HWCInfo.width;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_SizeY)) = pAST->HWCInfo.height;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_HOTSPOTX)) = 0;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_HOTSPOTY)) = 0;
+
/* set pattern offset */
ulPatternAddr = ((pAST->HWCInfo.ulHWCOffsetAddr+(HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next) >> 3);
SetIndexReg(CRTC_PORT, 0xC8, (UCHAR) (ulPatternAddr & 0xFF));
@@ -346,7 +356,11 @@ ASTLoadCursorARGB(ScrnInfoPtr pScrn, CursorPtr pCurs)
/* Write Checksum as signature */
pjDstXor = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
*((ULONG *) pjDstXor) = ulCheckSum;
-
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_SizeX)) = pAST->HWCInfo.width;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_SizeY)) = pAST->HWCInfo.height;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_HOTSPOTX)) = 0;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_HOTSPOTY)) = 0;
+
/* set pattern offset */
ulPatternAddr = ((pAST->HWCInfo.ulHWCOffsetAddr +(HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next) >> 3);
SetIndexReg(CRTC_PORT, 0xC8, (UCHAR) (ulPatternAddr & 0xFF));
diff --git a/src/ast_cursor.h b/src/ast_cursor.h
index b513f3f..d4de479 100644
--- a/src/ast_cursor.h
+++ b/src/ast_cursor.h
@@ -28,3 +28,12 @@
#define HWC_MONO 0
#define HWC_COLOR 1
+
+/* define for signature structure */
+#define HWC_SIGNATURE_CHECKSUM 0x00
+#define HWC_SIGNATURE_SizeX 0x04
+#define HWC_SIGNATURE_SizeY 0x08
+#define HWC_SIGNATURE_X 0x0C
+#define HWC_SIGNATURE_Y 0x10
+#define HWC_SIGNATURE_HOTSPOTX 0x14
+#define HWC_SIGNATURE_HOTSPOTY 0x18