diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 6e755e948..9d28068fa 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -813,13 +813,8 @@ drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image) for (i = 0; i < ms->cursor_width * ms->cursor_height; i++) ptr[i] = image[i]; // cpu_to_le32(image[i]); - if (drmmode_crtc->cursor_up || !drmmode_crtc->first_cursor_load_done) { - Bool ret = drmmode_set_cursor(crtc); - if (!drmmode_crtc->cursor_up) - drmmode_hide_cursor(crtc); - drmmode_crtc->first_cursor_load_done = TRUE; - return ret; - } + if (drmmode_crtc->cursor_up) + return drmmode_set_cursor(crtc); return TRUE; } @@ -835,12 +830,12 @@ drmmode_hide_cursor(xf86CrtcPtr crtc) ms->cursor_width, ms->cursor_height); } -static void +static Bool drmmode_show_cursor(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->cursor_up = TRUE; - drmmode_set_cursor(crtc); + return drmmode_set_cursor(crtc); } static void @@ -1108,7 +1103,7 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .set_mode_major = drmmode_set_mode_major, .set_cursor_colors = drmmode_set_cursor_colors, .set_cursor_position = drmmode_set_cursor_position, - .show_cursor = drmmode_show_cursor, + .show_cursor_check = drmmode_show_cursor, .hide_cursor = drmmode_hide_cursor, .load_cursor_argb_check = drmmode_load_cursor_argb_check, diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h b/hw/xfree86/drivers/modesetting/drmmode_display.h index 50976b849..3b0eb2bea 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.h +++ b/hw/xfree86/drivers/modesetting/drmmode_display.h @@ -93,7 +93,6 @@ typedef struct { struct dumb_bo *cursor_bo; Bool cursor_up; Bool set_cursor2_failed; - Bool first_cursor_load_done; uint16_t lut_r[256], lut_g[256], lut_b[256]; drmmode_bo rotate_bo;