xserver: Branch 'master'
Peter Hutterer
peter.hutterer at who-t.net
Sun Sep 20 04:24:27 PDT 2009
On Wed, Sep 16, 2009 at 07:08:47AM -0700, Matthias Hopf wrote:
> hw/xfree86/modes/xf86Cursors.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> New commits:
> commit 3bdf36476179257561b9409c3f49a77640fbb9f9
> Author: Matthias Hopf <mhopf at suse.de>
> Date: Wed Sep 16 16:03:46 2009 +0200
>
> Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL.
>
> Apparently SavedCursor is sometime tried to be set while already being set.
>
> diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
> index fc4df84..f4b8be5 100644
> --- a/hw/xfree86/modes/xf86Cursors.c
> +++ b/hw/xfree86/modes/xf86Cursors.c
> @@ -461,6 +461,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
> xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
> xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
>
> + if (xf86_config->cursor == cursor) {
> + xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
> + return FALSE;
> + }
> if (xf86_config->cursor)
> FreeCursor (xf86_config->cursor, None);
> xf86_config->cursor = cursor;
> @@ -480,6 +484,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
> xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
> xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
>
> + if (xf86_config->cursor == cursor) {
> + xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
> + return FALSE;
> + }
> if (xf86_config->cursor)
> FreeCursor (xf86_config->cursor, None);
> xf86_config->cursor = cursor;
This commit introduces two new warnings:
f86Cursors.c: In function ‘xf86_use_hw_cursor’:
xf86Cursors.c:465: warning: passing argument 1 of ‘xf86DrvMsg’ makes integer
from pointer without a cast
./../../hw/xfree86/common/xf86.h:214: note: expected ‘int’ but argument is
of type ‘char * (*)(const char *, int)’
xf86Cursors.c: In function ‘xf86_use_hw_cursor_argb’:
xf86Cursors.c:488: warning: passing argument 1 of ‘xf86DrvMsg’ makes integer
from pointer without a cast
./../../hw/xfree86/common/xf86.h:214: note: expected ‘int’ but argument is
of type ‘char * (*)(const char *, int)’
I can't find the definition of 'index' in this file and looking looking at
the preprocessor output it's pulled in from string.h. Can you have a look at
this please and fix it accordingly?
The other issue--much more worrying--is that my log file is now getting
flooded with this error message. I can't say if that's the right fix or not,
but the error message is definitely annoying.
Cheers,
Peter
More information about the xorg-devel
mailing list