From 784ff02611fdf4adeced1bd156fbb7e6ed63df22 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 14 Mar 2006 23:23:36 +0000 Subject: Version 0.60 from ASPEED Technology Inc. (Modify H/W cursor parts for customer request) Bugzilla #4937 Attachment #4044 --- src/ast_cursor.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/ast_cursor.c') 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)); -- cgit v1.2.3