On 11/09/08 23:17 +0300, Martin-Éric Racine wrote:
> On Thu, Sep 11, 2008 at 2:36 AM, Jordan Crouse <[EMAIL PROTECTED]> wrote:
> > We are only 5 days away from the expected release date, and since
> > I haven't heard any problems with the RandR 1.2 changes, I have
> > merged them into the main tree. The code is confirmed working for
> > X 1.5 vanilla, Hardy and Lenny. I don't have any other operating
> > systems handy. Please test.
>
> On Ubuntu/Hardy (X 1.4.1):
>
> Impeccable operation using 8.04.1 on LTSP, in which an updated GEODE
> is installed, followed by rebuilding the LTSP squashfs image. fbcon
> without fb. Stock kernel.
>
> On Debian/Lenny (X 1.4.2):
>
> Switching back and forth between a vcons and X produces a situation
> where the default X-shaped mouse pointer glyph remains in the middle
> of the screen, while the real pointer configured by GTK2 preferences
> moves with the mouse. fbcon with lxfb. Custom kernel based on stock
> Debian kernel, but with support for non-Geode peripherals removed.
>
> On Ubuntu/Hardy (X 1.5):
>
> Square box around the mouse pointer glyph when X initially launches.
> fbcon wihout fb. Stock kernel.
That sounds like alpha cursor problems to me. can you try the attached
patch and see if it makes a difference? If so, then I'll clean it up
and add it to the driver.
Jordan
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
diff --git a/src/geode.h b/src/geode.h
index 3a281f2..c22777c 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -426,7 +426,8 @@ void LXSetupChipsetFPtr(ScrnInfoPtr pScrn);
/* lx_cursor.c */
Bool LXHWCursorInit(ScreenPtr pScrn);
-void LXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src);
+void LXLoadMonoCursorImage(ScrnInfoPtr pScrni, unsigned char *src);
+void LXLoadARGBCursorImage(ScrnInfoPtr pScrni, unsigned char *src);
void LXHideCursor(ScrnInfoPtr pScrni);
void LXShowCursor(ScrnInfoPtr pScrni);
diff --git a/src/lx_cursor.c b/src/lx_cursor.c
index 64ea9c9..7f32535 100644
--- a/src/lx_cursor.c
+++ b/src/lx_cursor.c
@@ -32,14 +32,18 @@
#include "xf86Crtc.h"
#include "geode.h"
+#define CURSOR_X 32
+#define CURSOR_Y 64
+
Bool
LXCursorInit(ScreenPtr pScrn)
{
- return xf86_cursors_init(pScrn, 32, 32,
+ return xf86_cursors_init(pScrn, CURSOR_X, CURSOR_Y,
HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
HARDWARE_CURSOR_INVERT_MASK |
HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32);
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 |
+ HARDWARE_CURSOR_ARGB);
}
static int
@@ -59,26 +63,48 @@ _getmask(unsigned char *src, int stride, int x, int y)
}
void
-LXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
+LXLoadMonoCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
- unsigned long andMask[32], xorMask[32];
+ unsigned long andMask[128], xorMask[128];
int y, x;
- for (y = 0; y < 32; y++) {
+ ErrorF("Don't call me\n");
+
+ for (y = 0; y < 128; y++) {
andMask[y] = (src) ? 0 : ~0;
xorMask[y] = 0;
}
if (src != NULL) {
- for (y = 0; y < 32; y++) {
- for (x = 0; x < 32; x++) {
- xorMask[y] |= _getrow(src, 8, x, y) << (31 - x);
- andMask[y] |= _getmask(src, 8, x, y) << (31 - x);
+ for (y = 0; y < 64; y++) {
+ for (x = 0; x < 48; x++) {
+
+ if (x < 32) {
+ xorMask[y * 2] |= _getrow(src, 12, x, y) << (31 - x);
+ andMask[y * 2] |= _getmask(src, 12, x, y) << (31 - x);
+ }
+ else {
+ xorMask[y * 2 + 1] |= _getrow(src, 12, x, y) << (63 - x);
+ andMask[y * 2 + 1] |= _getmask(src, 12, x, y) << (63 - x);
+ }
}
+
+ for(x = 49; x < 64; x++)
+ andMask[y * 2 + 1] |= (1 << (63 - x));
}
}
- vg_set_mono_cursor_shape32(pGeode->CursorStartOffset, &andMask[0],
- &xorMask[0], 32, 32);
+ vg_set_mono_cursor_shape64(pGeode->CursorStartOffset, &andMask[0],
+ &xorMask[0], 48, 64);
+}
+
+void
+LXLoadARGBCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
+{
+ GeodeRec *pGeode = GEODEPTR(pScrni);
+ vg_set_color_cursor_shape(pGeode->CursorStartOffset, src,
+ CURSOR_X, CURSOR_Y,
+ CURSOR_X * 4, CURSOR_X, CURSOR_Y);
}
+
diff --git a/src/lx_display.c b/src/lx_display.c
index 38932a6..0262183 100644
--- a/src/lx_display.c
+++ b/src/lx_display.c
@@ -452,7 +452,14 @@ lx_crtc_hide_cursor(xf86CrtcPtr crtc)
static void
lx_crtc_load_cursor_image(xf86CrtcPtr crtc, unsigned char *src)
{
- LXLoadCursorImage(crtc->scrn, src);
+ LXLoadMonoCursorImage(crtc->scrn, src);
+}
+
+static void
+lx_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
+{
+ ErrorF("Loading cursor!\n");
+ LXLoadARGBCursorImage(crtc->scrn, (unsigned char *) image);
}
static const xf86CrtcFuncsRec lx_crtc_funcs = {
@@ -471,7 +478,8 @@ static const xf86CrtcFuncsRec lx_crtc_funcs = {
.set_cursor_position = lx_crtc_set_cursor_position,
.show_cursor = lx_crtc_show_cursor,
.hide_cursor = lx_crtc_hide_cursor,
- .load_cursor_image = lx_crtc_load_cursor_image,
+ //.load_cursor_image = lx_crtc_load_cursor_image,
+ .load_cursor_argb = lx_crtc_load_cursor_argb,
};
void
_______________________________________________
Xorg-driver-geode mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-driver-geode