diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-28 19:42:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-28 19:42:25 +0100 |
commit | ab57363a1c0b970a220a59a53562b46c817cd7ea (patch) | |
tree | 2187d306fbbec0672833f16884d38c79ed66ef51 | |
parent | 6988b873b041130d88dd0aae70c10f86550ee2b3 (diff) |
sna: Enable kernel fail logging for cursors
Log the kernel messages when we fail to set a cursor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index ef29a916..b3eb19f7 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1303,6 +1303,9 @@ bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, } #if HAS_DEBUG_FULL +#if !HAS_DEBUG_FULL +#define LogF ErrorF +#endif struct kmsg { int fd; int saved_loglevel; @@ -1399,8 +1402,8 @@ sna_crtc_apply(xf86CrtcPtr crtc) return EINVAL; } - sigio = sigio_block(); kmsg_open(&kmsg); + sigio = sigio_block(); assert(sna->mode.num_real_output < ARRAY_SIZE(output_ids)); sna_crtc_disable_cursor(sna, sna_crtc); @@ -1500,8 +1503,8 @@ sna_crtc_apply(xf86CrtcPtr crtc) sna_crtc_force_outputs_on(crtc); unblock: - kmsg_close(&kmsg, ret); sigio_unblock(sigio); + kmsg_close(&kmsg, ret); return ret; } @@ -5853,12 +5856,14 @@ sna_show_cursors(ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); struct sna *sna = to_sna(scrn); + struct kmsg kmsg; int sigio, c; DBG(("%s: cursor?=%d\n", __FUNCTION__, sna->cursor.ref != NULL)); if (sna->cursor.ref == NULL) return; + kmsg_open(&kmsg); sigio = sigio_block(); for (c = 0; c < sna->mode.num_real_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; @@ -5910,6 +5915,7 @@ sna_show_cursors(ScrnInfoPtr scrn) } sigio_unblock(sigio); sna->cursor.active = true; + kmsg_close(&kmsg, sna->cursor.disable); if (unlikely(sna->cursor.disable)) restore_swcursor(sna); @@ -6032,6 +6038,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); struct sna *sna = to_sna(scrn); + struct kmsg kmsg; int sigio, c; __DBG(("%s(%d, %d), cursor? %d\n", __FUNCTION__, @@ -6039,6 +6046,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y) if (sna->cursor.ref == NULL) return; + kmsg_open(&kmsg); sigio = sigio_block(); sna->cursor.last_x = x; sna->cursor.last_y = y; @@ -6145,6 +6153,7 @@ disable: } } sigio_unblock(sigio); + kmsg_close(&kmsg, sna->cursor.disable); if (unlikely(sna->cursor.disable)) restore_swcursor(sna); |