From: Kristian Høgsberg Date: Sun, 21 Oct 2012 17:29:26 +0000 (-0400) Subject: compositor-drm: Disable hw cursor if allocation fails X-Git-Tag: accepted/2.0alpha-wayland/20121115.181110~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d1e0a5ffaa91dcbdc1f18e0e5c43a2dc92f5875;p=profile%2Fivi%2Fweston.git compositor-drm: Disable hw cursor if allocation fails Instead of crashing later, we can just fall back to gl rendered cursors. --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 78ad35d..a2169dd 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1466,6 +1466,10 @@ create_output_for_connector(struct drm_compositor *ec, output->cursor_bo[1] = gbm_bo_create(ec->gbm, 64, 64, GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE); + if (output->cursor_bo[0] == NULL || output->cursor_bo[1] == NULL) { + weston_log("cursor buffers unavailable, using gl cursors\n"); + ec->cursors_are_broken = 1; + } output->backlight = backlight_init(drm_device, connector->connector_type);