On Mon, 8 Aug 2005, Bob Peterson wrote:
I have fixed two other problems in smi_accel. They are as follows:
1. Endian-swapped hwcursor ("X" hwcursor appears as a diamond rather than an
"X")
2. Y-value put incorrectly into DPR:
So if you're in the mood, here are my diffs. Forgive my ignorance of how to
properly submit changes.
Please use `diff -c` or `diff -u`. Also, never cut & paste diffs into email,
especially when using web browsers with their own rules on how email should
be formatted.
Also, forgive my down-and-dirty endian-swapping method; I'm sure there are
better ways.
I have changed other smi modules, but I'll hopefully submit the changes
later.
smi_accel.c:
==============================
120,123c120,127
< | NO_PLANEMASK
< | BIT_ORDER_IN_BYTE_MSBFIRST
< | LEFT_EDGE_CLIPPING
< | CPU_TRANSFER_PAD_DWORD
---
| NO_PLANEMASK
#if X_BYTE_ORDER == X_BIG_ENDIAN
| BIT_ORDER_IN_BYTE_LSBFIRST
#else
| BIT_ORDER_IN_BYTE_MSBFIRST
#endif
| LEFT_EDGE_CLIPPING
| CPU_TRANSFER_PAD_DWORD
727c731
< memcpy(pSmi->DataPortBase, pattern, 8 * pSmi->Bpp * 8);
---
memsloppy(pSmi->DataPortBase, pattern, 8 * pSmi->Bpp * 8);
863c867
< WRITE_DPR(pSmi, 0x04, (x << 16) | (y * 0xFFFF));
---
WRITE_DPR(pSmi, 0x04, (x << 16) | (y & 0xFFFF));
regsmi.h:
==============================
121a122,141
static __inline__ void memsloppy(unsigned char *dst, unsigned char *src,
int len)
{
#if X_BYTE_ORDER == X_BIG_ENDIAN
int i;
unsigned char *csrc,*cdst;
csrc=(unsigned char *)(src);
cdst=(unsigned char *)(dst);
for (i=0; i<len; i+=4) {
*cdst++=*(csrc+3);
*cdst++=*(csrc+2);
*cdst++=*(csrc+1);
*cdst++=*(csrc+0);
csrc+=4; /* go to next dword */
}
#else
memcpy(pSmi->FBBase + pSmi->FBCursorOffset, src, len);
#endif
}
I've committed your typo fix, but find a few discrepancies with memsloppy.
First hardware cursors never go through the interface you're changing.
Secondly moving data into *pSmi->DataPortBase should probably be done using
the MMIO_OUT32 macro #define'd in compiler.h.
Marc.
+----------------------------------+-----------------------------------+
| Marc Aurele La France | work: 1-780-492-9310 |
| Academic Information and | fax: 1-780-492-1729 |
| Communications Technologies | email: tsi@xxxxxxxxxxx |
| 352 General Services Building +-----------------------------------+
| University of Alberta | |
| Edmonton, Alberta | Standard disclaimers apply |
| T6G 2H1 | |
| CANADA | |
+----------------------------------+-----------------------------------+
XFree86 developer and VP. ATI driver and X server internals.
_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86