From ca0863e91cf7bdbd2f9c30aa1af5c9471dfc858e Mon Sep 17 00:00:00 2001 From: "Y.C. Chen" Date: Mon, 13 Apr 2009 21:01:51 +0800 Subject: xf86-video-ast-0.89.0 --- ChangeLog | 8 ++++++++ configure.ac | 2 +- src/ast.h | 3 ++- src/ast_accel.c | 30 +++++++++++++++--------------- src/ast_cursor.c | 8 ++++++++ src/ast_driver.c | 7 +++++++ 6 files changed, 41 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ea7df7..3d05159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-13 Y.C. Chen + * src/ast.h, ast_cursor.c + - Fixed xorg bugzilla #20606 + * src/ast_driver.c + - Fixed xorg bugzilla #20472 + * src/ast_accel.c + - Fixed desktop display abnormal if video buffer is above than 16MB + 2009-01-16 Y.C. Chen * src/ast_driver.c - Fixed Support Modes Incorrect Issues on Solaris 10 x86 diff --git a/configure.ac b/configure.ac index 167c1cc..e34f736 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-ast], - 0.88.8, + 0.89.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-ast) diff --git a/src/ast.h b/src/ast.h index 937709a..bafd29b 100644 --- a/src/ast.h +++ b/src/ast.h @@ -132,7 +132,8 @@ typedef struct { USHORT offset_y; ULONG fg; ULONG bg; - + + UCHAR cursorpattern[1024]; } HWCINFO, *PHWCINFO; diff --git a/src/ast_accel.c b/src/ast_accel.c index ad954e8..ef21462 100644 --- a/src/ast_accel.c +++ b/src/ast_accel.c @@ -351,22 +351,29 @@ ASTSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, else cmdreg &= ~CMD_ENABLE_CLIP; srcbase = dstbase = 0; + + if (x1 < x2) + cmdreg |= CMD_X_DEC; + + if (y1 < y2) + cmdreg |= CMD_Y_DEC; - if (y1 >= MAX_SRC_Y) + if ((y1 + height) >= MAX_SRC_Y) { srcbase=pAST->VideoModeInfo.ScreenPitch*y1; + y1 = 0; } - if (y2 >= pScrn->virtualY) + if ((y2 + height) >= pScrn->virtualY) { dstbase=pAST->VideoModeInfo.ScreenPitch*y2; + y2 = 0; } - if (x1 < x2) + if (cmdreg & CMD_X_DEC) { - src_x = x1 + width - 1; - dst_x = x2 + width - 1; - cmdreg |= CMD_X_DEC; + src_x = x1 + width - 1; + dst_x = x2 + width - 1; } else { @@ -374,20 +381,13 @@ ASTSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, dst_x = x2; } - if (y1 < y2) - { - if (srcbase) y1 = 0; - if (dstbase) y2 = 0; - + if (cmdreg & CMD_Y_DEC) + { src_y = y1 + height - 1; dst_y = y2 + height - 1; - cmdreg |= CMD_Y_DEC; } else { - if (srcbase) y1 = 0; - if (dstbase) y2 = 0; - src_y = y1; dst_y = y2; } diff --git a/src/ast_cursor.c b/src/ast_cursor.c index 6b6cb94..8c9757a 100644 --- a/src/ast_cursor.c +++ b/src/ast_cursor.c @@ -203,6 +203,10 @@ ASTSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) pAST->HWCInfo.fg = (fg & 0x0F) | (((fg>>8) & 0x0F) << 4) | (((fg>>16) & 0x0F) << 8); pAST->HWCInfo.bg = (bg & 0x0F) | (((bg>>8) & 0x0F) << 4) | (((bg>>16) & 0x0F) << 8); + + /* Fixed xorg bugzilla #20609, ycchen@031209 */ + ASTLoadCursorImage(pScrn, pAST->HWCInfo.cursorpattern); + } static void @@ -223,6 +227,10 @@ ASTLoadCursorImage(ScrnInfoPtr pScrn, UCHAR *src) pAST->HWCInfo.offset_x = MAX_HWC_WIDTH - pAST->HWCInfo.width; pAST->HWCInfo.offset_y = MAX_HWC_HEIGHT - pAST->HWCInfo.height; + /* copy to hwc info */ + for (i=0; i< MAX_HWC_WIDTH*MAX_HWC_HEIGHT/4; i+=4) + *(ULONG *) (pAST->HWCInfo.cursorpattern + i) = *(ULONG *) (src + i); + /* copy cursor image to cache */ pjSrcXor = src; pjSrcAnd = src + (MAX_HWC_WIDTH*MAX_HWC_HEIGHT/8); diff --git a/src/ast_driver.c b/src/ast_driver.c index 920987b..927ad6a 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -658,10 +658,12 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags) pAST->FbMapSize = pScrn->videoRam * 1024; +#if 0 if (!ASTMapMem(pScrn)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Map FB Memory Failed \n"); return FALSE; } +#endif pScrn->memPhysBase = (ULONG)pAST->FBPhysAddr; pScrn->fbOffset = 0; @@ -797,6 +799,11 @@ ASTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pScrn = xf86Screens[pScreen->myNum]; pAST = ASTPTR(pScrn); hwp = VGAHWPTR(pScrn); + + if (!ASTMapMem(pScrn)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Map FB Memory Failed \n"); + return FALSE; + } /* if (!pAST->noAccel) */ { -- cgit v1.2.3