On Wed, Jan 6, 2010 at 9:59 PM, Francisco Jerez <[email protected]> wrote: >> [...] >> diff --git a/src/drmmode_display.c b/src/drmmode_display.c >> index e37e7c1..3d2df8d 100644 >> --- a/src/drmmode_display.c >> +++ b/src/drmmode_display.c >> [...] >> +#define SOURCE_MASK_INTERLEAVE 32 >> +#define TRANSPARENT_PIXEL 0 >> + >> +/* >> + * Convert a source/mask bitmap cursor to an ARGB cursor, clipping or >> + * padding as necessary. source/mask are assumed to be alternated each >> + * SOURCE_MASK_INTERLEAVE bits. >> + */ >> +static void >> +nv_cursor_convert_cursor(uint32_t *src, void *dst, int src_stride, >> + int dst_stride, int bpp, uint32_t fg, uint32_t bg) >> +{ >> + int width = min(src_stride, dst_stride); >> + uint32_t b, m, pxval; >> + int i, j, k; >> + >> + for (i = 0; i < width; i++) { >> + for (j = 0; j < width / SOURCE_MASK_INTERLEAVE; j++) { >> + int src_off = i*src_stride/SOURCE_MASK_INTERLEAVE + j; >> + int dst_off = i*dst_stride + j*SOURCE_MASK_INTERLEAVE; >> + >> + b = src[2*src_off]; >> + m = src[2*src_off + 1]; >> + >> + for (k = 0; k < SOURCE_MASK_INTERLEAVE; k++) { >> + pxval = TRANSPARENT_PIXEL; >> +#if X_BYTE_ORDER == X_BIG_ENDIAN >> + if (m & 0x80000000) >> + pxval = (b & 0x80000000) ? fg : bg; >> + b <<= 1; >> + m <<= 1; >> +#else >> + if (m & 1) >> + pxval = (b & 1) ? fg : bg; >> + b >>= 1; >> + m >>= 1; >> +#endif >> + if (bpp == 32) >> + ((uint32_t *)dst)[dst_off + k] = pxval; >> + else >> + ((uint16_t *)dst)[dst_off + k] = pxval; >> + } >> + } >> + } >> +} >> + > > I'm quite sure that, without UMS, this function doesn't make sense > anymore, you could leave this fun for the X server (we can use the > load_cursor_argb hook even on the cards we don't advertise ARGB > support). As a bonus that would probably solve Craig's rotated cursor > issue. >
This patch has been pushed 2 days ago but that function is apparently still there. If it could solve the rotated cursor issue, could you provide a patch to kill that function ? A second user reported it : http://bbs.archlinux.org/viewtopic.php?pid=687656#p687656 _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau
