diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-03-14 23:23:36 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-03-14 23:23:36 +0000 |
commit | 784ff02611fdf4adeced1bd156fbb7e6ed63df22 (patch) | |
tree | 11dea01690506c420d8d6e870ad8ab1d721ac481 /src/ast_cursor.c | |
parent | 7ce3a2ba6d211aeaa19a6841935bc50205788d62 (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/ast_cursor.c')
-rw-r--r-- | src/ast_cursor.c | 22 |
1 files changed, 18 insertions, 4 deletions
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)); |